@polyv/chat-ui 2.1.0-rc-20251023.2 → 2.2.0-rc-20251113.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 +119 -5
- package/index.es.js +13786 -13082
- package/index.umd.js +80 -70
- package/package.json +1 -1
- package/special.d.ts +117 -5
- package/special.es.js +10632 -10130
- package/special.umd.js +72 -62
package/package.json
CHANGED
package/special.d.ts
CHANGED
|
@@ -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';
|
|
@@ -237,7 +240,7 @@ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
|
237
240
|
/**
|
|
238
241
|
* 动画来源
|
|
239
242
|
*/
|
|
240
|
-
declare type AnimationSource = 'donate-
|
|
243
|
+
declare type AnimationSource = 'donate-animation' | 'chat-like' | 'special-effect-animation';
|
|
241
244
|
|
|
242
245
|
export declare const BanList: DefineComponent< {}, {
|
|
243
246
|
openBanList: () => void;
|
|
@@ -273,6 +276,14 @@ export declare interface ChatGlobalInject {
|
|
|
273
276
|
* 获取打赏配置
|
|
274
277
|
*/
|
|
275
278
|
getDonateConfig?: () => DonateConfig;
|
|
279
|
+
/**
|
|
280
|
+
* 获取点赞配置
|
|
281
|
+
*/
|
|
282
|
+
getLikeConfig?: () => LikeConfig;
|
|
283
|
+
/**
|
|
284
|
+
* 获取特效配置
|
|
285
|
+
*/
|
|
286
|
+
getSpecialEffectConfig?: () => SpecialEffectConfig;
|
|
276
287
|
/**
|
|
277
288
|
* 获取直播状态
|
|
278
289
|
*/
|
|
@@ -326,8 +337,6 @@ declare interface DonateConfig {
|
|
|
326
337
|
getSvgaUrl?: (chatMsg: ChatMsgRewardType) => Promise<string | undefined> | string | undefined;
|
|
327
338
|
}
|
|
328
339
|
|
|
329
|
-
export declare const DonateSvgaAnimation: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
|
|
330
|
-
|
|
331
340
|
/**
|
|
332
341
|
* 文字类型,normal-普通文字,nickname-用户昵称,productName-商品名称
|
|
333
342
|
*/
|
|
@@ -398,14 +407,41 @@ export declare interface InputContentText {
|
|
|
398
407
|
* click-message-input: 消息输入框
|
|
399
408
|
* focus-message-input: 聚焦输入框
|
|
400
409
|
* click-submit: 点击提交按钮
|
|
410
|
+
* chat-like: 点赞
|
|
401
411
|
*/
|
|
402
|
-
export declare type InterceptTriggerSource = 'send-image' | 'emotion-picker' | 'chat-quote' | 'more-panel' | 'click-message-input' | 'focus-message-input' | 'click-submit';
|
|
412
|
+
export declare type InterceptTriggerSource = 'send-image' | 'emotion-picker' | 'chat-quote' | 'more-panel' | 'click-message-input' | 'focus-message-input' | 'click-submit' | 'chat-like';
|
|
403
413
|
|
|
404
414
|
export declare const KickList: DefineComponent< {}, {
|
|
405
415
|
openKickList: () => void;
|
|
406
416
|
closeKickList: () => void;
|
|
407
417
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
|
|
408
418
|
|
|
419
|
+
/**
|
|
420
|
+
* 点赞配置
|
|
421
|
+
*/
|
|
422
|
+
declare interface LikeConfig {
|
|
423
|
+
/**
|
|
424
|
+
* 点击开关
|
|
425
|
+
* @default true
|
|
426
|
+
*/
|
|
427
|
+
clickEnabled?: boolean;
|
|
428
|
+
/**
|
|
429
|
+
* 按住开关
|
|
430
|
+
* @default true
|
|
431
|
+
*/
|
|
432
|
+
holdEnabled?: boolean;
|
|
433
|
+
/**
|
|
434
|
+
* 数量位置
|
|
435
|
+
* @default 'bottom'
|
|
436
|
+
*/
|
|
437
|
+
countPosition?: 'top' | 'bottom';
|
|
438
|
+
/**
|
|
439
|
+
* 触发节点大小
|
|
440
|
+
* @default 40
|
|
441
|
+
*/
|
|
442
|
+
triggerSize?: number;
|
|
443
|
+
}
|
|
444
|
+
|
|
409
445
|
/**
|
|
410
446
|
* 管理配置
|
|
411
447
|
*/
|
|
@@ -499,7 +535,7 @@ export declare interface MessageConfig {
|
|
|
499
535
|
*/
|
|
500
536
|
hideSources?: ChatMsgSource[];
|
|
501
537
|
/**
|
|
502
|
-
*
|
|
538
|
+
* 隐藏消息处理,返回 true 时消息隐藏
|
|
503
539
|
* @default {}
|
|
504
540
|
*/
|
|
505
541
|
hideMessage?: {
|
|
@@ -556,6 +592,16 @@ export declare interface MessageConfig {
|
|
|
556
592
|
top: number;
|
|
557
593
|
bottom: number;
|
|
558
594
|
};
|
|
595
|
+
/**
|
|
596
|
+
* 消息容器边界阴影配置
|
|
597
|
+
* @default { topHeight: 0 }
|
|
598
|
+
*/
|
|
599
|
+
messageContainerBoundaryShadow?: {
|
|
600
|
+
/**
|
|
601
|
+
* 顶部阴影高度
|
|
602
|
+
*/
|
|
603
|
+
topHeight?: number;
|
|
604
|
+
};
|
|
559
605
|
/**
|
|
560
606
|
* 鼠标悬停高亮
|
|
561
607
|
* @default false
|
|
@@ -610,6 +656,12 @@ export declare interface MessageConfig {
|
|
|
610
656
|
* @default false
|
|
611
657
|
*/
|
|
612
658
|
autoTranslateEnabled?: boolean;
|
|
659
|
+
/**
|
|
660
|
+
* 是否隐藏滚动条
|
|
661
|
+
* @description 滚动条消失,但滚动仍然可用
|
|
662
|
+
* @default false
|
|
663
|
+
*/
|
|
664
|
+
hideScrollbar?: boolean;
|
|
613
665
|
}
|
|
614
666
|
|
|
615
667
|
/**
|
|
@@ -653,6 +705,10 @@ export declare interface MessageEffectData {
|
|
|
653
705
|
* 字符串模板
|
|
654
706
|
*/
|
|
655
707
|
strTemplate: string;
|
|
708
|
+
/**
|
|
709
|
+
* 背景色
|
|
710
|
+
*/
|
|
711
|
+
bgColor?: string;
|
|
656
712
|
}
|
|
657
713
|
|
|
658
714
|
/**
|
|
@@ -726,12 +782,57 @@ export declare interface OnlineConfig {
|
|
|
726
782
|
onlineCountCallback?: (count: number) => void;
|
|
727
783
|
}
|
|
728
784
|
|
|
785
|
+
export declare const RunwayEffect: DefineComponent< {
|
|
786
|
+
left: VueTypeValidableDef<number, ValidatorFunction<number>> & {
|
|
787
|
+
default: number;
|
|
788
|
+
} & {
|
|
789
|
+
default: number;
|
|
790
|
+
};
|
|
791
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {
|
|
792
|
+
left: VueTypeValidableDef<number, ValidatorFunction<number>> & {
|
|
793
|
+
default: number;
|
|
794
|
+
} & {
|
|
795
|
+
default: number;
|
|
796
|
+
};
|
|
797
|
+
}>>, {
|
|
798
|
+
left: number;
|
|
799
|
+
}>;
|
|
800
|
+
|
|
729
801
|
declare function showInputPopup(): void;
|
|
730
802
|
|
|
803
|
+
export declare const SpecialEffectAnimation: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* 特效配置
|
|
807
|
+
*/
|
|
808
|
+
export declare interface SpecialEffectConfig {
|
|
809
|
+
/**
|
|
810
|
+
* 屏蔽特效开关
|
|
811
|
+
* @default false
|
|
812
|
+
*/
|
|
813
|
+
switchEnabled?: boolean;
|
|
814
|
+
/**
|
|
815
|
+
* 默认是否显示
|
|
816
|
+
* @default true
|
|
817
|
+
*/
|
|
818
|
+
defaultVisible?: boolean;
|
|
819
|
+
/**
|
|
820
|
+
* 特效显示切换回调
|
|
821
|
+
*/
|
|
822
|
+
visibleChangeCallback?: (visible: boolean) => void;
|
|
823
|
+
}
|
|
824
|
+
|
|
731
825
|
export declare const TopingMsgList: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
|
|
732
826
|
|
|
733
827
|
export declare const useChatGlobalProvide: (injectData: ChatGlobalInject) => void;
|
|
734
828
|
|
|
829
|
+
export declare const useOnlySpecialStore: GlobalStoreDefinition<"only-special", {
|
|
830
|
+
canOnlySpecialMsg: ComputedRef<boolean>;
|
|
831
|
+
isOnlySpecialMsg: Ref<boolean>;
|
|
832
|
+
setIsOnlySpecialMsg: (value: boolean) => void;
|
|
833
|
+
toggleOnlySpecialMsg: () => void;
|
|
834
|
+
}>;
|
|
835
|
+
|
|
735
836
|
export declare const useSendMsg: () => {
|
|
736
837
|
sendSpeakMsg: (options: SendSpeakMsgOptions) => Promise<void>;
|
|
737
838
|
sendImageMsg: (options: SendImageMsgOptions) => Promise<void>;
|
|
@@ -741,6 +842,17 @@ export declare const useSendMsg: () => {
|
|
|
741
842
|
sendContentList: (contentList: InputContent[], quoteMsg?: ChatMsgType) => Promise<void>;
|
|
742
843
|
};
|
|
743
844
|
|
|
845
|
+
export declare const useSpecialEffectStore: GlobalStoreDefinition<"special-effect", {
|
|
846
|
+
/** 特效显隐 */
|
|
847
|
+
specialEffectVisible: Ref<boolean>;
|
|
848
|
+
/** 切换特效显隐 */
|
|
849
|
+
toggleSpecialEffect: () => void;
|
|
850
|
+
/** 显示特效 */
|
|
851
|
+
showSpecialEffect: () => void;
|
|
852
|
+
/** 隐藏特效 */
|
|
853
|
+
hideSpecialEffect: () => void;
|
|
854
|
+
}>;
|
|
855
|
+
|
|
744
856
|
export declare const ViewerInputControl: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
745
857
|
|
|
746
858
|
export { }
|