@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 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-svga-animation' | 'donate-animation';
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
  */
@@ -287,6 +298,8 @@ export declare interface ChatGlobalInject {
287
298
  interceptClick?: (triggerSource: InterceptTriggerSource) => boolean | Promise<boolean>;
288
299
  }
289
300
 
301
+ export declare const ChatLike: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
302
+
290
303
  export declare const ChatMessageInputPopup: DefineComponent< {}, {
291
304
  showInputPopup: typeof showInputPopup;
292
305
  closeInputPopup: typeof closeInputPopup;
@@ -326,8 +339,6 @@ declare interface DonateConfig {
326
339
  getSvgaUrl?: (chatMsg: ChatMsgRewardType) => Promise<string | undefined> | string | undefined;
327
340
  }
328
341
 
329
- export declare const DonateSvgaAnimation: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
330
-
331
342
  /**
332
343
  * 文字类型,normal-普通文字,nickname-用户昵称,productName-商品名称
333
344
  */
@@ -398,14 +409,41 @@ export declare interface InputContentText {
398
409
  * click-message-input: 消息输入框
399
410
  * focus-message-input: 聚焦输入框
400
411
  * click-submit: 点击提交按钮
412
+ * chat-like: 点赞
401
413
  */
402
- export declare type InterceptTriggerSource = 'send-image' | 'emotion-picker' | 'chat-quote' | 'more-panel' | 'click-message-input' | 'focus-message-input' | 'click-submit';
414
+ export declare type InterceptTriggerSource = 'send-image' | 'emotion-picker' | 'chat-quote' | 'more-panel' | 'click-message-input' | 'focus-message-input' | 'click-submit' | 'chat-like';
403
415
 
404
416
  export declare const KickList: DefineComponent< {}, {
405
417
  openKickList: () => void;
406
418
  closeKickList: () => void;
407
419
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
408
420
 
421
+ /**
422
+ * 点赞配置
423
+ */
424
+ declare interface LikeConfig {
425
+ /**
426
+ * 点击开关
427
+ * @default true
428
+ */
429
+ clickEnabled?: boolean;
430
+ /**
431
+ * 按住开关
432
+ * @default true
433
+ */
434
+ holdEnabled?: boolean;
435
+ /**
436
+ * 数量位置
437
+ * @default 'bottom'
438
+ */
439
+ countPosition?: 'top' | 'bottom';
440
+ /**
441
+ * 触发节点大小
442
+ * @default 40
443
+ */
444
+ triggerSize?: number;
445
+ }
446
+
409
447
  /**
410
448
  * 管理配置
411
449
  */
@@ -499,7 +537,7 @@ export declare interface MessageConfig {
499
537
  */
500
538
  hideSources?: ChatMsgSource[];
501
539
  /**
502
- * 隐藏消息处理
540
+ * 隐藏消息处理,返回 true 时消息隐藏
503
541
  * @default {}
504
542
  */
505
543
  hideMessage?: {
@@ -556,6 +594,16 @@ export declare interface MessageConfig {
556
594
  top: number;
557
595
  bottom: number;
558
596
  };
597
+ /**
598
+ * 消息容器边界阴影配置
599
+ * @default { topHeight: 0 }
600
+ */
601
+ messageContainerBoundaryShadow?: {
602
+ /**
603
+ * 顶部阴影高度
604
+ */
605
+ topHeight?: number;
606
+ };
559
607
  /**
560
608
  * 鼠标悬停高亮
561
609
  * @default false
@@ -610,6 +658,12 @@ export declare interface MessageConfig {
610
658
  * @default false
611
659
  */
612
660
  autoTranslateEnabled?: boolean;
661
+ /**
662
+ * 是否隐藏滚动条
663
+ * @description 滚动条消失,但滚动仍然可用
664
+ * @default false
665
+ */
666
+ hideScrollbar?: boolean;
613
667
  }
614
668
 
615
669
  /**
@@ -653,6 +707,10 @@ export declare interface MessageEffectData {
653
707
  * 字符串模板
654
708
  */
655
709
  strTemplate: string;
710
+ /**
711
+ * 背景色
712
+ */
713
+ bgColor?: string;
656
714
  }
657
715
 
658
716
  /**
@@ -726,12 +784,57 @@ export declare interface OnlineConfig {
726
784
  onlineCountCallback?: (count: number) => void;
727
785
  }
728
786
 
787
+ export declare const RunwayEffect: DefineComponent< {
788
+ left: VueTypeValidableDef<number, ValidatorFunction<number>> & {
789
+ default: number;
790
+ } & {
791
+ default: number;
792
+ };
793
+ }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {
794
+ left: VueTypeValidableDef<number, ValidatorFunction<number>> & {
795
+ default: number;
796
+ } & {
797
+ default: number;
798
+ };
799
+ }>>, {
800
+ left: number;
801
+ }>;
802
+
729
803
  declare function showInputPopup(): void;
730
804
 
805
+ export declare const SpecialEffectAnimation: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
806
+
807
+ /**
808
+ * 特效配置
809
+ */
810
+ export declare interface SpecialEffectConfig {
811
+ /**
812
+ * 屏蔽特效开关
813
+ * @default false
814
+ */
815
+ switchEnabled?: boolean;
816
+ /**
817
+ * 默认是否显示
818
+ * @default true
819
+ */
820
+ defaultVisible?: boolean;
821
+ /**
822
+ * 特效显示切换回调
823
+ */
824
+ visibleChangeCallback?: (visible: boolean) => void;
825
+ }
826
+
731
827
  export declare const TopingMsgList: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
732
828
 
733
829
  export declare const useChatGlobalProvide: (injectData: ChatGlobalInject) => void;
734
830
 
831
+ export declare const useOnlySpecialStore: GlobalStoreDefinition<"only-special", {
832
+ canOnlySpecialMsg: ComputedRef<boolean>;
833
+ isOnlySpecialMsg: Ref<boolean>;
834
+ setIsOnlySpecialMsg: (value: boolean) => void;
835
+ toggleOnlySpecialMsg: () => void;
836
+ }>;
837
+
735
838
  export declare const useSendMsg: () => {
736
839
  sendSpeakMsg: (options: SendSpeakMsgOptions) => Promise<void>;
737
840
  sendImageMsg: (options: SendImageMsgOptions) => Promise<void>;
@@ -741,6 +844,17 @@ export declare const useSendMsg: () => {
741
844
  sendContentList: (contentList: InputContent[], quoteMsg?: ChatMsgType) => Promise<void>;
742
845
  };
743
846
 
847
+ export declare const useSpecialEffectStore: GlobalStoreDefinition<"special-effect", {
848
+ /** 特效显隐 */
849
+ specialEffectVisible: Ref<boolean>;
850
+ /** 切换特效显隐 */
851
+ toggleSpecialEffect: () => void;
852
+ /** 显示特效 */
853
+ showSpecialEffect: () => void;
854
+ /** 隐藏特效 */
855
+ hideSpecialEffect: () => void;
856
+ }>;
857
+
744
858
  export declare const ViewerInputControl: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
745
859
 
746
860
  export { }