tuikit-atomicx-vue3 3.4.1 → 4.3.0

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.
Files changed (342) hide show
  1. package/.eslintrc.cjs +1 -0
  2. package/dist/baseComp/Modal/Modal.js +431 -23
  3. package/dist/chat/index.d.ts +18 -18
  4. package/dist/components/AudioSetting/AudioMediaControl.js +39 -41
  5. package/dist/components/AudioSetting/AudioSettingTab.js +10 -10
  6. package/dist/components/AudioSetting/MicrophoneSelect.js +8 -8
  7. package/dist/components/AudioSetting/SpeakerSelect.js +9 -9
  8. package/dist/components/AudioSettingPanel/i18n/en-US/index.d.ts +1 -0
  9. package/dist/components/AudioSettingPanel/i18n/en-US/index.js +2 -1
  10. package/dist/components/AudioSettingPanel/i18n/zh-CN/index.d.ts +1 -0
  11. package/dist/components/AudioSettingPanel/i18n/zh-CN/index.js +2 -1
  12. package/dist/components/AudioSettingPanel/index.js +81 -73
  13. package/dist/components/BarrageInput/BarrageInputH5.js +9 -9
  14. package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +3 -3
  15. package/dist/components/BarrageInput/MessageInputState.d.ts +28 -0
  16. package/dist/components/BarrageInput/MessageInputState.js +82 -0
  17. package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
  18. package/dist/components/BarrageInput/TextEditor/EditorCore.js +2 -2
  19. package/dist/components/BarrageInput/TextEditor/index.js +7 -7
  20. package/dist/components/BarrageInput/type.d.ts +17 -0
  21. package/dist/components/BarrageInput/type.js +4 -0
  22. package/dist/components/BarrageInput/utils.d.ts +30 -0
  23. package/dist/components/BarrageInput/utils.js +41 -0
  24. package/dist/components/BarrageList/BarrageList.js +80 -110
  25. package/dist/components/BarrageList/BarrageList.vue.d.ts +0 -29
  26. package/dist/components/BarrageList/BarrageListH5.js +95 -122
  27. package/dist/components/BarrageList/BarrageListH5.vue.d.ts +0 -29
  28. package/dist/components/BarrageList/BarrageListState.d.ts +58 -0
  29. package/dist/components/BarrageList/BarrageListState.js +106 -0
  30. package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.js +16 -24
  31. package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +5 -5
  32. package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.js +48 -73
  33. package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.vue.d.ts +5 -7
  34. package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +70 -76
  35. package/dist/components/BarrageList/Message/TextMessage/TextMessage.vue.d.ts +6 -6
  36. package/dist/components/BarrageList/Message/TextMessage/emoji.d.ts +5 -0
  37. package/dist/components/BarrageList/Message/TextMessage/emoji.js +134 -0
  38. package/dist/components/BarrageList/index.d.ts +0 -36
  39. package/dist/components/CameraButton/index.js +18 -19
  40. package/dist/components/CoGuestPanel/CoGuestPanel.js +60 -60
  41. package/dist/components/CoHostPanel/BattlePanel.js +25 -25
  42. package/dist/components/CoHostPanel/CoHostPanel.js +60 -55
  43. package/dist/components/CoHostPanel/ConfigSettingPanel.js +49 -55
  44. package/dist/components/CoHostPanel/ConnectionPanel.js +129 -120
  45. package/dist/components/CoHostPanel/RecommendHostList.js +39 -36
  46. package/dist/components/CoHostPanel/constants.d.ts +3 -0
  47. package/dist/components/CoHostPanel/constants.js +6 -0
  48. package/dist/components/CoHostPanel/i18n/en-US/index.d.ts +1 -0
  49. package/dist/components/CoHostPanel/i18n/en-US/index.js +2 -1
  50. package/dist/components/CoHostPanel/i18n/zh-CN/index.d.ts +1 -0
  51. package/dist/components/CoHostPanel/i18n/zh-CN/index.js +3 -2
  52. package/dist/components/LiveAudienceList/LiveAudienceList.js +44 -45
  53. package/dist/components/LiveAudienceList/LiveAudienceListH5.js +7 -7
  54. package/dist/components/LiveAudienceList/UserActionMenu.js +57 -64
  55. package/dist/components/LiveList/LiveList.js +23 -23
  56. package/dist/components/LiveList/LiveListH5.js +38 -38
  57. package/dist/components/LiveScenePanel/CameraSettingDialog.js +10 -10
  58. package/dist/components/LiveScenePanel/MaterialItem.js +15 -15
  59. package/dist/components/LiveScenePanel/index.js +4 -4
  60. package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.js +58 -58
  61. package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.js +56 -49
  62. package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.js +6 -6
  63. package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.js +1 -1
  64. package/dist/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.js +46 -43
  65. package/dist/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.js +23 -23
  66. package/dist/components/LiveView/PlayerControl/MultiResolution.js +79 -0
  67. package/dist/components/LiveView/PlayerControl/MultiResolution.vue.d.ts +8 -0
  68. package/dist/components/LiveView/PlayerControl/PlayerControl.js +172 -0
  69. package/dist/components/LiveView/PlayerControl/PlayerControlState.js +263 -0
  70. package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.d.ts +6 -0
  71. package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +131 -0
  72. package/dist/components/{LiveCoreView/i18n/zh-CN → LiveView/i18n/en-US}/index.d.ts +3 -2
  73. package/dist/components/{LiveCoreView → LiveView}/i18n/en-US/index.js +4 -3
  74. package/dist/components/{LiveCoreView/i18n/en-US → LiveView/i18n/zh-CN}/index.d.ts +3 -2
  75. package/dist/components/{LiveCoreView → LiveView}/i18n/zh-CN/index.js +4 -3
  76. package/dist/components/LiveView/index.d.ts +79 -0
  77. package/dist/components/{LiveCoreView → LiveView}/index.js +44 -42
  78. package/dist/components/MessageInput/TextEditor/EditorCore.js +2 -2
  79. package/dist/components/MessageList/MessageList.vue.d.ts +2 -2
  80. package/dist/components/MessageList/index.d.ts +18 -18
  81. package/dist/components/MicButton/index.js +11 -11
  82. package/dist/components/StreamMixer/LocalMixer/MixerControl.js +12 -12
  83. package/dist/components/StreamMixer/LocalMixer/index.js +66 -63
  84. package/dist/components/StreamMixer/index.js +6 -6
  85. package/dist/components/StreamView/Layout/CustomLayout.js +8 -8
  86. package/dist/components/StreamView/Layout/FloatLayout.js +124 -127
  87. package/dist/components/StreamView/Layout/GridLayout.js +5 -5
  88. package/dist/components/StreamView/index.js +25 -33
  89. package/dist/components/StreamView/manager/mediaManager.js +54 -60
  90. package/dist/components/VideoSetting/CameraSelect.js +8 -8
  91. package/dist/components/VideoSetting/VideoMediaControl.js +10 -10
  92. package/dist/components/VideoSetting/VideoPreview.js +9 -9
  93. package/dist/components/VideoSetting/VideoProfile.js +6 -6
  94. package/dist/components/VideoSetting/VideoSettingTab.js +40 -39
  95. package/dist/components/VideoSettingPanel/CameraSelect.js +8 -8
  96. package/dist/components/VideoSettingPanel/VideoPreview.js +1 -1
  97. package/dist/components/VideoSettingPanel/VideoProfile.js +18 -18
  98. package/dist/hooks/useRoomEngine.js +6 -6
  99. package/dist/{index-D88ja_7_.js → index-BfIEeWMg.js} +1767 -1757
  100. package/dist/{index-D-KJvDvy.js → index-DTi1fL-x.js} +460 -457
  101. package/dist/index.js +177 -157
  102. package/dist/report/MetricsKey.d.ts +16 -0
  103. package/dist/report/MetricsKey.js +4 -0
  104. package/dist/report/dataReport.d.ts +12 -0
  105. package/dist/report/dataReport.js +45 -0
  106. package/dist/report/index.d.ts +4 -0
  107. package/dist/report/index.js +6 -0
  108. package/dist/rtc/index.d.ts +6 -81
  109. package/dist/rtc/index.js +53 -52
  110. package/dist/states/BarrageState/BarrageState.d.ts +74 -0
  111. package/dist/states/BarrageState/BarrageState.js +80 -0
  112. package/dist/states/BarrageState/index.d.ts +1 -0
  113. package/dist/states/BarrageState/index.js +5 -0
  114. package/dist/states/{BattleState.d.ts → BattleState/BattleState.d.ts} +10 -11
  115. package/dist/states/BattleState/BattleState.js +203 -0
  116. package/dist/states/BattleState/index.d.ts +1 -0
  117. package/dist/states/BattleState/index.js +4 -0
  118. package/dist/states/CoGuestState.d.ts +24 -94
  119. package/dist/states/CoGuestState.js +297 -189
  120. package/dist/states/CoHostState/CoHostState.d.ts +2 -2
  121. package/dist/states/CoHostState/CoHostState.js +135 -131
  122. package/dist/states/{DeviceState.d.ts → DeviceState/DeviceState.d.ts} +25 -13
  123. package/dist/states/DeviceState/DeviceState.js +314 -0
  124. package/dist/states/DeviceState/index.d.ts +1 -0
  125. package/dist/states/DeviceState/index.js +4 -0
  126. package/dist/states/LiveAudienceState.d.ts +3 -1
  127. package/dist/states/LiveAudienceState.js +106 -63
  128. package/dist/states/{LiveState/index.d.ts → LiveListState/LiveListState.d.ts} +13 -8
  129. package/dist/states/LiveListState/LiveListState.js +285 -0
  130. package/dist/states/LiveListState/index.d.ts +1 -0
  131. package/dist/states/LiveListState/index.js +4 -0
  132. package/dist/states/LiveMonitorState/api/http.js +147 -129
  133. package/dist/states/LiveMonitorState/index.js +67 -62
  134. package/dist/states/LiveSeatState/index.d.ts +46 -11
  135. package/dist/states/LiveSeatState/index.js +34 -15
  136. package/dist/states/LiveSeatState/seatEventManager.d.ts +2 -0
  137. package/dist/states/LiveSeatState/seatEventManager.js +63 -42
  138. package/dist/states/LiveSeatState/seatManager.d.ts +34 -5
  139. package/dist/states/LiveSeatState/seatManager.js +131 -29
  140. package/dist/states/LiveSeatState/store.d.ts +5 -5
  141. package/dist/states/LiveSeatState/store.js +12 -10
  142. package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.js +1 -1
  143. package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.js +1 -1
  144. package/dist/states/LiveSeatState/usePlayStream/index.js +30 -28
  145. package/dist/states/LoginState.js +39 -34
  146. package/dist/states/SeatStore.js +82 -83
  147. package/dist/states/{VideoMixerState.d.ts → VideoMixerState/VideoMixerState.d.ts} +1 -1
  148. package/dist/states/VideoMixerState/VideoMixerState.js +269 -0
  149. package/dist/states/VideoMixerState/index.d.ts +1 -0
  150. package/dist/states/VideoMixerState/index.js +4 -0
  151. package/dist/styles/index.css +1 -1
  152. package/dist/types/audience.d.ts +21 -0
  153. package/dist/types/audience.js +4 -1
  154. package/dist/types/battle.d.ts +75 -3
  155. package/dist/types/battle.js +5 -1
  156. package/dist/types/coGuest.d.ts +72 -5
  157. package/dist/types/coGuest.js +4 -2
  158. package/dist/types/device.d.ts +38 -17
  159. package/dist/types/device.js +10 -8
  160. package/dist/types/index.d.ts +2 -2
  161. package/dist/types/index.js +96 -80
  162. package/dist/types/live.d.ts +36 -21
  163. package/dist/types/live.js +6 -4
  164. package/dist/types/seat.d.ts +23 -4
  165. package/dist/types/seat.js +7 -1
  166. package/dist/utils/eventCenter.d.ts +88 -0
  167. package/dist/utils/eventCenter.js +161 -0
  168. package/package.json +2 -2
  169. package/src/components/AudioSetting/AudioMediaControl.vue +1 -3
  170. package/src/components/AudioSetting/AudioSettingTab.vue +1 -2
  171. package/src/components/AudioSetting/MicrophoneSelect.vue +1 -2
  172. package/src/components/AudioSetting/SpeakerSelect.vue +1 -2
  173. package/src/components/AudioSettingPanel/i18n/en-US/index.ts +1 -0
  174. package/src/components/AudioSettingPanel/i18n/zh-CN/index.ts +1 -0
  175. package/src/components/AudioSettingPanel/index.vue +4 -2
  176. package/src/components/BarrageInput/BarrageInputH5.vue +1 -1
  177. package/src/components/BarrageInput/EmojiPicker/EmojiPicker.vue +1 -1
  178. package/src/components/BarrageInput/MessageInputState.ts +160 -0
  179. package/src/components/BarrageInput/TextEditor/TextEditor.vue +1 -1
  180. package/src/components/BarrageInput/type.ts +26 -0
  181. package/src/components/BarrageInput/utils.ts +45 -0
  182. package/src/components/BarrageList/BarrageList.vue +61 -117
  183. package/src/components/BarrageList/BarrageListH5.vue +75 -159
  184. package/src/components/BarrageList/BarrageListState.ts +223 -0
  185. package/src/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +8 -55
  186. package/src/components/BarrageList/Message/MessageLayout/MessageLayout.vue +19 -44
  187. package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +69 -96
  188. package/src/components/BarrageList/Message/TextMessage/emoji.ts +132 -0
  189. package/src/components/CameraButton/index.vue +0 -1
  190. package/src/components/CoGuestPanel/CoGuestPanel.vue +16 -91
  191. package/src/components/CoHostPanel/BattlePanel.vue +4 -7
  192. package/src/components/CoHostPanel/CoHostPanel.vue +11 -3
  193. package/src/components/CoHostPanel/ConfigSettingPanel.vue +2 -8
  194. package/src/components/CoHostPanel/ConnectionPanel.vue +41 -37
  195. package/src/components/CoHostPanel/RecommendHostList.vue +12 -13
  196. package/src/components/CoHostPanel/constants.ts +3 -0
  197. package/src/components/CoHostPanel/i18n/en-US/index.ts +1 -0
  198. package/src/components/CoHostPanel/i18n/zh-CN/index.ts +2 -1
  199. package/src/components/LiveAudienceList/LiveAudienceList.vue +4 -5
  200. package/src/components/LiveAudienceList/LiveAudienceListH5.vue +2 -2
  201. package/src/components/LiveAudienceList/UserActionMenu.vue +7 -48
  202. package/src/components/LiveList/LiveList.vue +5 -5
  203. package/src/components/LiveList/LiveListH5.vue +6 -6
  204. package/src/components/LiveScenePanel/index.vue +2 -2
  205. package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.vue +10 -15
  206. package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.vue +30 -31
  207. package/src/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue +5 -3
  208. package/src/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue +1 -1
  209. package/src/components/{LiveCoreView → LiveView}/PlayerControl/MultiResolution.vue +9 -3
  210. package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue +10 -2
  211. package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControlState.ts +233 -259
  212. package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.ts +64 -0
  213. package/src/components/{LiveCoreView → LiveView}/i18n/en-US/index.ts +3 -2
  214. package/src/components/{LiveCoreView → LiveView}/i18n/zh-CN/index.ts +3 -2
  215. package/src/components/{LiveCoreView → LiveView}/index.ts +5 -2
  216. package/src/components/{LiveCoreView → LiveView}/index.vue +3 -3
  217. package/src/components/MicButton/index.vue +3 -3
  218. package/src/components/StreamMixer/LocalMixer/index.vue +6 -8
  219. package/src/components/StreamMixer/index.vue +1 -1
  220. package/src/components/StreamView/Layout/CustomLayout.vue +2 -2
  221. package/src/components/StreamView/Layout/FloatLayout.vue +88 -83
  222. package/src/components/StreamView/index.vue +28 -14
  223. package/src/components/StreamView/manager/mediaManager.ts +38 -42
  224. package/src/components/VideoSetting/CameraSelect.vue +1 -2
  225. package/src/components/VideoSetting/VideoMediaControl.vue +1 -1
  226. package/src/components/VideoSetting/VideoPreview.vue +1 -2
  227. package/src/components/VideoSetting/VideoProfile.vue +1 -1
  228. package/src/components/VideoSetting/VideoSettingTab.vue +9 -5
  229. package/src/components/VideoSettingPanel/CameraSelect.vue +1 -2
  230. package/src/components/VideoSettingPanel/VideoProfile.vue +7 -7
  231. package/src/hooks/useRoomEngine.ts +1 -1
  232. package/src/report/MetricsKey.ts +16 -0
  233. package/src/report/dataReport.ts +55 -0
  234. package/src/report/index.ts +7 -0
  235. package/src/rtc/index.ts +8 -10
  236. package/src/types/audience.ts +27 -1
  237. package/src/types/battle.ts +87 -4
  238. package/src/types/coGuest.ts +87 -5
  239. package/src/types/device.ts +41 -16
  240. package/src/types/index.ts +2 -2
  241. package/src/types/live.ts +41 -22
  242. package/src/types/seat.ts +28 -4
  243. package/src/utils/eventCenter.ts +249 -0
  244. package/dist/DialogPortal-CvJcEAsn.js +0 -417
  245. package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.js +0 -23
  246. package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.vue.d.ts +0 -30
  247. package/dist/components/BarrageList/Message/FaceMessage/index.d.ts +0 -3
  248. package/dist/components/BarrageList/Message/FaceMessage/index.js +0 -4
  249. package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +0 -4
  250. package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +0 -16
  251. package/dist/components/BarrageList/Message/GroupTipMessage/index.d.ts +0 -3
  252. package/dist/components/BarrageList/Message/GroupTipMessage/index.js +0 -25
  253. package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +0 -71
  254. package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.vue.d.ts +0 -34
  255. package/dist/components/BarrageList/Message/ImageMessage/index.d.ts +0 -3
  256. package/dist/components/BarrageList/Message/ImageMessage/index.js +0 -4
  257. package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +0 -9
  258. package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.vue.d.ts +0 -2
  259. package/dist/components/BarrageList/Message/MergerMessage/index.d.ts +0 -3
  260. package/dist/components/BarrageList/Message/MergerMessage/index.js +0 -4
  261. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +0 -40
  262. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue.d.ts +0 -54
  263. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +0 -26
  264. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue.d.ts +0 -15
  265. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.d.ts +0 -3
  266. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +0 -4
  267. package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +0 -41
  268. package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue.d.ts +0 -35
  269. package/dist/components/BarrageList/Message/RecalledMessage/index.d.ts +0 -3
  270. package/dist/components/BarrageList/Message/RecalledMessage/index.js +0 -4
  271. package/dist/components/BarrageList/MessageForward/ForwardListItem.js +0 -45
  272. package/dist/components/BarrageList/MessageForward/ForwardListItem.vue.d.ts +0 -17
  273. package/dist/components/BarrageList/MessageForward/MessageForward.js +0 -203
  274. package/dist/components/BarrageList/MessageForward/MessageForward.vue.d.ts +0 -2
  275. package/dist/components/BarrageList/MessageForward/index.d.ts +0 -3
  276. package/dist/components/BarrageList/MessageForward/index.js +0 -4
  277. package/dist/components/LiveCoreView/PlayerControl/MultiResolution.js +0 -78
  278. package/dist/components/LiveCoreView/PlayerControl/MultiResolution.vue.d.ts +0 -2
  279. package/dist/components/LiveCoreView/PlayerControl/PlayerControl.js +0 -168
  280. package/dist/components/LiveCoreView/PlayerControl/PlayerControlState.js +0 -267
  281. package/dist/components/LiveCoreView/PlayerControl/utils/domHelpers.js +0 -99
  282. package/dist/components/LiveCoreView/index.d.ts +0 -4
  283. package/dist/components/StreamView/Layout/MixLayout.js +0 -89
  284. package/dist/components/StreamView/Layout/MixLayout.vue.d.ts +0 -31
  285. package/dist/states/BarrageListState/BarrageListState.d.ts +0 -26
  286. package/dist/states/BarrageListState/BarrageListState.js +0 -122
  287. package/dist/states/BarrageListState/index.d.ts +0 -1
  288. package/dist/states/BarrageListState/index.js +0 -4
  289. package/dist/states/BattleState.js +0 -117
  290. package/dist/states/DeviceState.js +0 -296
  291. package/dist/states/LiveState/index.js +0 -254
  292. package/dist/states/VideoMixerState.js +0 -260
  293. package/src/components/BarrageList/Message/FaceMessage/FaceMessage.vue +0 -43
  294. package/src/components/BarrageList/Message/FaceMessage/index.ts +0 -3
  295. package/src/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue +0 -55
  296. package/src/components/BarrageList/Message/GroupTipMessage/index.ts +0 -3
  297. package/src/components/BarrageList/Message/ImageMessage/ImageMessage.vue +0 -181
  298. package/src/components/BarrageList/Message/ImageMessage/index.ts +0 -3
  299. package/src/components/BarrageList/Message/MergerMessage/MergerMessage.vue +0 -6
  300. package/src/components/BarrageList/Message/MergerMessage/index.ts +0 -3
  301. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +0 -70
  302. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue +0 -40
  303. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/index.ts +0 -3
  304. package/src/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue +0 -82
  305. package/src/components/BarrageList/Message/RecalledMessage/index.ts +0 -3
  306. package/src/components/BarrageList/MessageForward/ForwardListItem.vue +0 -67
  307. package/src/components/BarrageList/MessageForward/MessageForward.vue +0 -388
  308. package/src/components/BarrageList/MessageForward/index.ts +0 -3
  309. package/src/components/StreamView/Layout/MixLayout.vue +0 -144
  310. /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.vue.d.ts +0 -0
  311. /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.vue.d.ts +0 -0
  312. /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.vue.d.ts +0 -0
  313. /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.vue.d.ts +0 -0
  314. /package/dist/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue.d.ts +0 -0
  315. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue.d.ts +0 -0
  316. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue.d.ts +0 -0
  317. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControlState.d.ts +0 -0
  318. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/index.d.ts +0 -0
  319. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/index.js +0 -0
  320. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.d.ts +0 -0
  321. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.js +0 -0
  322. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.d.ts +0 -0
  323. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.js +0 -0
  324. /package/dist/components/{LiveCoreView → LiveView}/i18n/index.d.ts +0 -0
  325. /package/dist/components/{LiveCoreView → LiveView}/i18n/index.js +0 -0
  326. /package/dist/components/{LiveCoreView → LiveView}/index.vue.d.ts +0 -0
  327. /package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.vue +0 -0
  328. /package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.vue +0 -0
  329. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.module.scss +0 -0
  330. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/index.ts +0 -0
  331. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.ts +0 -0
  332. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.ts +0 -0
  333. /package/src/components/{LiveCoreView → LiveView}/assets/img/defeat.png +0 -0
  334. /package/src/components/{LiveCoreView → LiveView}/assets/img/draw.png +0 -0
  335. /package/src/components/{LiveCoreView → LiveView}/assets/img/victory.png +0 -0
  336. /package/src/components/{LiveCoreView → LiveView}/assets/svg/BattleOrdinaryBadge.svg +0 -0
  337. /package/src/components/{LiveCoreView → LiveView}/assets/svg/BattleTopBadge.svg +0 -0
  338. /package/src/components/{LiveCoreView → LiveView}/assets/svg/blueBkg.svg +0 -0
  339. /package/src/components/{LiveCoreView → LiveView}/assets/svg/redBkg.svg +0 -0
  340. /package/src/components/{LiveCoreView → LiveView}/assets/svg/s.svg +0 -0
  341. /package/src/components/{LiveCoreView → LiveView}/assets/svg/v.svg +0 -0
  342. /package/src/components/{LiveCoreView → LiveView}/i18n/index.ts +0 -0
@@ -1,151 +1,124 @@
1
- import { defineComponent as q, useSlots as J, ref as i, provide as Q, watch as w, nextTick as F, onMounted as W, onUnmounted as X, createElementBlock as k, openBlock as d, Fragment as $, createElementVNode as v, createVNode as N, createBlock as z, createCommentVNode as E, normalizeStyle as S, unref as r, withCtx as Y, renderList as Z, resolveDynamicComponent as ee, toDisplayString as O } from "vue";
2
- import te from "../../baseComp/ObserverView/ObserverView.js";
3
- import { throttle as oe } from "../../utils/lodash.js";
4
- import { useScroll as le } from "../../hooks/useScroll.js";
5
- import { Message as se } from "./Message/index.js";
6
- import re from "./MessageForward/MessageForward.js";
7
- import { MessageListContextSymbol as ae } from "./MessageListContext.js";
8
- import { useUIKit as ie } from "@tencentcloud/uikit-base-component-vue3";
1
+ import { defineComponent as K, useSlots as P, ref as i, provide as j, watch as N, nextTick as J, onMounted as Q, onUnmounted as R, createElementBlock as x, openBlock as p, normalizeStyle as _, createElementVNode as k, createBlock as q, createCommentVNode as w, Fragment as W, renderList as X, unref as r, resolveDynamicComponent as Y, toDisplayString as D } from "vue";
2
+ import { useUIKit as Z } from "@tencentcloud/uikit-base-component-vue3";
3
+ import { useScroll as ee } from "../../hooks/useScroll.js";
4
+ import { useLoginState as te } from "../../states/LoginState.js";
5
+ import { throttle as se } from "../../utils/lodash.js";
6
+ import { useBarrageListState as oe } from "./BarrageListState.js";
9
7
  import ne from "./ClickAction/UserActionMenu.js";
10
- import { useLoginState as ue } from "../../states/LoginState.js";
11
- import { useLiveState as ce } from "../../states/LiveState/index.js";
12
- import { useBarrageListState as ve } from "../../states/BarrageListState/BarrageListState.js";
13
- import { _ as me } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
14
- const fe = { class: "message-chunk" }, de = {
8
+ import { Message as le } from "./Message/index.js";
9
+ import { MessageListContextSymbol as re } from "./MessageListContext.js";
10
+ import { useLiveListState as ae } from "../../states/LiveListState/LiveListState.js";
11
+ import { _ as ie } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
12
+ const ue = { class: "message-chunk" }, ce = {
15
13
  key: 0,
16
14
  class: "message-group-tip"
17
- }, pe = { class: "message-group-tip-name" }, ge = { class: "message-group-tip-action" }, C = 150, he = /* @__PURE__ */ q({
15
+ }, ve = { class: "message-group-tip-name" }, me = { class: "message-group-tip-action" }, T = 150, de = /* @__PURE__ */ K({
18
16
  __name: "BarrageListH5",
19
17
  props: {
20
- messageAggregationTime: { default: 5 * 60 },
21
- filter: { type: Function, default: void 0 },
22
18
  Message: { default: void 0 },
23
- MessageTimeDivider: { default: void 0 },
24
- LocalNoticeMessage: { default: void 0 },
25
19
  containerStyle: {},
26
20
  itemStyle: {},
27
21
  height: {},
28
22
  style: {}
29
23
  },
30
- setup(U) {
31
- const { t: L } = ie(), m = U, V = J(), { loginUserInfo: T } = ue(), { currentLive: G } = ce(), c = i({}), x = i(!1), H = i({}), I = i(null), K = (o) => {
32
- if (!e.value)
24
+ setup(F) {
25
+ const { t: B } = Z(), c = F, O = P(), { loginUserInfo: I } = te(), { currentLive: M } = ae(), u = i(), C = i(!1), b = i({}), A = i(null), L = i(!1), g = i(!1), h = i(0), o = i(null), { messageList: y, messageGroupTip: v } = oe(), { scrollToBottom: E } = ee(), V = (e) => {
26
+ if (!o.value)
33
27
  return {
34
28
  position: "fixed",
35
- top: `${o.bottom + 5}px`,
36
- left: `${o.left}px`,
29
+ top: `${e.bottom + 5}px`,
30
+ left: `${e.left}px`,
37
31
  zIndex: 1e3
38
32
  };
39
- const t = e.value.getBoundingClientRect(), l = 120, s = 10, n = 5;
40
- let a = o.bottom + n;
41
- return a + l > t.bottom - s && (a = o.top - l - n), a < t.top + s && (a = t.top + s), {
33
+ const t = o.value.getBoundingClientRect(), s = 120, n = 10, a = 5;
34
+ let l = e.bottom + a;
35
+ return l + s > t.bottom - n && (l = e.top - s - a), l < t.top + n && (l = t.top + n), {
42
36
  position: "fixed",
43
- top: `${a}px`,
44
- left: `${o.left}px`,
37
+ top: `${l}px`,
38
+ left: `${e.left}px`,
45
39
  zIndex: 1e3
46
40
  };
47
41
  };
48
- Q(ae, {
49
- slots: V,
50
- nickClick: (o) => {
51
- var u, A, D;
52
- const { message: t, event: l } = o, s = ((u = T.value) == null ? void 0 : u.userId) === ((A = G.value) == null ? void 0 : A.liveOwner.userId), n = ((D = T.value) == null ? void 0 : D.userId) === t.from;
53
- if (!s || n)
42
+ j(re, {
43
+ slots: O,
44
+ nickClick: (e) => {
45
+ var m, d, f;
46
+ const { message: t, event: s } = e, n = ((m = I.value) == null ? void 0 : m.userId) === ((d = M.value) == null ? void 0 : d.liveOwner.userId), a = ((f = I.value) == null ? void 0 : f.userId) === t.sender.userId;
47
+ if (!n || a)
54
48
  return;
55
- c.value = t, I.value = l.currentTarget;
56
- const a = l.currentTarget.getBoundingClientRect();
57
- H.value = K(a), x.value = !0;
49
+ u.value = t, A.value = s.currentTarget;
50
+ const l = s.currentTarget.getBoundingClientRect();
51
+ b.value = V(l), C.value = !0;
58
52
  }
59
53
  });
60
- const p = i(!1), g = i(!1), h = i(0), y = i(!1), e = i(null), { messageGroupTip: f, messageList: _, loadMoreMessage: P, currentConversationID: R } = ve(), { scrollToBottom: M } = le(), B = oe(() => {
61
- e.value && (h.value = e.value.scrollHeight - e.value.scrollTop - e.value.clientHeight, h.value > C && (g.value = !0), h.value < C && (g.value = !1));
62
- }, 100), b = async () => {
63
- p.value = !1, g.value = !1;
64
- }, j = async () => {
65
- var t;
66
- if (!p.value || y.value || !((t = _.value) != null && t.length))
67
- return;
68
- if (y.value = !0, !e.value) {
69
- y.value = !1;
70
- return;
71
- }
72
- const o = e.value.scrollHeight - e.value.scrollTop - e.value.clientHeight;
73
- if (await P(), await F(), e.value) {
74
- const l = e.value.scrollHeight - e.value.clientHeight - o;
75
- e.value.scrollTop = Math.max(
76
- 0,
77
- Math.min(e.value.scrollHeight - e.value.clientHeight, l)
78
- );
79
- }
80
- y.value = !1;
54
+ const $ = se(() => {
55
+ o.value && (h.value = o.value.scrollHeight - o.value.scrollTop - o.value.clientHeight, h.value > T && (g.value = !0), h.value < T && (g.value = !1));
56
+ }, 100), H = async () => {
57
+ L.value = !1, g.value = !1;
58
+ };
59
+ N(() => {
60
+ var e;
61
+ return (e = M.value) == null ? void 0 : e.liveId;
62
+ }, () => {
63
+ H();
64
+ }), N(() => {
65
+ var e;
66
+ return (e = y.value) == null ? void 0 : e.length;
67
+ }, (e) => {
68
+ var n;
69
+ const t = y.value[e - 1], s = y.value[e - 2];
70
+ s === void 0 && t && !L.value && J(() => {
71
+ E({ behavior: "instant" }), L.value = !0;
72
+ }), !(!s || !t || !e) && (t == null ? void 0 : t.sequence) !== (s == null ? void 0 : s.sequence) && (t.sender.userId === ((n = I.value) == null ? void 0 : n.userId) || !g.value && h.value < T) && E({ behavior: "smooth" });
73
+ });
74
+ const G = () => {
75
+ const e = document.activeElement;
76
+ e && typeof e.blur == "function" && e.blur();
81
77
  };
82
- return w(R, () => {
83
- b();
84
- }), w(_, (o, t) => {
85
- if (t === void 0 && o && !p.value && F(() => {
86
- M({ behavior: "instant" }), p.value = !0;
87
- }), !t || !o || !o.length)
88
- return;
89
- const l = o[o.length - 1], s = t[t.length - 1];
90
- (l == null ? void 0 : l.ID) !== (s == null ? void 0 : s.ID) && (l.flow === "out" || !g.value && h.value < C) && M({ behavior: "smooth" });
91
- }), W(() => {
92
- e.value && e.value.addEventListener("scroll", B), b();
93
- }), X(() => {
94
- e.value && e.value.removeEventListener("scroll", B);
95
- }), (o, t) => {
96
- var l, s, n, a;
97
- return d(), k($, null, [
98
- v("div", {
99
- class: "message-list",
100
- style: S({ height: m.height, ...m.style })
78
+ return Q(() => {
79
+ o.value && o.value.addEventListener("scroll", $), H();
80
+ }), R(() => {
81
+ o.value && o.value.removeEventListener("scroll", $);
82
+ }), (e, t) => {
83
+ var s, n, a, l, m, d, f, U, z;
84
+ return p(), x("div", {
85
+ class: "message-list",
86
+ style: _({ height: c.height, ...c.style })
87
+ }, [
88
+ k("div", {
89
+ id: "messageScrollList",
90
+ ref_key: "scrollContainer",
91
+ ref: o,
92
+ class: "message-list-container",
93
+ style: _(c.containerStyle),
94
+ onTouchstart: G
101
95
  }, [
102
- v("div", {
103
- id: "messageScrollList",
104
- ref_key: "scrollContainer",
105
- ref: e,
106
- class: "message-list-container",
107
- style: S(m.containerStyle)
108
- }, [
109
- N(r(te), {
110
- root: "#messageScrollList",
111
- rootMargin: "50px 0px 0px 0px",
112
- threshold: 0.1,
113
- onOnShow: j
114
- }, {
115
- default: Y(() => [...t[1] || (t[1] = [
116
- v("div", { id: "loadMore" }, null, -1)
117
- ])]),
118
- _: 1
119
- }),
120
- v("div", fe, [
121
- (d(!0), k($, null, Z(r(_), (u) => (d(), z(ee(m.Message || r(se)), {
122
- key: u.ID + u.isRevoked + u.status,
123
- class: "message-item",
124
- style: S(m.itemStyle),
125
- message: u,
126
- "is-last-in-chunk": !0
127
- }, null, 8, ["style", "message"]))), 128))
128
- ])
129
- ], 4),
130
- r(f) ? (d(), k("div", de, [
131
- v("div", pe, O(((l = r(f)) == null ? void 0 : l.nameCard) || ((s = r(f)) == null ? void 0 : s.userName) || ((n = r(f)) == null ? void 0 : n.userId)), 1),
132
- v("div", ge, O(((a = r(f)) == null ? void 0 : a.displayAction) === "enter" ? r(L)("Come in") : r(L)("Leave")), 1)
133
- ])) : E("", !0)
134
- ], 4),
135
- N(r(re)),
136
- x.value ? (d(), z(ne, {
96
+ k("div", ue, [
97
+ (p(!0), x(W, null, X(r(y), (S) => (p(), q(Y(c.Message || r(le)), {
98
+ key: S.sequence + S.timestampInSecond,
99
+ style: _(c.itemStyle),
100
+ message: S,
101
+ "is-last-in-chunk": !0
102
+ }, null, 8, ["style", "message"]))), 128))
103
+ ]),
104
+ r(v) ? (p(), x("div", ce, [
105
+ k("div", ve, D(((s = r(v)) == null ? void 0 : s.nameCard) || ((n = r(v)) == null ? void 0 : n.userName) || ((a = r(v)) == null ? void 0 : a.userId)), 1),
106
+ k("div", me, D(((l = r(v)) == null ? void 0 : l.displayAction) === "enter" ? r(B)("Come in") : r(B)("Leave")), 1)
107
+ ])) : w("", !0)
108
+ ], 36),
109
+ C.value && u.value ? (p(), q(ne, {
137
110
  key: 0,
138
- "user-id": c.value.from,
139
- "user-name": c.value.nameCard || c.value.nick || c.value.from,
140
- "avatar-url": c.value.avatar,
141
- style: S(H.value),
142
- "click-target": I.value,
143
- onClose: t[0] || (t[0] = (u) => x.value = !1)
144
- }, null, 8, ["user-id", "user-name", "avatar-url", "style", "click-target"])) : E("", !0)
145
- ], 64);
111
+ "user-id": (m = u.value) == null ? void 0 : m.sender.userId,
112
+ "user-name": ((d = u.value) == null ? void 0 : d.sender.nameCard) || ((f = u.value) == null ? void 0 : f.sender.userName) || ((U = u.value) == null ? void 0 : U.sender.userId),
113
+ "avatar-url": (z = u.value) == null ? void 0 : z.sender.avatarUrl,
114
+ style: _(b.value),
115
+ "click-target": A.value,
116
+ onClose: t[0] || (t[0] = (S) => C.value = !1)
117
+ }, null, 8, ["user-id", "user-name", "avatar-url", "style", "click-target"])) : w("", !0)
118
+ ], 4);
146
119
  };
147
120
  }
148
- }), Ae = /* @__PURE__ */ me(he, [["__scopeId", "data-v-2787bca3"]]);
121
+ }), xe = /* @__PURE__ */ ie(de, [["__scopeId", "data-v-c0c678f4"]]);
149
122
  export {
150
- Ae as default
123
+ xe as default
151
124
  };
@@ -1,47 +1,18 @@
1
1
  import { Component, CSSProperties } from 'vue';
2
- import { IMessageModel } from '@tencentcloud/chat-uikit-engine';
3
2
 
4
3
  interface IMessageListProps {
5
- /** message actions e.g. recall, delete, etc. */
6
- /** max time between message group */
7
- messageAggregationTime?: number | undefined;
8
- /** custom filter function */
9
- filter?: ((message: IMessageModel) => boolean) | undefined;
10
- /** custom message component */
11
4
  Message?: Component | undefined;
12
- /** custom message timeline component */
13
- MessageTimeDivider?: Component | undefined;
14
- /** custom local notification message component */
15
- LocalNoticeMessage?: Component | undefined;
16
5
  containerStyle?: CSSProperties | undefined;
17
6
  itemStyle?: CSSProperties | undefined;
18
7
  height?: string;
19
8
  style?: CSSProperties;
20
9
  }
21
10
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IMessageListProps>, {
22
- /** props */
23
- filter: undefined;
24
- enableReadReceipt: boolean;
25
- messageAggregationTime: number;
26
- /** custom components */
27
11
  Message: undefined;
28
- MessageTimeDivider: undefined;
29
- LocalNoticeMessage: undefined;
30
12
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IMessageListProps>, {
31
- /** props */
32
- filter: undefined;
33
- enableReadReceipt: boolean;
34
- messageAggregationTime: number;
35
- /** custom components */
36
13
  Message: undefined;
37
- MessageTimeDivider: undefined;
38
- LocalNoticeMessage: undefined;
39
14
  }>>> & Readonly<{}>, {
40
- filter: (message: IMessageModel) => boolean;
41
15
  Message: Component;
42
- messageAggregationTime: number;
43
- MessageTimeDivider: Component;
44
- LocalNoticeMessage: Component;
45
16
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
46
17
  export default _default;
47
18
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -0,0 +1,58 @@
1
+ import { Barrage } from '../../states/BarrageState';
2
+
3
+ interface IMessageGroupTip {
4
+ avatarUrl: string;
5
+ nameCard: string;
6
+ roomCustomInfo: Record<string, any>;
7
+ userId: string;
8
+ userName: string;
9
+ userRole: number;
10
+ displayAction: 'enter' | 'leave';
11
+ }
12
+ declare function useBarrageListState(): {
13
+ messageList: import('vue').Ref<{
14
+ messageType: import('../../states/BarrageState').BarrageType;
15
+ textContent?: string | undefined;
16
+ extensionInfo?: (Record<string, string> | null) | undefined;
17
+ businessId?: string | undefined;
18
+ data?: string | undefined;
19
+ liveId: string;
20
+ sender: {
21
+ userId: string;
22
+ userName: string;
23
+ nameCard: string;
24
+ avatarUrl: string;
25
+ userRole: import('@tencentcloud/tuiroom-engine-js').TUIRole;
26
+ hasAudioStream: boolean;
27
+ hasVideoStream: boolean;
28
+ hasScreenStream: boolean;
29
+ isMessageDisabled: boolean;
30
+ roomCustomInfo: Record<string, any>;
31
+ };
32
+ sequence: number;
33
+ timestampInSecond: number;
34
+ }[], Barrage[] | {
35
+ messageType: import('../../states/BarrageState').BarrageType;
36
+ textContent?: string | undefined;
37
+ extensionInfo?: (Record<string, string> | null) | undefined;
38
+ businessId?: string | undefined;
39
+ data?: string | undefined;
40
+ liveId: string;
41
+ sender: {
42
+ userId: string;
43
+ userName: string;
44
+ nameCard: string;
45
+ avatarUrl: string;
46
+ userRole: import('@tencentcloud/tuiroom-engine-js').TUIRole;
47
+ hasAudioStream: boolean;
48
+ hasVideoStream: boolean;
49
+ hasScreenStream: boolean;
50
+ isMessageDisabled: boolean;
51
+ roomCustomInfo: Record<string, any>;
52
+ };
53
+ sequence: number;
54
+ timestampInSecond: number;
55
+ }[]>;
56
+ messageGroupTip: import('vue').Ref<IMessageGroupTip | undefined, IMessageGroupTip | undefined>;
57
+ };
58
+ export { useBarrageListState };
@@ -0,0 +1,106 @@
1
+ import { ref as o, watch as d, onUnmounted as M } from "vue";
2
+ import { TUIRoomEvents as m } from "@tencentcloud/tuiroom-engine-js";
3
+ import { useRoomEngine as S } from "../../hooks/useRoomEngine.js";
4
+ import { useLiveListState as T } from "../../states/LiveListState/LiveListState.js";
5
+ import { useBarrageState as _ } from "../../states/BarrageState/BarrageState.js";
6
+ const n = S(), { currentLive: C } = T(), { messageList: f } = _(), v = o(), i = o([]), g = o(0), r = o([]), c = o(!1), a = o([]), p = o(!1), E = 1e3, G = 2e3, A = 1e3, L = 20, w = 10;
7
+ let l = null, u = null;
8
+ const h = () => {
9
+ n.instance && l && (n.instance.off(m.onRemoteUserEnterRoom, l), l = null), n.instance && u && (n.instance.off(m.onRemoteUserLeaveRoom, u), u = null);
10
+ }, P = (e) => {
11
+ if (e.length <= E)
12
+ return e;
13
+ const t = e.length - E;
14
+ return e.slice(t);
15
+ }, Q = async () => {
16
+ if (!(c.value || r.value.length === 0)) {
17
+ c.value = !0;
18
+ try {
19
+ let e = [];
20
+ for (; r.value.length > 0; ) {
21
+ const t = r.value.splice(0, 1)[0];
22
+ e.push(...t);
23
+ const s = [...i.value || [], ...e];
24
+ i.value = P(s), e = [], r.value.length > 0 && await new Promise((U) => setTimeout(U, A));
25
+ }
26
+ } finally {
27
+ c.value = !1;
28
+ }
29
+ }
30
+ }, y = (e) => {
31
+ const t = e.slice(g.value);
32
+ if (g.value = e.length, t.length === 0) {
33
+ i.value = e;
34
+ return;
35
+ }
36
+ for (let s = 0; s < t.length; s += L)
37
+ r.value.push(t.slice(s, s + L));
38
+ Q();
39
+ }, N = async () => {
40
+ if (!(p.value || a.value.length === 0)) {
41
+ p.value = !0;
42
+ try {
43
+ for (; a.value.length > 0; ) {
44
+ const e = a.value.splice(0, 1)[0];
45
+ v.value = e, await new Promise((t) => {
46
+ setTimeout(t, G);
47
+ }), v.value = void 0;
48
+ }
49
+ } catch (e) {
50
+ console.error("[BarrageListState] processMessageGroupTipQueue error", e);
51
+ } finally {
52
+ p.value = !1;
53
+ }
54
+ }
55
+ }, R = (e) => {
56
+ a.value.push(e), a.value.length > w && (a.value = a.value.slice(-2)), N();
57
+ }, B = () => {
58
+ var e, t;
59
+ h(), l = ({ userInfo: s }) => {
60
+ R({
61
+ avatarUrl: s.avatarUrl,
62
+ nameCard: s.nameCard,
63
+ roomCustomInfo: s.roomCustomInfo,
64
+ userId: s.userId,
65
+ userName: s.userName,
66
+ userRole: s.userRole,
67
+ displayAction: "enter"
68
+ });
69
+ }, u = ({ userInfo: s }) => {
70
+ R({
71
+ avatarUrl: s.avatarUrl,
72
+ nameCard: s.nameCard,
73
+ roomCustomInfo: s.roomCustomInfo,
74
+ userId: s.userId,
75
+ userName: s.userName,
76
+ userRole: s.userRole,
77
+ displayAction: "leave"
78
+ });
79
+ }, l && ((e = n.instance) == null || e.on(m.onRemoteUserEnterRoom, l)), u && ((t = n.instance) == null || t.on(m.onRemoteUserLeaveRoom, u));
80
+ };
81
+ d(() => f.value.length, (e) => {
82
+ e > 0 && y(f.value);
83
+ }, {
84
+ immediate: !0
85
+ });
86
+ const O = () => {
87
+ i.value = [], g.value = 0, r.value = [], c.value = !1, v.value = void 0, a.value = [];
88
+ };
89
+ d(() => {
90
+ var e;
91
+ return (e = C.value) == null ? void 0 : e.liveId;
92
+ }, (e, t) => {
93
+ !e && t ? O() : B();
94
+ });
95
+ M(() => {
96
+ h();
97
+ });
98
+ function Y() {
99
+ return {
100
+ messageList: i,
101
+ messageGroupTip: v
102
+ };
103
+ }
104
+ export {
105
+ Y as useBarrageListState
106
+ };
@@ -1,37 +1,29 @@
1
- import { defineComponent as f, toRefs as _, computed as n, createElementBlock as i, openBlock as l, normalizeClass as b, unref as e, createCommentVNode as v, renderSlot as E, toDisplayString as I } from "vue";
2
- import r from "@tencentcloud/chat-uikit-engine";
3
- import { c as M } from "../../../../../index-DPczIrgX.js";
4
- import { useUIKit as k } from "@tencentcloud/uikit-base-component-vue3";
5
- import { useBarrageListState as S } from "../../../../../states/BarrageListState/BarrageListState.js";
6
- import { _ as C } from "../../../../../_plugin-vue_export-helper-CHgC5LLL.js";
7
- const y = {
8
- key: 0,
9
- class: "has-risk-content"
10
- }, B = /* @__PURE__ */ f({
1
+ import { defineComponent as c, toRefs as f, createElementBlock as m, openBlock as d, normalizeClass as i, unref as e, renderSlot as p } from "vue";
2
+ import { c as b } from "../../../../../index-DPczIrgX.js";
3
+ import { useLoginState as _ } from "../../../../../states/LoginState.js";
4
+ import { _ as g } from "../../../../../_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const I = /* @__PURE__ */ c({
11
6
  __name: "MessageBubble",
12
7
  props: {
13
8
  message: { default: () => ({}) },
14
9
  isLastInChunk: { type: Boolean, default: !1 }
15
10
  },
16
- setup(c) {
17
- const { t: u } = k(), t = [r.TYPES.MSG_IMAGE, r.TYPES.MSG_VIDEO], m = c, { message: s, isLastInChunk: d } = _(m), { highlightMessageIDList: p } = S(), g = n(() => t.includes(s.value.type)), o = n(() => p.value.includes(s.value.ID)), { flow: a } = s.value;
18
- return (h, D) => (l(), i("div", {
19
- class: b([
11
+ setup(t) {
12
+ var o;
13
+ const { loginUserInfo: a } = _(), n = t, { message: r, isLastInChunk: l } = f(n), s = r.value.sender.userId === ((o = a.value) == null ? void 0 : o.userId) ? "in" : "out";
14
+ return (u, v) => (d(), m("div", {
15
+ class: i([
20
16
  "message-bubble",
21
- e(M)({
22
- [`bubble-${e(a)}`]: e(a) && !0,
23
- "all-round-radius": !e(d),
24
- "no-background": t.includes(e(s).type),
25
- "highlight--normal": o.value,
26
- "highlight--media": o.value && g.value
17
+ e(b)({
18
+ [`bubble-${e(s)}`]: e(s) && !0,
19
+ "all-round-radius": !e(l)
27
20
  })
28
21
  ])
29
22
  }, [
30
- e(s).hasRiskContent ? (l(), i("div", y, I(e(u)("This message contains risky content")), 1)) : v("", !0),
31
- E(h.$slots, "default", {}, void 0, !0)
23
+ p(u.$slots, "default", {}, void 0, !0)
32
24
  ], 2));
33
25
  }
34
- }), x = /* @__PURE__ */ C(B, [["__scopeId", "data-v-2548c596"]]);
26
+ }), L = /* @__PURE__ */ g(I, [["__scopeId", "data-v-c2f22426"]]);
35
27
  export {
36
- x as default
28
+ L as default
37
29
  };
@@ -1,20 +1,20 @@
1
- import { IMessageModel } from '@tencentcloud/chat-uikit-engine';
1
+ import { Barrage } from '../../../../../states/BarrageState';
2
2
 
3
3
  interface IMessageBubbleProps {
4
- message: IMessageModel;
4
+ message: Barrage;
5
5
  isLastInChunk: boolean;
6
6
  }
7
7
  declare function __VLS_template(): {
8
8
  default?(_: {}): any;
9
9
  };
10
10
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IMessageBubbleProps>, {
11
- message: () => IMessageModel;
11
+ message: () => Barrage;
12
12
  isLastInChunk: boolean;
13
13
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IMessageBubbleProps>, {
14
- message: () => IMessageModel;
14
+ message: () => Barrage;
15
15
  isLastInChunk: boolean;
16
16
  }>>> & Readonly<{}>, {
17
- message: IMessageModel;
17
+ message: Barrage;
18
18
  isLastInChunk: boolean;
19
19
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
20
20
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;