@polyv/chat-ui 2.1.0-rc-20251023.2 → 2.3.0-rc-20251204.1
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/index.d.ts +403 -42
- package/index.es.js +24066 -16389
- package/index.umd.js +446 -152
- package/package.json +1 -1
- package/special.d.ts +329 -41
- package/special.es.js +22579 -15673
- package/special.umd.js +443 -152
package/package.json
CHANGED
package/special.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AskMsgType } from '@polyv/chat';
|
|
2
2
|
import { ChatMsgRewardType } from '@polyv/chat';
|
|
3
3
|
import { ChatMsgSource } from '@polyv/chat';
|
|
4
4
|
import { ChatMsgType } from '@polyv/chat';
|
|
@@ -6,11 +6,14 @@ import { ComponentCustomProperties } from 'vue';
|
|
|
6
6
|
import { ComponentOptions } from 'vue';
|
|
7
7
|
import { ComponentOptionsBase } from 'vue';
|
|
8
8
|
import { ComponentOptionsMixin } from 'vue';
|
|
9
|
+
import { ComputedRef } from 'vue';
|
|
9
10
|
import { DefineComponent } from 'vue';
|
|
10
11
|
import { ExtractComputedReturns } from 'vue/types/v3-component-options';
|
|
11
12
|
import { ExtractPropTypes } from 'vue';
|
|
13
|
+
import { GlobalStoreDefinition } from '@polyv/vue-components';
|
|
12
14
|
import { PickChatMsgType } from '@polyv/chat';
|
|
13
15
|
import { PolyvChat } from '@polyv/chat';
|
|
16
|
+
import { Ref } from 'vue';
|
|
14
17
|
import { SendEmotionImageMsgOptions } from '@polyv/chat';
|
|
15
18
|
import { SendImageMsgOptions } from '@polyv/chat';
|
|
16
19
|
import { SendSpeakMsgOptions } from '@polyv/chat';
|
|
@@ -18,9 +21,35 @@ import { ShallowUnwrapRef } from 'vue';
|
|
|
18
21
|
import { SystemMsgType } from '@polyv/chat';
|
|
19
22
|
import { ValidatorFunction } from 'vue-types/dist/types';
|
|
20
23
|
import { Vue3Instance } from 'vue/types/v3-component-public-instance';
|
|
21
|
-
import { VueTypeValidableDef } from '
|
|
24
|
+
import { VueTypeValidableDef } from '../../../../../../../node_modules/vue-types';
|
|
25
|
+
import { VueTypeValidableDef as VueTypeValidableDef_2 } from '../../../../../../node_modules/vue-types';
|
|
26
|
+
import { VueTypeValidableDef as VueTypeValidableDef_3 } from '../../../../../node_modules/vue-types';
|
|
22
27
|
|
|
23
28
|
declare const __VLS_component: DefineComponent< {
|
|
29
|
+
/**
|
|
30
|
+
* 是否显示发送图片图标
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
showSendImage: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
|
|
34
|
+
default: boolean;
|
|
35
|
+
} & {
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {
|
|
39
|
+
/**
|
|
40
|
+
* 是否显示发送图片图标
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
showSendImage: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
|
|
44
|
+
default: boolean;
|
|
45
|
+
} & {
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
}>>, {
|
|
49
|
+
showSendImage: boolean;
|
|
50
|
+
}>;
|
|
51
|
+
|
|
52
|
+
declare const __VLS_component_2: DefineComponent< {
|
|
24
53
|
defaultHeight: VueTypeValidableDef<number, ValidatorFunction<number>> & {
|
|
25
54
|
default: number;
|
|
26
55
|
} & {
|
|
@@ -49,9 +78,17 @@ defaultHeight: number;
|
|
|
49
78
|
showMore: boolean;
|
|
50
79
|
}>;
|
|
51
80
|
|
|
52
|
-
declare const __VLS_component_2: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
|
|
53
|
-
|
|
54
81
|
declare function __VLS_template(): {
|
|
82
|
+
attrs: Partial<{}>;
|
|
83
|
+
slots: {
|
|
84
|
+
'body-suffix'?(_: {}): any;
|
|
85
|
+
suffix?(_: {}): any;
|
|
86
|
+
};
|
|
87
|
+
refs: {};
|
|
88
|
+
rootEl: HTMLDivElement;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
declare function __VLS_template_2(): {
|
|
55
92
|
attrs: Partial<{}>;
|
|
56
93
|
slots: {
|
|
57
94
|
'more-panel'?(_: {}): any;
|
|
@@ -61,6 +98,7 @@ declare function __VLS_template(): {
|
|
|
61
98
|
};
|
|
62
99
|
refs: {
|
|
63
100
|
msgInputBaseRef: (Vue3Instance< {}, Readonly<ExtractPropTypes< {
|
|
101
|
+
resizeStorageKey: VueTypeValidableDef<string, ValidatorFunction<string>>;
|
|
64
102
|
defaultHeight: VueTypeValidableDef<number, ValidatorFunction<number>> & {
|
|
65
103
|
default: number;
|
|
66
104
|
} & {
|
|
@@ -71,6 +109,11 @@ declare function __VLS_template(): {
|
|
|
71
109
|
} & {
|
|
72
110
|
default: boolean;
|
|
73
111
|
};
|
|
112
|
+
showSendImage: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
|
|
113
|
+
default: boolean;
|
|
114
|
+
} & {
|
|
115
|
+
default: boolean;
|
|
116
|
+
};
|
|
74
117
|
placeholder: VueTypeValidableDef<string, ValidatorFunction<string>> & {
|
|
75
118
|
default: string;
|
|
76
119
|
};
|
|
@@ -89,7 +132,18 @@ declare function __VLS_template(): {
|
|
|
89
132
|
} & {
|
|
90
133
|
default: number;
|
|
91
134
|
};
|
|
135
|
+
showFaceEmotion: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
|
|
136
|
+
default: boolean;
|
|
137
|
+
} & {
|
|
138
|
+
default: boolean;
|
|
139
|
+
};
|
|
140
|
+
showImageEmotion: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
|
|
141
|
+
default: boolean;
|
|
142
|
+
} & {
|
|
143
|
+
default: boolean;
|
|
144
|
+
};
|
|
92
145
|
}>>, Readonly<ExtractPropTypes< {
|
|
146
|
+
resizeStorageKey: VueTypeValidableDef<string, ValidatorFunction<string>>;
|
|
93
147
|
defaultHeight: VueTypeValidableDef<number, ValidatorFunction<number>> & {
|
|
94
148
|
default: number;
|
|
95
149
|
} & {
|
|
@@ -100,6 +154,11 @@ declare function __VLS_template(): {
|
|
|
100
154
|
} & {
|
|
101
155
|
default: boolean;
|
|
102
156
|
};
|
|
157
|
+
showSendImage: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
|
|
158
|
+
default: boolean;
|
|
159
|
+
} & {
|
|
160
|
+
default: boolean;
|
|
161
|
+
};
|
|
103
162
|
placeholder: VueTypeValidableDef<string, ValidatorFunction<string>> & {
|
|
104
163
|
default: string;
|
|
105
164
|
};
|
|
@@ -118,6 +177,16 @@ declare function __VLS_template(): {
|
|
|
118
177
|
} & {
|
|
119
178
|
default: number;
|
|
120
179
|
};
|
|
180
|
+
showFaceEmotion: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
|
|
181
|
+
default: boolean;
|
|
182
|
+
} & {
|
|
183
|
+
default: boolean;
|
|
184
|
+
};
|
|
185
|
+
showImageEmotion: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
|
|
186
|
+
default: boolean;
|
|
187
|
+
} & {
|
|
188
|
+
default: boolean;
|
|
189
|
+
};
|
|
121
190
|
}>>, {
|
|
122
191
|
submit: (arg: {
|
|
123
192
|
contentList: InputContent[];
|
|
@@ -129,12 +198,16 @@ declare function __VLS_template(): {
|
|
|
129
198
|
"click-send-image": (arg?: void | undefined) => void;
|
|
130
199
|
}, {
|
|
131
200
|
disabledInput: boolean;
|
|
201
|
+
showSendImage: boolean;
|
|
132
202
|
placeholder: string;
|
|
203
|
+
showFaceEmotion: boolean;
|
|
204
|
+
showImageEmotion: boolean;
|
|
133
205
|
disabledSubmitBtn: boolean;
|
|
134
206
|
maxInputTextLength: number;
|
|
135
207
|
defaultHeight: number;
|
|
136
208
|
showBottom: boolean;
|
|
137
209
|
}, true, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<ExtractPropTypes< {
|
|
210
|
+
resizeStorageKey: VueTypeValidableDef<string, ValidatorFunction<string>>;
|
|
138
211
|
defaultHeight: VueTypeValidableDef<number, ValidatorFunction<number>> & {
|
|
139
212
|
default: number;
|
|
140
213
|
} & {
|
|
@@ -145,6 +218,11 @@ declare function __VLS_template(): {
|
|
|
145
218
|
} & {
|
|
146
219
|
default: boolean;
|
|
147
220
|
};
|
|
221
|
+
showSendImage: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
|
|
222
|
+
default: boolean;
|
|
223
|
+
} & {
|
|
224
|
+
default: boolean;
|
|
225
|
+
};
|
|
148
226
|
placeholder: VueTypeValidableDef<string, ValidatorFunction<string>> & {
|
|
149
227
|
default: string;
|
|
150
228
|
};
|
|
@@ -163,9 +241,20 @@ declare function __VLS_template(): {
|
|
|
163
241
|
} & {
|
|
164
242
|
default: number;
|
|
165
243
|
};
|
|
244
|
+
showFaceEmotion: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
|
|
245
|
+
default: boolean;
|
|
246
|
+
} & {
|
|
247
|
+
default: boolean;
|
|
248
|
+
};
|
|
249
|
+
showImageEmotion: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
|
|
250
|
+
default: boolean;
|
|
251
|
+
} & {
|
|
252
|
+
default: boolean;
|
|
253
|
+
};
|
|
166
254
|
}>>> & ShallowUnwrapRef< {
|
|
167
255
|
focusInput: () => void;
|
|
168
256
|
}> & ExtractComputedReturns< {}> & ComponentCustomProperties & Readonly<ExtractPropTypes< {
|
|
257
|
+
resizeStorageKey: VueTypeValidableDef<string, ValidatorFunction<string>>;
|
|
169
258
|
defaultHeight: VueTypeValidableDef<number, ValidatorFunction<number>> & {
|
|
170
259
|
default: number;
|
|
171
260
|
} & {
|
|
@@ -176,6 +265,11 @@ declare function __VLS_template(): {
|
|
|
176
265
|
} & {
|
|
177
266
|
default: boolean;
|
|
178
267
|
};
|
|
268
|
+
showSendImage: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
|
|
269
|
+
default: boolean;
|
|
270
|
+
} & {
|
|
271
|
+
default: boolean;
|
|
272
|
+
};
|
|
179
273
|
placeholder: VueTypeValidableDef<string, ValidatorFunction<string>> & {
|
|
180
274
|
default: string;
|
|
181
275
|
};
|
|
@@ -194,6 +288,16 @@ declare function __VLS_template(): {
|
|
|
194
288
|
} & {
|
|
195
289
|
default: number;
|
|
196
290
|
};
|
|
291
|
+
showFaceEmotion: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
|
|
292
|
+
default: boolean;
|
|
293
|
+
} & {
|
|
294
|
+
default: boolean;
|
|
295
|
+
};
|
|
296
|
+
showImageEmotion: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
|
|
297
|
+
default: boolean;
|
|
298
|
+
} & {
|
|
299
|
+
default: boolean;
|
|
300
|
+
};
|
|
197
301
|
}>> & {
|
|
198
302
|
$scopedSlots: {
|
|
199
303
|
'panel-suffix'?(_: {}): any;
|
|
@@ -204,20 +308,11 @@ declare function __VLS_template(): {
|
|
|
204
308
|
'bottom-suffix'?(_: {}): any;
|
|
205
309
|
};
|
|
206
310
|
}) | null;
|
|
311
|
+
morePanelRef: HTMLDivElement;
|
|
207
312
|
};
|
|
208
313
|
rootEl: HTMLDivElement;
|
|
209
314
|
};
|
|
210
315
|
|
|
211
|
-
declare function __VLS_template_2(): {
|
|
212
|
-
attrs: Partial<{}>;
|
|
213
|
-
slots: {
|
|
214
|
-
'body-suffix'?(_: {}): any;
|
|
215
|
-
suffix?(_: {}): any;
|
|
216
|
-
};
|
|
217
|
-
refs: {};
|
|
218
|
-
rootEl: HTMLDivElement;
|
|
219
|
-
};
|
|
220
|
-
|
|
221
316
|
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
222
317
|
|
|
223
318
|
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
@@ -237,18 +332,50 @@ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
|
237
332
|
/**
|
|
238
333
|
* 动画来源
|
|
239
334
|
*/
|
|
240
|
-
declare type AnimationSource = 'donate-
|
|
335
|
+
declare type AnimationSource = 'donate-animation' | 'chat-like' | 'special-effect-animation';
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* 提问配置
|
|
339
|
+
*/
|
|
340
|
+
declare interface AskConfig {
|
|
341
|
+
/**
|
|
342
|
+
* 提问欢迎语
|
|
343
|
+
* @default ''
|
|
344
|
+
*/
|
|
345
|
+
askWelcomeText?: string;
|
|
346
|
+
/**
|
|
347
|
+
* 显示在线状态
|
|
348
|
+
* @default false
|
|
349
|
+
*/
|
|
350
|
+
showOnlineStatus?: boolean;
|
|
351
|
+
/**
|
|
352
|
+
* 提问新消息回调
|
|
353
|
+
*/
|
|
354
|
+
onNewAskMessage?: (askMsg: AskMsgType) => void;
|
|
355
|
+
}
|
|
241
356
|
|
|
242
357
|
export declare const BanList: DefineComponent< {}, {
|
|
243
358
|
openBanList: () => void;
|
|
244
359
|
closeBanList: () => void;
|
|
245
360
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
|
|
246
361
|
|
|
362
|
+
export declare interface BaseConfig {
|
|
363
|
+
/**
|
|
364
|
+
* 是否隐藏昵称
|
|
365
|
+
* @default false
|
|
366
|
+
*/
|
|
367
|
+
hideNickname?: boolean;
|
|
368
|
+
}
|
|
369
|
+
|
|
247
370
|
export declare interface ChatGlobalInject {
|
|
248
371
|
/**
|
|
249
372
|
* 获取聊天室实例对象
|
|
250
373
|
*/
|
|
251
374
|
getChatTarget: () => PolyvChat;
|
|
375
|
+
/**
|
|
376
|
+
* 获取基础配置
|
|
377
|
+
*/
|
|
378
|
+
getBaseConfig?: () => BaseConfig;
|
|
252
379
|
/**
|
|
253
380
|
* 获取消息配置
|
|
254
381
|
*/
|
|
@@ -273,6 +400,14 @@ export declare interface ChatGlobalInject {
|
|
|
273
400
|
* 获取打赏配置
|
|
274
401
|
*/
|
|
275
402
|
getDonateConfig?: () => DonateConfig;
|
|
403
|
+
/**
|
|
404
|
+
* 获取点赞配置
|
|
405
|
+
*/
|
|
406
|
+
getLikeConfig?: () => LikeConfig;
|
|
407
|
+
/**
|
|
408
|
+
* 获取特效配置
|
|
409
|
+
*/
|
|
410
|
+
getSpecialEffectConfig?: () => SpecialEffectConfig;
|
|
276
411
|
/**
|
|
277
412
|
* 获取直播状态
|
|
278
413
|
*/
|
|
@@ -281,18 +416,26 @@ export declare interface ChatGlobalInject {
|
|
|
281
416
|
* 获取是否显示动画
|
|
282
417
|
*/
|
|
283
418
|
getAnimationVisible?: (animationSource: AnimationSource) => boolean;
|
|
419
|
+
/**
|
|
420
|
+
* 获取提问配置
|
|
421
|
+
*/
|
|
422
|
+
getAskConfig?: () => AskConfig;
|
|
284
423
|
/**
|
|
285
424
|
* 拦截处理,返回 true 表示终止后续的业务逻辑执行
|
|
286
425
|
*/
|
|
287
426
|
interceptClick?: (triggerSource: InterceptTriggerSource) => boolean | Promise<boolean>;
|
|
288
427
|
}
|
|
289
428
|
|
|
429
|
+
export declare const ChatMessageInputControl: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
430
|
+
|
|
290
431
|
export declare const ChatMessageInputPopup: DefineComponent< {}, {
|
|
291
432
|
showInputPopup: typeof showInputPopup;
|
|
292
433
|
closeInputPopup: typeof closeInputPopup;
|
|
293
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
434
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
435
|
+
"visible-change": (arg: boolean) => void;
|
|
436
|
+
}, string, Readonly<ExtractPropTypes< {}>>, {}>;
|
|
294
437
|
|
|
295
|
-
export declare const ChatMessageInputSection:
|
|
438
|
+
export declare const ChatMessageInputSection: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
296
439
|
|
|
297
440
|
export declare const ChatMessageList: DefineComponent< {}, {
|
|
298
441
|
setIsOnlySpecialMsg: (value: boolean) => void;
|
|
@@ -301,13 +444,13 @@ setIsOnlySpecialMsg: (value: boolean) => void;
|
|
|
301
444
|
declare function closeInputPopup(): void;
|
|
302
445
|
|
|
303
446
|
export declare const DonateAnimation: DefineComponent< {
|
|
304
|
-
trackCount:
|
|
447
|
+
trackCount: VueTypeValidableDef_2<number, ValidatorFunction<number>> & {
|
|
305
448
|
default: number;
|
|
306
449
|
} & {
|
|
307
450
|
default: number;
|
|
308
451
|
};
|
|
309
452
|
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {
|
|
310
|
-
trackCount:
|
|
453
|
+
trackCount: VueTypeValidableDef_2<number, ValidatorFunction<number>> & {
|
|
311
454
|
default: number;
|
|
312
455
|
} & {
|
|
313
456
|
default: number;
|
|
@@ -326,8 +469,6 @@ declare interface DonateConfig {
|
|
|
326
469
|
getSvgaUrl?: (chatMsg: ChatMsgRewardType) => Promise<string | undefined> | string | undefined;
|
|
327
470
|
}
|
|
328
471
|
|
|
329
|
-
export declare const DonateSvgaAnimation: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
|
|
330
|
-
|
|
331
472
|
/**
|
|
332
473
|
* 文字类型,normal-普通文字,nickname-用户昵称,productName-商品名称
|
|
333
474
|
*/
|
|
@@ -341,14 +482,14 @@ export declare interface HistoryConfig {
|
|
|
341
482
|
* @default false
|
|
342
483
|
*/
|
|
343
484
|
workWechatMyCustomerHistory?: boolean;
|
|
485
|
+
/**
|
|
486
|
+
* 是否获取聊天历史消息
|
|
487
|
+
* @default true
|
|
488
|
+
*/
|
|
489
|
+
getChatHistory?: boolean;
|
|
344
490
|
}
|
|
345
491
|
|
|
346
492
|
export declare interface InputConfig {
|
|
347
|
-
/**
|
|
348
|
-
* 聊天室输入框占位符
|
|
349
|
-
* @default ''
|
|
350
|
-
*/
|
|
351
|
-
inputPlaceholder?: string;
|
|
352
493
|
/**
|
|
353
494
|
* 黄脸表情开关
|
|
354
495
|
* @default true
|
|
@@ -365,15 +506,29 @@ export declare interface InputConfig {
|
|
|
365
506
|
*/
|
|
366
507
|
disabledInput?: boolean;
|
|
367
508
|
/**
|
|
368
|
-
*
|
|
509
|
+
* 输入框遮罩文案
|
|
510
|
+
* @default ''
|
|
511
|
+
*/
|
|
512
|
+
inputMaskPlaceholder?: string;
|
|
513
|
+
/**
|
|
514
|
+
* 聊天室输入框占位符
|
|
515
|
+
* @default ''
|
|
516
|
+
*/
|
|
517
|
+
chatInputPlaceholder?: string;
|
|
518
|
+
/**
|
|
519
|
+
* 聊天区发送图片开关
|
|
369
520
|
* @default true
|
|
370
521
|
*/
|
|
371
|
-
|
|
522
|
+
sendChatImageEnabled?: boolean;
|
|
372
523
|
/**
|
|
373
|
-
*
|
|
524
|
+
* 提问区输入框占位符
|
|
374
525
|
* @default ''
|
|
375
526
|
*/
|
|
376
|
-
|
|
527
|
+
askInputPlaceholder?: string;
|
|
528
|
+
/**
|
|
529
|
+
* 提问区发送图片开关
|
|
530
|
+
*/
|
|
531
|
+
sendAskImageEnabled?: boolean;
|
|
377
532
|
}
|
|
378
533
|
|
|
379
534
|
export declare type InputContent = InputContentText | InputContentImage;
|
|
@@ -398,14 +553,41 @@ export declare interface InputContentText {
|
|
|
398
553
|
* click-message-input: 消息输入框
|
|
399
554
|
* focus-message-input: 聚焦输入框
|
|
400
555
|
* click-submit: 点击提交按钮
|
|
556
|
+
* chat-like: 点赞
|
|
401
557
|
*/
|
|
402
|
-
export declare type InterceptTriggerSource = 'send-image' | 'emotion-picker' | 'chat-quote' | 'more-panel' | 'click-message-input' | 'focus-message-input' | 'click-submit';
|
|
558
|
+
export declare type InterceptTriggerSource = 'send-image' | 'emotion-picker' | 'chat-quote' | 'more-panel' | 'click-message-input' | 'focus-message-input' | 'click-submit' | 'chat-like';
|
|
403
559
|
|
|
404
560
|
export declare const KickList: DefineComponent< {}, {
|
|
405
561
|
openKickList: () => void;
|
|
406
562
|
closeKickList: () => void;
|
|
407
563
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
|
|
408
564
|
|
|
565
|
+
/**
|
|
566
|
+
* 点赞配置
|
|
567
|
+
*/
|
|
568
|
+
declare interface LikeConfig {
|
|
569
|
+
/**
|
|
570
|
+
* 点击开关
|
|
571
|
+
* @default true
|
|
572
|
+
*/
|
|
573
|
+
clickEnabled?: boolean;
|
|
574
|
+
/**
|
|
575
|
+
* 按住开关
|
|
576
|
+
* @default true
|
|
577
|
+
*/
|
|
578
|
+
holdEnabled?: boolean;
|
|
579
|
+
/**
|
|
580
|
+
* 数量位置
|
|
581
|
+
* @default 'bottom'
|
|
582
|
+
*/
|
|
583
|
+
countPosition?: 'top' | 'bottom';
|
|
584
|
+
/**
|
|
585
|
+
* 触发节点大小
|
|
586
|
+
* @default 40
|
|
587
|
+
*/
|
|
588
|
+
triggerSize?: number;
|
|
589
|
+
}
|
|
590
|
+
|
|
409
591
|
/**
|
|
410
592
|
* 管理配置
|
|
411
593
|
*/
|
|
@@ -450,10 +632,6 @@ export declare interface ManageConfig {
|
|
|
450
632
|
* @default false
|
|
451
633
|
*/
|
|
452
634
|
askUserEnabled?: boolean;
|
|
453
|
-
/**
|
|
454
|
-
* 私聊用户回调
|
|
455
|
-
*/
|
|
456
|
-
askUserCallback?: boolean | ((user: ChatMessageUser) => void);
|
|
457
635
|
/**
|
|
458
636
|
* 聊天室全体禁言开关
|
|
459
637
|
* @default false
|
|
@@ -478,9 +656,23 @@ export declare interface ManageConfig {
|
|
|
478
656
|
downloadOnlineListEnabled?: boolean;
|
|
479
657
|
}
|
|
480
658
|
|
|
481
|
-
export declare const
|
|
482
|
-
|
|
483
|
-
|
|
659
|
+
export declare const MemberList: DefineComponent< {
|
|
660
|
+
showTop: VueTypeValidableDef_3<boolean, ValidatorFunction<boolean>> & {
|
|
661
|
+
default: boolean;
|
|
662
|
+
} & {
|
|
663
|
+
default: boolean;
|
|
664
|
+
};
|
|
665
|
+
}, {
|
|
666
|
+
openRulePopup: typeof openRulePopup;
|
|
667
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {
|
|
668
|
+
showTop: VueTypeValidableDef_3<boolean, ValidatorFunction<boolean>> & {
|
|
669
|
+
default: boolean;
|
|
670
|
+
} & {
|
|
671
|
+
default: boolean;
|
|
672
|
+
};
|
|
673
|
+
}>>, {
|
|
674
|
+
showTop: boolean;
|
|
675
|
+
}>;
|
|
484
676
|
|
|
485
677
|
export declare interface MessageConfig {
|
|
486
678
|
/**
|
|
@@ -488,6 +680,11 @@ export declare interface MessageConfig {
|
|
|
488
680
|
* @default ''
|
|
489
681
|
*/
|
|
490
682
|
introductionText?: string;
|
|
683
|
+
/**
|
|
684
|
+
* 聊天区系统消息
|
|
685
|
+
* @default ''
|
|
686
|
+
*/
|
|
687
|
+
systemText?: string;
|
|
491
688
|
/**
|
|
492
689
|
* 是否显示聊天室空数据提示
|
|
493
690
|
* @default false
|
|
@@ -499,7 +696,7 @@ export declare interface MessageConfig {
|
|
|
499
696
|
*/
|
|
500
697
|
hideSources?: ChatMsgSource[];
|
|
501
698
|
/**
|
|
502
|
-
*
|
|
699
|
+
* 隐藏消息处理,返回 true 时消息隐藏
|
|
503
700
|
* @default {}
|
|
504
701
|
*/
|
|
505
702
|
hideMessage?: {
|
|
@@ -556,6 +753,16 @@ export declare interface MessageConfig {
|
|
|
556
753
|
top: number;
|
|
557
754
|
bottom: number;
|
|
558
755
|
};
|
|
756
|
+
/**
|
|
757
|
+
* 消息容器边界阴影配置
|
|
758
|
+
* @default { topHeight: 0 }
|
|
759
|
+
*/
|
|
760
|
+
messageContainerBoundaryShadow?: {
|
|
761
|
+
/**
|
|
762
|
+
* 顶部阴影高度
|
|
763
|
+
*/
|
|
764
|
+
topHeight?: number;
|
|
765
|
+
};
|
|
559
766
|
/**
|
|
560
767
|
* 鼠标悬停高亮
|
|
561
768
|
* @default false
|
|
@@ -610,6 +817,12 @@ export declare interface MessageConfig {
|
|
|
610
817
|
* @default false
|
|
611
818
|
*/
|
|
612
819
|
autoTranslateEnabled?: boolean;
|
|
820
|
+
/**
|
|
821
|
+
* 是否隐藏滚动条
|
|
822
|
+
* @description 滚动条消失,但滚动仍然可用
|
|
823
|
+
* @default false
|
|
824
|
+
*/
|
|
825
|
+
hideScrollbar?: boolean;
|
|
613
826
|
}
|
|
614
827
|
|
|
615
828
|
/**
|
|
@@ -653,6 +866,10 @@ export declare interface MessageEffectData {
|
|
|
653
866
|
* 字符串模板
|
|
654
867
|
*/
|
|
655
868
|
strTemplate: string;
|
|
869
|
+
/**
|
|
870
|
+
* 背景色
|
|
871
|
+
*/
|
|
872
|
+
bgColor?: string;
|
|
656
873
|
}
|
|
657
874
|
|
|
658
875
|
/**
|
|
@@ -719,6 +936,21 @@ export declare interface OnlineConfig {
|
|
|
719
936
|
* @default 200
|
|
720
937
|
*/
|
|
721
938
|
requestCount?: number;
|
|
939
|
+
/**
|
|
940
|
+
* 搜索在线列表开关
|
|
941
|
+
* @default true
|
|
942
|
+
*/
|
|
943
|
+
searchEnabled?: boolean;
|
|
944
|
+
/**
|
|
945
|
+
* 规则开关
|
|
946
|
+
* @default false
|
|
947
|
+
*/
|
|
948
|
+
ruleEnabled?: boolean;
|
|
949
|
+
/**
|
|
950
|
+
* 轮训间隔,单位:毫秒
|
|
951
|
+
* @default 10000
|
|
952
|
+
*/
|
|
953
|
+
pollingTime?: number;
|
|
722
954
|
/**
|
|
723
955
|
* 在线人数更新回调
|
|
724
956
|
* @param count 在线人数
|
|
@@ -726,13 +958,60 @@ export declare interface OnlineConfig {
|
|
|
726
958
|
onlineCountCallback?: (count: number) => void;
|
|
727
959
|
}
|
|
728
960
|
|
|
961
|
+
declare function openRulePopup(): void;
|
|
962
|
+
|
|
963
|
+
export declare const RunwayEffect: DefineComponent< {
|
|
964
|
+
left: VueTypeValidableDef_2<number, ValidatorFunction<number>> & {
|
|
965
|
+
default: number;
|
|
966
|
+
} & {
|
|
967
|
+
default: number;
|
|
968
|
+
};
|
|
969
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {
|
|
970
|
+
left: VueTypeValidableDef_2<number, ValidatorFunction<number>> & {
|
|
971
|
+
default: number;
|
|
972
|
+
} & {
|
|
973
|
+
default: number;
|
|
974
|
+
};
|
|
975
|
+
}>>, {
|
|
976
|
+
left: number;
|
|
977
|
+
}>;
|
|
978
|
+
|
|
729
979
|
declare function showInputPopup(): void;
|
|
730
980
|
|
|
981
|
+
export declare const SpecialEffectAnimation: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* 特效配置
|
|
985
|
+
*/
|
|
986
|
+
export declare interface SpecialEffectConfig {
|
|
987
|
+
/**
|
|
988
|
+
* 屏蔽特效开关
|
|
989
|
+
* @default false
|
|
990
|
+
*/
|
|
991
|
+
switchEnabled?: boolean;
|
|
992
|
+
/**
|
|
993
|
+
* 默认是否显示
|
|
994
|
+
* @default true
|
|
995
|
+
*/
|
|
996
|
+
defaultVisible?: boolean;
|
|
997
|
+
/**
|
|
998
|
+
* 特效显示切换回调
|
|
999
|
+
*/
|
|
1000
|
+
visibleChangeCallback?: (visible: boolean) => void;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
731
1003
|
export declare const TopingMsgList: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
|
|
732
1004
|
|
|
733
1005
|
export declare const useChatGlobalProvide: (injectData: ChatGlobalInject) => void;
|
|
734
1006
|
|
|
735
|
-
export declare const
|
|
1007
|
+
export declare const useOnlySpecialStore: GlobalStoreDefinition<"only-special", {
|
|
1008
|
+
canOnlySpecialMsg: ComputedRef<boolean>;
|
|
1009
|
+
isOnlySpecialMsg: Ref<boolean>;
|
|
1010
|
+
setIsOnlySpecialMsg: (value: boolean) => void;
|
|
1011
|
+
toggleOnlySpecialMsg: () => void;
|
|
1012
|
+
}>;
|
|
1013
|
+
|
|
1014
|
+
export declare const useSendChatMsg: () => {
|
|
736
1015
|
sendSpeakMsg: (options: SendSpeakMsgOptions) => Promise<void>;
|
|
737
1016
|
sendImageMsg: (options: SendImageMsgOptions) => Promise<void>;
|
|
738
1017
|
sendEmotionImageMsg: (options: SendEmotionImageMsgOptions) => Promise<void>;
|
|
@@ -741,6 +1020,15 @@ export declare const useSendMsg: () => {
|
|
|
741
1020
|
sendContentList: (contentList: InputContent[], quoteMsg?: ChatMsgType) => Promise<void>;
|
|
742
1021
|
};
|
|
743
1022
|
|
|
744
|
-
export declare const
|
|
1023
|
+
export declare const useSpecialEffectStore: GlobalStoreDefinition<"special-effect", {
|
|
1024
|
+
/** 特效显隐 */
|
|
1025
|
+
specialEffectVisible: Ref<boolean>;
|
|
1026
|
+
/** 切换特效显隐 */
|
|
1027
|
+
toggleSpecialEffect: () => void;
|
|
1028
|
+
/** 显示特效 */
|
|
1029
|
+
showSpecialEffect: () => void;
|
|
1030
|
+
/** 隐藏特效 */
|
|
1031
|
+
hideSpecialEffect: () => void;
|
|
1032
|
+
}>;
|
|
745
1033
|
|
|
746
1034
|
export { }
|