tuikit-atomicx-vue3 3.4.2 → 3.5.0-beta.7

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 (491) hide show
  1. package/.eslintrc.cjs +1 -0
  2. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D1G-LitO.js → MessageInput.vue_vue_type_script_setup_true_lang-jPzZ5INK.js} +38 -36
  3. package/dist/baseComp/Modal/Modal.js +431 -23
  4. package/dist/chat/index.d.ts +68 -53
  5. package/dist/chat/server.js +15 -15
  6. package/dist/components/AudioSetting/AudioMediaControl.js +39 -41
  7. package/dist/components/AudioSetting/AudioSettingTab.js +10 -10
  8. package/dist/components/AudioSetting/MicrophoneSelect.js +8 -8
  9. package/dist/components/AudioSetting/SpeakerSelect.js +9 -9
  10. package/dist/components/AudioSettingPanel/i18n/en-US/index.d.ts +1 -0
  11. package/dist/components/AudioSettingPanel/i18n/en-US/index.js +2 -1
  12. package/dist/components/AudioSettingPanel/i18n/zh-CN/index.d.ts +1 -0
  13. package/dist/components/AudioSettingPanel/i18n/zh-CN/index.js +2 -1
  14. package/dist/components/AudioSettingPanel/index.js +81 -73
  15. package/dist/components/BarrageInput/BarrageInputH5.js +9 -9
  16. package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +3 -3
  17. package/dist/components/BarrageInput/MessageInputState.d.ts +28 -0
  18. package/dist/components/BarrageInput/MessageInputState.js +82 -0
  19. package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
  20. package/dist/components/BarrageInput/TextEditor/EditorCore.js +5 -4
  21. package/dist/components/BarrageInput/TextEditor/index.js +7 -7
  22. package/dist/components/BarrageInput/type.d.ts +17 -0
  23. package/dist/components/BarrageInput/type.js +4 -0
  24. package/dist/components/BarrageInput/utils.d.ts +30 -0
  25. package/dist/components/BarrageInput/utils.js +41 -0
  26. package/dist/components/BarrageList/BarrageList.js +80 -110
  27. package/dist/components/BarrageList/BarrageList.vue.d.ts +0 -29
  28. package/dist/components/BarrageList/BarrageListH5.js +95 -122
  29. package/dist/components/BarrageList/BarrageListH5.vue.d.ts +0 -29
  30. package/dist/components/BarrageList/BarrageListState.d.ts +58 -0
  31. package/dist/components/BarrageList/BarrageListState.js +106 -0
  32. package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.js +16 -24
  33. package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +5 -5
  34. package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.js +48 -73
  35. package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.vue.d.ts +5 -7
  36. package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +70 -76
  37. package/dist/components/BarrageList/Message/TextMessage/TextMessage.vue.d.ts +6 -6
  38. package/dist/components/BarrageList/Message/TextMessage/emoji.d.ts +5 -0
  39. package/dist/components/BarrageList/Message/TextMessage/emoji.js +134 -0
  40. package/dist/components/BarrageList/index.d.ts +0 -36
  41. package/dist/components/CameraButton/index.js +18 -19
  42. package/dist/components/ChatSetting/GroupChatSetting/GroupChatSetting.js +2 -1
  43. package/dist/components/CoGuestPanel/CoGuestPanel.js +60 -60
  44. package/dist/components/CoHostPanel/BattlePanel.js +11 -11
  45. package/dist/components/CoHostPanel/CoHostPanel.js +10 -10
  46. package/dist/components/CoHostPanel/ConfigSettingPanel.js +49 -55
  47. package/dist/components/CoHostPanel/ConnectionPanel.js +132 -123
  48. package/dist/components/CoHostPanel/RecommendHostList.js +39 -36
  49. package/dist/components/CoHostPanel/constants.d.ts +3 -0
  50. package/dist/components/CoHostPanel/constants.js +6 -0
  51. package/dist/components/CoHostPanel/i18n/en-US/index.d.ts +1 -0
  52. package/dist/components/CoHostPanel/i18n/en-US/index.js +2 -1
  53. package/dist/components/CoHostPanel/i18n/zh-CN/index.d.ts +1 -0
  54. package/dist/components/CoHostPanel/i18n/zh-CN/index.js +3 -2
  55. package/dist/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.js +6 -6
  56. package/dist/components/ContactList/ContactInfo/ContactInfo.js +1 -1
  57. package/dist/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.js +1 -1
  58. package/dist/components/ContactList/ContactInfo/FriendInfo/FriendInfo.js +9 -9
  59. package/dist/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.js +1 -1
  60. package/dist/components/ContactList/ContactInfo/GroupInfo/GroupInfo.js +4 -4
  61. package/dist/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.js +8 -8
  62. package/dist/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.js +7 -7
  63. package/dist/components/ContactList/ContactList.js +7 -7
  64. package/dist/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.js +8 -8
  65. package/dist/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.js +5 -5
  66. package/dist/components/ContactList/ContactListItem/FriendItem/FriendItem.js +5 -5
  67. package/dist/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.js +1 -1
  68. package/dist/components/ContactList/ContactListItem/GroupItem/GroupItem.js +1 -1
  69. package/dist/components/ContactList/ContactSearch/ContactSearch.js +6 -6
  70. package/dist/components/ConversationList/ConversationActions/ConversationActions.js +49 -51
  71. package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +9 -9
  72. package/dist/components/ConversationList/ConversationList.js +4 -4
  73. package/dist/components/ConversationList/ConversationList.vue.d.ts +10 -10
  74. package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +10 -10
  75. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +31 -29
  76. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +20 -20
  77. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +2 -2
  78. package/dist/components/ConversationList/ConversationPreview/index.js +1 -1
  79. package/dist/components/ConversationList/index.d.ts +30 -30
  80. package/dist/components/LiveAudienceList/LiveAudienceList.js +44 -45
  81. package/dist/components/LiveAudienceList/LiveAudienceListH5.js +7 -7
  82. package/dist/components/LiveAudienceList/UserActionMenu.js +57 -64
  83. package/dist/components/LiveList/LiveList.js +23 -23
  84. package/dist/components/LiveList/LiveListH5.js +38 -38
  85. package/dist/components/LiveScenePanel/CameraSettingDialog.js +10 -10
  86. package/dist/components/LiveScenePanel/MaterialItem.js +15 -15
  87. package/dist/components/LiveScenePanel/index.js +4 -4
  88. package/dist/components/LiveView/CoreViewDecorate/BattleDecorate.js +58 -58
  89. package/dist/components/LiveView/CoreViewDecorate/BattleUserDecorate.js +6 -6
  90. package/dist/components/LiveView/CoreViewDecorate/CoHostDecorate.js +5 -5
  91. package/dist/components/LiveView/DefaultStreamViewUI.js +44 -41
  92. package/dist/components/LiveView/PlayerControl/AudioControl.js +97 -93
  93. package/dist/components/LiveView/PlayerControl/AudioControl.vue.d.ts +10 -6
  94. package/dist/components/LiveView/PlayerControl/MultiResolution.js +57 -62
  95. package/dist/components/LiveView/PlayerControl/PlayerControl.js +79 -79
  96. package/dist/components/LiveView/PlayerControl/PlayerControlState.d.ts +2 -2
  97. package/dist/components/LiveView/PlayerControl/PlayerControlState.js +164 -209
  98. package/dist/components/LiveView/PlayerControl/utils/domHelpers.d.ts +8 -1
  99. package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +57 -24
  100. package/dist/components/LiveView/i18n/en-US/index.d.ts +2 -2
  101. package/dist/components/LiveView/i18n/en-US/index.js +2 -2
  102. package/dist/components/LiveView/i18n/zh-CN/index.d.ts +2 -2
  103. package/dist/components/LiveView/i18n/zh-CN/index.js +2 -2
  104. package/dist/components/LiveView/index.js +17 -17
  105. package/dist/components/MessageInput/AudioCallPicker/AudioCallPicker.js +63 -65
  106. package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +88 -84
  107. package/dist/components/MessageInput/MessageInput.js +1 -1
  108. package/dist/components/MessageInput/MessageInput.vue.d.ts +5 -2
  109. package/dist/components/MessageInput/TextEditor/EditorCore.d.ts +3 -1
  110. package/dist/components/MessageInput/TextEditor/EditorCore.js +51 -63
  111. package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +6 -2
  112. package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.d.ts +19 -0
  113. package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +74 -0
  114. package/dist/components/MessageInput/TextEditor/extensions/imageExtension.d.ts +2 -0
  115. package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +62 -0
  116. package/dist/components/MessageInput/TextEditor/index.js +45 -35
  117. package/dist/components/MessageInput/VideoCallPicker/VideoCallPicker.js +67 -69
  118. package/dist/components/MessageInput/i18n/index.d.ts +4 -0
  119. package/dist/components/MessageInput/i18n/zh-CN.d.ts +4 -0
  120. package/dist/components/MessageInput/i18n/zh-CN.js +5 -1
  121. package/dist/components/MessageInput/index.d.ts +36 -6
  122. package/dist/components/MessageInput/index.js +1 -1
  123. package/dist/components/MessageList/Message/AudioMessage/WaveForm.js +24 -34
  124. package/dist/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.js +29 -28
  125. package/dist/components/MessageList/Message/GroupTipMessage/index.js +13 -13
  126. package/dist/components/MessageList/Message/Message.vue.d.ts +1 -1
  127. package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +63 -69
  128. package/dist/components/MessageList/Message/VideoMessage/VideoMessage.js +48 -53
  129. package/dist/components/MessageList/Message/VideoMessage/VideoMessage.vue.d.ts +8 -8
  130. package/dist/components/MessageList/MessageList.js +8 -6
  131. package/dist/components/MessageList/MessageList.vue.d.ts +2 -2
  132. package/dist/components/MessageList/i18n/en-US.d.ts +65 -1
  133. package/dist/components/MessageList/i18n/en-US.js +66 -2
  134. package/dist/components/MessageList/i18n/index.d.ts +128 -0
  135. package/dist/components/MessageList/i18n/index.js +6 -6
  136. package/dist/components/MessageList/i18n/zh-CN.d.ts +65 -1
  137. package/dist/components/MessageList/i18n/zh-CN.js +64 -0
  138. package/dist/components/MessageList/index.d.ts +20 -20
  139. package/dist/components/MicButton/index.js +11 -11
  140. package/dist/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.js +172 -174
  141. package/dist/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.js +58 -60
  142. package/dist/components/Search/SearchAdvanced/SearchAdvanced.js +28 -30
  143. package/dist/components/Search/SearchAdvanced/SearchTab/SearchTab.js +22 -24
  144. package/dist/components/Search/SearchAdvanced/Slider/Slider.js +26 -28
  145. package/dist/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.js +133 -135
  146. package/dist/components/Search/SearchBar/SearchBar.js +56 -58
  147. package/dist/components/StreamMixer/LocalMixer/MixerControl.js +12 -12
  148. package/dist/components/StreamMixer/LocalMixer/index.js +66 -63
  149. package/dist/components/StreamView/Layout/CustomLayout.js +8 -8
  150. package/dist/components/StreamView/Layout/FloatLayout.js +124 -127
  151. package/dist/components/StreamView/Layout/GridLayout.js +5 -5
  152. package/dist/components/StreamView/index.js +25 -33
  153. package/dist/components/StreamView/manager/mediaManager.js +54 -60
  154. package/dist/components/UIKitModal/UIKitModal.d.ts +7 -0
  155. package/dist/components/UIKitModal/UIKitModal.js +156 -0
  156. package/dist/components/UIKitModal/index.d.ts +1 -0
  157. package/dist/components/UIKitModal/index.js +4 -0
  158. package/dist/components/{BarrageList/Message/RecalledMessage/RecalledMessage.vue.d.ts → UIKitModal/index.vue.d.ts} +24 -14
  159. package/dist/components/UIKitModal/type.d.ts +21 -0
  160. package/dist/components/UIKitModal/type.js +1 -0
  161. package/dist/components/UserPicker/UserPicker.js +1 -2
  162. package/dist/components/UserPicker/components/SelectedPanel/SelectedPanel.js +19 -18
  163. package/dist/components/UserPicker/hooks/useSearchFilter.d.ts +2 -2
  164. package/dist/components/UserPicker/hooks/useSearchFilter.js +39 -31
  165. package/dist/components/UserPicker/i18n/en-US.d.ts +1 -0
  166. package/dist/components/UserPicker/i18n/en-US.js +2 -1
  167. package/dist/components/UserPicker/i18n/index.d.ts +2 -0
  168. package/dist/components/UserPicker/i18n/zh-CN.d.ts +1 -0
  169. package/dist/components/UserPicker/i18n/zh-CN.js +2 -1
  170. package/dist/components/UserPicker/index.d.ts +2 -2
  171. package/dist/components/UserPicker/type.d.ts +1 -1
  172. package/dist/components/VideoSetting/CameraSelect.js +8 -8
  173. package/dist/components/VideoSetting/VideoMediaControl.js +10 -10
  174. package/dist/components/VideoSetting/VideoPreview.js +9 -9
  175. package/dist/components/VideoSetting/VideoProfile.js +6 -6
  176. package/dist/components/VideoSetting/VideoSettingTab.js +40 -39
  177. package/dist/components/VideoSettingPanel/CameraSelect.js +8 -8
  178. package/dist/components/VideoSettingPanel/VideoPreview.js +1 -1
  179. package/dist/components/VideoSettingPanel/VideoProfile.js +18 -18
  180. package/dist/hooks/useAudioControl.d.ts +3 -3
  181. package/dist/hooks/useAudioControl.js +32 -30
  182. package/dist/hooks/useRoomEngine.js +6 -6
  183. package/dist/index-B_-9wgM4.js +64 -0
  184. package/dist/{index-Bm-QfV5o.js → index-DMfTuy0v.js} +574 -631
  185. package/dist/{index-D2OVtqc8.js → index-DV6o6s43.js} +946 -915
  186. package/dist/index.d.ts +3 -1
  187. package/dist/index.js +164 -142
  188. package/dist/report/MetricsKey.d.ts +16 -0
  189. package/dist/report/MetricsKey.js +4 -0
  190. package/dist/report/dataReport.d.ts +12 -0
  191. package/dist/report/dataReport.js +45 -0
  192. package/dist/report/index.d.ts +4 -0
  193. package/dist/report/index.js +6 -0
  194. package/dist/rtc/index.d.ts +5 -43
  195. package/dist/rtc/index.js +48 -48
  196. package/dist/rtc/server.js +45 -40
  197. package/dist/states/BarrageState/BarrageState.d.ts +74 -0
  198. package/dist/states/BarrageState/BarrageState.js +80 -0
  199. package/dist/states/BarrageState/index.d.ts +1 -0
  200. package/dist/states/BarrageState/index.js +5 -0
  201. package/dist/states/{BattleState.d.ts → BattleState/BattleState.d.ts} +10 -11
  202. package/dist/states/BattleState/BattleState.js +203 -0
  203. package/dist/states/BattleState/index.d.ts +1 -0
  204. package/dist/states/BattleState/index.js +4 -0
  205. package/dist/states/CoGuestState.d.ts +24 -94
  206. package/dist/states/CoGuestState.js +297 -189
  207. package/dist/states/CoHostState/CoHostState.d.ts +2 -2
  208. package/dist/states/CoHostState/CoHostState.js +135 -131
  209. package/dist/states/{DeviceState.d.ts → DeviceState/DeviceState.d.ts} +25 -13
  210. package/dist/states/DeviceState/DeviceState.js +314 -0
  211. package/dist/states/DeviceState/index.d.ts +1 -0
  212. package/dist/states/DeviceState/index.js +4 -0
  213. package/dist/states/LiveAudienceState.d.ts +3 -1
  214. package/dist/states/LiveAudienceState.js +106 -63
  215. package/dist/states/{LiveState/index.d.ts → LiveListState/LiveListState.d.ts} +13 -8
  216. package/dist/states/LiveListState/LiveListState.js +285 -0
  217. package/dist/states/LiveListState/index.d.ts +1 -0
  218. package/dist/states/LiveListState/index.js +4 -0
  219. package/dist/states/LiveMonitorState/api/http.js +147 -129
  220. package/dist/states/LiveMonitorState/index.js +67 -62
  221. package/dist/states/LiveMonitorState/player/adapters/trtc.js +6 -6
  222. package/dist/states/LiveSeatState/index.d.ts +46 -11
  223. package/dist/states/LiveSeatState/index.js +34 -15
  224. package/dist/states/LiveSeatState/seatEventManager.d.ts +2 -0
  225. package/dist/states/LiveSeatState/seatEventManager.js +63 -42
  226. package/dist/states/LiveSeatState/seatManager.d.ts +34 -5
  227. package/dist/states/LiveSeatState/seatManager.js +131 -29
  228. package/dist/states/LiveSeatState/store.d.ts +5 -5
  229. package/dist/states/LiveSeatState/store.js +12 -10
  230. package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.js +1 -1
  231. package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.js +1 -1
  232. package/dist/states/LiveSeatState/usePlayStream/index.js +30 -28
  233. package/dist/states/LoginState.d.ts +23 -0
  234. package/dist/states/MessageInputState/MessageInputState.d.ts +41 -7
  235. package/dist/states/MessageInputState/MessageInputState.js +60 -59
  236. package/dist/states/MessageInputState/utils.d.ts +8 -1
  237. package/dist/states/MessageInputState/utils.js +30 -10
  238. package/dist/states/SeatStore.js +82 -83
  239. package/dist/states/UIKitModalState/UIKitModalState.d.ts +17 -0
  240. package/dist/states/UIKitModalState/UIKitModalState.js +63 -0
  241. package/dist/states/UIKitModalState/index.d.ts +1 -0
  242. package/dist/states/UIKitModalState/index.js +4 -0
  243. package/dist/states/{VideoMixerState.d.ts → VideoMixerState/VideoMixerState.d.ts} +1 -1
  244. package/dist/states/VideoMixerState/VideoMixerState.js +269 -0
  245. package/dist/states/VideoMixerState/index.d.ts +1 -0
  246. package/dist/states/VideoMixerState/index.js +4 -0
  247. package/dist/styles/index.css +1 -1
  248. package/dist/types/audience.d.ts +21 -0
  249. package/dist/types/audience.js +4 -1
  250. package/dist/types/battle.d.ts +75 -3
  251. package/dist/types/battle.js +5 -1
  252. package/dist/types/coGuest.d.ts +72 -5
  253. package/dist/types/coGuest.js +4 -2
  254. package/dist/types/device.d.ts +38 -17
  255. package/dist/types/device.js +10 -8
  256. package/dist/types/index.d.ts +2 -2
  257. package/dist/types/index.js +96 -80
  258. package/dist/types/live.d.ts +36 -21
  259. package/dist/types/live.js +6 -4
  260. package/dist/types/seat.d.ts +23 -4
  261. package/dist/types/seat.js +7 -1
  262. package/dist/utils/call.d.ts +1 -1
  263. package/dist/utils/call.js +78 -79
  264. package/dist/utils/eventCenter.d.ts +88 -0
  265. package/dist/utils/eventCenter.js +161 -0
  266. package/package.json +4 -3
  267. package/src/chat/server.ts +0 -1
  268. package/src/components/AudioSetting/AudioMediaControl.vue +1 -3
  269. package/src/components/AudioSetting/AudioSettingTab.vue +1 -2
  270. package/src/components/AudioSetting/MicrophoneSelect.vue +1 -2
  271. package/src/components/AudioSetting/SpeakerSelect.vue +1 -2
  272. package/src/components/AudioSettingPanel/i18n/en-US/index.ts +1 -0
  273. package/src/components/AudioSettingPanel/i18n/zh-CN/index.ts +1 -0
  274. package/src/components/AudioSettingPanel/index.vue +4 -2
  275. package/src/components/BarrageInput/BarrageInputH5.vue +1 -1
  276. package/src/components/BarrageInput/EmojiPicker/EmojiPicker.vue +1 -1
  277. package/src/components/BarrageInput/MessageInputState.ts +160 -0
  278. package/src/components/BarrageInput/TextEditor/TextEditor.vue +1 -1
  279. package/src/components/BarrageInput/type.ts +26 -0
  280. package/src/components/BarrageInput/utils.ts +45 -0
  281. package/src/components/BarrageList/BarrageList.vue +61 -117
  282. package/src/components/BarrageList/BarrageListH5.vue +75 -159
  283. package/src/components/BarrageList/BarrageListState.ts +223 -0
  284. package/src/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +8 -55
  285. package/src/components/BarrageList/Message/MessageLayout/MessageLayout.vue +19 -44
  286. package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +69 -96
  287. package/src/components/BarrageList/Message/TextMessage/emoji.ts +132 -0
  288. package/src/components/CameraButton/index.vue +0 -1
  289. package/src/components/ChatSetting/GroupChatSetting/GroupChatSetting.vue +5 -0
  290. package/src/components/CoGuestPanel/CoGuestPanel.vue +16 -91
  291. package/src/components/CoHostPanel/BattlePanel.vue +1 -4
  292. package/src/components/CoHostPanel/ConfigSettingPanel.vue +2 -8
  293. package/src/components/CoHostPanel/ConnectionPanel.vue +37 -33
  294. package/src/components/CoHostPanel/RecommendHostList.vue +12 -13
  295. package/src/components/CoHostPanel/constants.ts +3 -0
  296. package/src/components/CoHostPanel/i18n/en-US/index.ts +1 -0
  297. package/src/components/CoHostPanel/i18n/zh-CN/index.ts +2 -1
  298. package/src/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.vue +1 -1
  299. package/src/components/ContactList/ContactInfo/ContactInfo.vue +1 -1
  300. package/src/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.vue +1 -1
  301. package/src/components/ContactList/ContactInfo/FriendInfo/FriendInfo.vue +1 -1
  302. package/src/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.vue +1 -1
  303. package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.vue +1 -1
  304. package/src/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.vue +1 -1
  305. package/src/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.vue +1 -1
  306. package/src/components/ContactList/ContactList.vue +1 -1
  307. package/src/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.vue +1 -1
  308. package/src/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.vue +1 -1
  309. package/src/components/ContactList/ContactListItem/FriendItem/FriendItem.vue +1 -1
  310. package/src/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.vue +1 -1
  311. package/src/components/ContactList/ContactListItem/GroupItem/GroupItem.vue +1 -1
  312. package/src/components/ContactList/ContactSearch/ContactSearch.vue +1 -1
  313. package/src/components/ConversationList/ConversationActions/ConversationActions.vue +2 -8
  314. package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +2 -2
  315. package/src/components/ConversationList/ConversationCreate/ConversationCreateButton/ConversationCreateButton.vue +1 -1
  316. package/src/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.vue +1 -1
  317. package/src/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.vue +1 -1
  318. package/src/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.vue +1 -1
  319. package/src/components/ConversationList/ConversationList.vue +2 -2
  320. package/src/components/ConversationList/ConversationListContent/ConversationListContent.vue +1 -1
  321. package/src/components/ConversationList/ConversationListHeader/ConversationListHeader.vue +1 -1
  322. package/src/components/ConversationList/ConversationPlaceHolder/ConversationPlaceHolder.vue +1 -1
  323. package/src/components/ConversationList/ConversationPreview/ConversationPreview.vue +1 -1
  324. package/src/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.vue +1 -1
  325. package/src/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.vue +4 -4
  326. package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +1 -1
  327. package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +3 -3
  328. package/src/components/ConversationList/ConversationPreview/ConversationPreviewUnread.vue +1 -1
  329. package/src/components/ConversationList/ConversationSearch/ConversationSearch.vue +1 -1
  330. package/src/components/LiveAudienceList/LiveAudienceList.vue +4 -5
  331. package/src/components/LiveAudienceList/LiveAudienceListH5.vue +2 -2
  332. package/src/components/LiveAudienceList/UserActionMenu.vue +7 -48
  333. package/src/components/LiveList/LiveList.vue +5 -5
  334. package/src/components/LiveList/LiveListH5.vue +6 -6
  335. package/src/components/LiveScenePanel/index.vue +2 -2
  336. package/src/components/LiveView/CoreViewDecorate/BattleDecorate.vue +10 -15
  337. package/src/components/LiveView/CoreViewDecorate/BattleUserDecorate.vue +2 -2
  338. package/src/components/LiveView/DefaultStreamViewUI.vue +5 -3
  339. package/src/components/LiveView/PlayerControl/AudioControl.vue +72 -80
  340. package/src/components/LiveView/PlayerControl/MultiResolution.vue +30 -21
  341. package/src/components/LiveView/PlayerControl/PlayerControl.vue +26 -42
  342. package/src/components/LiveView/PlayerControl/PlayerControlState.ts +253 -455
  343. package/src/components/LiveView/PlayerControl/utils/domHelpers.ts +68 -4
  344. package/src/components/LiveView/i18n/en-US/index.ts +2 -2
  345. package/src/components/LiveView/i18n/zh-CN/index.ts +2 -2
  346. package/src/components/LiveView/index.vue +3 -2
  347. package/src/components/MessageInput/AudioCallPicker/AudioCallPicker.vue +8 -6
  348. package/src/components/MessageInput/EmojiPicker/EmojiPicker.vue +7 -3
  349. package/src/components/MessageInput/MessageInput.module.scss +1 -0
  350. package/src/components/MessageInput/MessageInput.vue +3 -1
  351. package/src/components/MessageInput/TextEditor/EditorCore.ts +17 -28
  352. package/src/components/MessageInput/TextEditor/TextEditor.vue +24 -4
  353. package/src/components/MessageInput/TextEditor/extensions/characterCountExtension.ts +159 -0
  354. package/src/components/MessageInput/TextEditor/extensions/imageExtension.ts +79 -0
  355. package/src/components/MessageInput/VideoCallPicker/VideoCallPicker.vue +8 -6
  356. package/src/components/MessageInput/i18n/zh-CN.ts +4 -0
  357. package/src/components/MessageInput/types.d.ts +1 -0
  358. package/src/components/MessageList/Message/AudioMessage/WaveForm.vue +20 -37
  359. package/src/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.vue +5 -3
  360. package/src/components/MessageList/Message/GroupTipMessage/GroupTipMessage.vue +5 -4
  361. package/src/components/MessageList/Message/Message.vue +1 -1
  362. package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +8 -8
  363. package/src/components/MessageList/Message/VideoMessage/VideoMessage.vue +46 -43
  364. package/src/components/MessageList/Message/VideoMessage/index.ts +1 -1
  365. package/src/components/MessageList/MessageList.vue +2 -0
  366. package/src/components/MessageList/i18n/en-US.ts +66 -0
  367. package/src/components/MessageList/i18n/index.ts +4 -4
  368. package/src/components/MessageList/i18n/zh-CN.ts +66 -0
  369. package/src/components/MicButton/index.vue +3 -3
  370. package/src/components/Search/Search.vue +1 -1
  371. package/src/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.scss +1 -4
  372. package/src/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.vue +1 -1
  373. package/src/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.scss +1 -4
  374. package/src/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.vue +1 -1
  375. package/src/components/Search/SearchAdvanced/SearchAdvanced.scss +1 -4
  376. package/src/components/Search/SearchAdvanced/SearchAdvanced.vue +1 -1
  377. package/src/components/Search/SearchAdvanced/SearchTab/SearchTab.scss +1 -4
  378. package/src/components/Search/SearchAdvanced/SearchTab/SearchTab.vue +1 -1
  379. package/src/components/Search/SearchAdvanced/Slider/Slider.scss +1 -4
  380. package/src/components/Search/SearchAdvanced/Slider/Slider.vue +1 -1
  381. package/src/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.scss +1 -4
  382. package/src/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.vue +1 -1
  383. package/src/components/Search/SearchBar/SearchBar.scss +3 -6
  384. package/src/components/Search/SearchBar/SearchBar.vue +1 -1
  385. package/src/components/Search/SearchResults/EmptyResult/EmptyResult.vue +1 -1
  386. package/src/components/Search/SearchResults/Loading/Loading.vue +1 -1
  387. package/src/components/Search/SearchResults/SearchResults.vue +1 -1
  388. package/src/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.vue +1 -1
  389. package/src/components/Search/SearchResults/SearchResultsItem/Group/Group.vue +1 -1
  390. package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.vue +1 -1
  391. package/src/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.vue +1 -1
  392. package/src/components/Search/SearchResults/SearchResultsItem/User/User.vue +1 -1
  393. package/src/components/StreamMixer/LocalMixer/index.vue +6 -8
  394. package/src/components/StreamView/Layout/CustomLayout.vue +2 -2
  395. package/src/components/StreamView/Layout/FloatLayout.vue +88 -83
  396. package/src/components/StreamView/index.vue +28 -14
  397. package/src/components/StreamView/manager/mediaManager.ts +38 -42
  398. package/src/components/UIKitModal/UIKitModal.ts +71 -0
  399. package/src/components/UIKitModal/index.scss +134 -0
  400. package/src/components/UIKitModal/index.ts +1 -0
  401. package/src/components/UIKitModal/index.vue +160 -0
  402. package/src/components/UIKitModal/type.ts +24 -0
  403. package/src/components/UserPicker/UserPicker.vue +1 -1
  404. package/src/components/UserPicker/components/SelectedPanel/SelectedPanel.vue +1 -0
  405. package/src/components/UserPicker/hooks/useSearchFilter.ts +27 -18
  406. package/src/components/UserPicker/i18n/en-US.ts +1 -0
  407. package/src/components/UserPicker/i18n/zh-CN.ts +1 -0
  408. package/src/components/UserPicker/type.ts +1 -1
  409. package/src/components/VideoSetting/CameraSelect.vue +1 -2
  410. package/src/components/VideoSetting/VideoMediaControl.vue +1 -1
  411. package/src/components/VideoSetting/VideoPreview.vue +1 -2
  412. package/src/components/VideoSetting/VideoProfile.vue +1 -1
  413. package/src/components/VideoSetting/VideoSettingTab.vue +9 -5
  414. package/src/components/VideoSettingPanel/CameraSelect.vue +1 -2
  415. package/src/components/VideoSettingPanel/VideoProfile.vue +7 -7
  416. package/src/hooks/useAudioControl.ts +17 -4
  417. package/src/hooks/useRoomEngine.ts +1 -1
  418. package/src/index.ts +3 -0
  419. package/src/report/MetricsKey.ts +16 -0
  420. package/src/report/dataReport.ts +55 -0
  421. package/src/report/index.ts +7 -0
  422. package/src/rtc/index.ts +7 -9
  423. package/src/rtc/server.ts +4 -0
  424. package/src/types/audience.ts +27 -1
  425. package/src/types/battle.ts +87 -4
  426. package/src/types/coGuest.ts +87 -5
  427. package/src/types/device.ts +41 -16
  428. package/src/types/index.ts +2 -2
  429. package/src/types/live.ts +41 -22
  430. package/src/types/seat.ts +28 -4
  431. package/src/utils/call.ts +26 -27
  432. package/src/utils/eventCenter.ts +249 -0
  433. package/dist/DialogPortal-CvJcEAsn.js +0 -417
  434. package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.js +0 -23
  435. package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.vue.d.ts +0 -30
  436. package/dist/components/BarrageList/Message/FaceMessage/index.d.ts +0 -3
  437. package/dist/components/BarrageList/Message/FaceMessage/index.js +0 -4
  438. package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +0 -4
  439. package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +0 -16
  440. package/dist/components/BarrageList/Message/GroupTipMessage/index.d.ts +0 -3
  441. package/dist/components/BarrageList/Message/GroupTipMessage/index.js +0 -25
  442. package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +0 -71
  443. package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.vue.d.ts +0 -34
  444. package/dist/components/BarrageList/Message/ImageMessage/index.d.ts +0 -3
  445. package/dist/components/BarrageList/Message/ImageMessage/index.js +0 -4
  446. package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +0 -9
  447. package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.vue.d.ts +0 -2
  448. package/dist/components/BarrageList/Message/MergerMessage/index.d.ts +0 -3
  449. package/dist/components/BarrageList/Message/MergerMessage/index.js +0 -4
  450. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +0 -40
  451. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue.d.ts +0 -54
  452. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +0 -26
  453. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue.d.ts +0 -15
  454. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.d.ts +0 -3
  455. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +0 -4
  456. package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +0 -41
  457. package/dist/components/BarrageList/Message/RecalledMessage/index.d.ts +0 -3
  458. package/dist/components/BarrageList/Message/RecalledMessage/index.js +0 -4
  459. package/dist/components/BarrageList/MessageForward/ForwardListItem.js +0 -45
  460. package/dist/components/BarrageList/MessageForward/ForwardListItem.vue.d.ts +0 -17
  461. package/dist/components/BarrageList/MessageForward/MessageForward.js +0 -203
  462. package/dist/components/BarrageList/MessageForward/MessageForward.vue.d.ts +0 -2
  463. package/dist/components/BarrageList/MessageForward/index.d.ts +0 -3
  464. package/dist/components/BarrageList/MessageForward/index.js +0 -4
  465. package/dist/components/StreamView/Layout/MixLayout.js +0 -89
  466. package/dist/components/StreamView/Layout/MixLayout.vue.d.ts +0 -31
  467. package/dist/states/BarrageListState/BarrageListState.d.ts +0 -26
  468. package/dist/states/BarrageListState/BarrageListState.js +0 -122
  469. package/dist/states/BarrageListState/index.d.ts +0 -1
  470. package/dist/states/BarrageListState/index.js +0 -4
  471. package/dist/states/BattleState.js +0 -117
  472. package/dist/states/DeviceState.js +0 -296
  473. package/dist/states/LiveState/index.js +0 -254
  474. package/dist/states/VideoMixerState.js +0 -260
  475. package/src/components/BarrageList/Message/FaceMessage/FaceMessage.vue +0 -43
  476. package/src/components/BarrageList/Message/FaceMessage/index.ts +0 -3
  477. package/src/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue +0 -55
  478. package/src/components/BarrageList/Message/GroupTipMessage/index.ts +0 -3
  479. package/src/components/BarrageList/Message/ImageMessage/ImageMessage.vue +0 -181
  480. package/src/components/BarrageList/Message/ImageMessage/index.ts +0 -3
  481. package/src/components/BarrageList/Message/MergerMessage/MergerMessage.vue +0 -6
  482. package/src/components/BarrageList/Message/MergerMessage/index.ts +0 -3
  483. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +0 -70
  484. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue +0 -40
  485. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/index.ts +0 -3
  486. package/src/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue +0 -82
  487. package/src/components/BarrageList/Message/RecalledMessage/index.ts +0 -3
  488. package/src/components/BarrageList/MessageForward/ForwardListItem.vue +0 -67
  489. package/src/components/BarrageList/MessageForward/MessageForward.vue +0 -388
  490. package/src/components/BarrageList/MessageForward/index.ts +0 -3
  491. package/src/components/StreamView/Layout/MixLayout.vue +0 -144
package/dist/rtc/index.js CHANGED
@@ -6,62 +6,62 @@ import { CameraButton as s } from "../components/CameraButton/index.js";
6
6
  import { CoGuestPanel as a } from "../components/CoGuestPanel/index.js";
7
7
  import { CoHostPanel as r } from "../components/CoHostPanel/index.js";
8
8
  import { LiveAudienceList as n } from "../components/LiveAudienceList/index.js";
9
- import { LiveCoreView as Ue, LiveView as Te } from "../components/LiveView/index.js";
10
9
  import { LiveList as m } from "../components/LiveList/index.js";
11
10
  import "../components/LiveMonitorView/index.js";
12
11
  import { LiveScenePanel as u } from "../components/LiveScenePanel/index.js";
12
+ import { LiveCoreView as we, LiveView as Ge } from "../components/LiveView/index.js";
13
13
  import { MicButton as S } from "../components/MicButton/index.js";
14
14
  import { StreamMixer as c } from "../components/StreamMixer/index.js";
15
15
  import { StreamView as p } from "../components/StreamView/index.js";
16
- import { V as L } from "../index-DTq2ybsB.js";
17
- import { VideoSettingPanel as f } from "../components/VideoSettingPanel/index.js";
18
- import { useCoGuestState as v } from "../states/CoGuestState.js";
19
- import { useDeviceState as g } from "../states/DeviceState.js";
20
- import { useLiveAudienceState as C } from "../states/LiveAudienceState.js";
16
+ import { V as f } from "../index-DTq2ybsB.js";
17
+ import { VideoSettingPanel as L } from "../components/VideoSettingPanel/index.js";
18
+ import { useRoomEngine as v } from "../hooks/useRoomEngine.js";
19
+ import { useCoGuestState as C } from "../states/CoGuestState.js";
20
+ import { useLiveAudienceState as g } from "../states/LiveAudienceState.js";
21
21
  import { useLiveMonitorState as $ } from "../states/LiveMonitorState/index.js";
22
22
  import { useLiveSeatState as d } from "../states/LiveSeatState/index.js";
23
- import { useLiveState as l } from "../states/LiveState/index.js";
24
- import { useRoomState as B } from "../states/RoomState.js";
23
+ import { useRoomState as l } from "../states/RoomState.js";
25
24
  import { useUserState as P } from "../states/UserState/index.js";
26
- import { useVideoMixerState as V } from "../states/VideoMixerState.js";
27
- import { useBattleState as he } from "../states/BattleState.js";
28
- import { useRoomEngine as M } from "../hooks/useRoomEngine.js";
29
- import A from "./server.js";
30
- import x from "../components/LiveMonitorView/LiveMonitorView.js";
31
- import { useCoHostState as R } from "../states/CoHostState/CoHostState.js";
32
- import { useBarrageListState as _ } from "../states/BarrageListState/BarrageListState.js";
33
- A.getInstance().init();
34
- const ae = i, re = o, ne = c, me = u, ue = n, Se = a, ce = r, pe = t, Le = f, fe = S, ve = s, ge = m, Ce = x, $e = p, de = e, le = L, Be = _, Pe = $, Ve = d, Me = l, Ae = P, xe = v, Re = R, _e = g, we = C, Ge = B, He = V, Ie = M;
25
+ import V from "./server.js";
26
+ import B from "../components/LiveMonitorView/LiveMonitorView.js";
27
+ import { useDeviceState as M } from "../states/DeviceState/DeviceState.js";
28
+ import { useVideoMixerState as x } from "../states/VideoMixerState/VideoMixerState.js";
29
+ import { useCoHostState as A } from "../states/CoHostState/CoHostState.js";
30
+ import { useLiveListState as Ie } from "../states/LiveListState/LiveListState.js";
31
+ import { useBattleState as Ee } from "../states/BattleState/BattleState.js";
32
+ import { useBarrageState as Te } from "../states/BarrageState/BarrageState.js";
33
+ V.getInstance().init();
34
+ const te = i, oe = o, ie = c, se = u, ae = n, re = a, ne = r, me = t, ue = L, Se = S, ce = s, pe = m, fe = B, Le = p, ve = e, Ce = f, ge = $, $e = d, de = P, le = C, Pe = A, Ve = M, Be = g, Me = l, xe = x, Ae = v;
35
35
  export {
36
- de as AudioSetting,
37
- pe as AudioSettingPanel,
38
- re as BarrageInput,
39
- ae as BarrageList,
40
- ve as CameraButton,
41
- Se as CoGuestPanel,
42
- ce as CoHostPanel,
43
- ue as LiveAudienceList,
44
- Ue as LiveCoreView,
45
- ge as LiveList,
46
- Ce as LiveMonitorView,
47
- me as LiveScenePanel,
48
- Te as LiveView,
49
- fe as MicButton,
50
- ne as StreamMixer,
51
- $e as StreamView,
52
- le as VideoSetting,
53
- Le as VideoSettingPanel,
54
- Be as useBarrageListState,
55
- he as useBattleState,
56
- xe as useCoGuestState,
57
- Re as useCoHostState,
58
- _e as useDeviceState,
59
- we as useLiveAudienceState,
60
- Pe as useLiveMonitorState,
61
- Ve as useLiveSeatState,
62
- Me as useLiveState,
63
- Ie as useRoomEngine,
64
- Ge as useRoomState,
65
- Ae as useUserState,
66
- He as useVideoMixerState
36
+ ve as AudioSetting,
37
+ me as AudioSettingPanel,
38
+ oe as BarrageInput,
39
+ te as BarrageList,
40
+ ce as CameraButton,
41
+ re as CoGuestPanel,
42
+ ne as CoHostPanel,
43
+ ae as LiveAudienceList,
44
+ we as LiveCoreView,
45
+ pe as LiveList,
46
+ fe as LiveMonitorView,
47
+ se as LiveScenePanel,
48
+ Ge as LiveView,
49
+ Se as MicButton,
50
+ ie as StreamMixer,
51
+ Le as StreamView,
52
+ Ce as VideoSetting,
53
+ ue as VideoSettingPanel,
54
+ Te as useBarrageState,
55
+ Ee as useBattleState,
56
+ le as useCoGuestState,
57
+ Pe as useCoHostState,
58
+ Ve as useDeviceState,
59
+ Be as useLiveAudienceState,
60
+ Ie as useLiveListState,
61
+ ge as useLiveMonitorState,
62
+ $e as useLiveSeatState,
63
+ Ae as useRoomEngine,
64
+ Me as useRoomState,
65
+ de as useUserState,
66
+ xe as useVideoMixerState
67
67
  };
@@ -1,16 +1,19 @@
1
- var u = Object.defineProperty;
2
- var L = (o, i, t) => i in o ? u(o, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[i] = t;
3
- var s = (o, i, t) => L(o, typeof i != "symbol" ? i + "" : i, t);
4
- import { ref as f } from "vue";
5
- import U from "@tencentcloud/chat-uikit-engine";
6
- import S, { TUIConstants as g, TUILogin as T } from "@tencentcloud/tui-core";
7
- import c from "@tencentcloud/tuiroom-engine-js";
8
- import { useLoginState as m } from "../states/LoginState.js";
1
+ var h = Object.defineProperty;
2
+ var T = (n, t, i) => t in n ? h(n, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : n[t] = i;
3
+ var s = (n, t, i) => T(n, typeof t != "symbol" ? t + "" : t, i);
4
+ import { ref as U } from "vue";
5
+ import m from "@tencentcloud/chat-uikit-engine";
6
+ import S, { TUIConstants as g, TUILogin as _ } from "@tencentcloud/tui-core";
7
+ import l from "@tencentcloud/tuiroom-engine-js";
8
+ import { dataReport as p } from "../report/dataReport.js";
9
+ import { MetricsKey as c } from "../report/MetricsKey.js";
10
+ import { useLoginState as N } from "../states/LoginState.js";
11
+ import { isMobile as C } from "../utils/env.js";
9
12
  const e = class e {
10
13
  constructor() {
11
14
  s(this, "isReady", !1);
12
15
  s(this, "isEngineLoggingIn", !1);
13
- s(this, "isLogin", f(!1));
16
+ s(this, "isLogin", U(!1));
14
17
  s(this, "resolveList", []);
15
18
  s(this, "rejectList", []);
16
19
  this.init();
@@ -28,9 +31,9 @@ const e = class e {
28
31
  /**
29
32
  * @param { TUIInitParam } params
30
33
  */
31
- onNotifyEvent(i, t) {
32
- if (i === g.TUILogin.EVENT.LOGIN_STATE_CHANGED)
33
- switch (t) {
34
+ onNotifyEvent(t, i) {
35
+ if (t === g.TUILogin.EVENT.LOGIN_STATE_CHANGED)
36
+ switch (i) {
34
37
  case g.TUILogin.EVENT_SUB_KEY.USER_LOGIN_SUCCESS:
35
38
  this.login();
36
39
  break;
@@ -41,52 +44,54 @@ const e = class e {
41
44
  }
42
45
  async login() {
43
46
  const {
44
- chat: i,
45
- SDKAppID: t,
46
- userID: l,
47
- userSig: E
48
- } = T.getContext();
47
+ chat: t,
48
+ SDKAppID: i,
49
+ userID: E,
50
+ userSig: I
51
+ } = _.getContext();
49
52
  if (this.isEngineLoggingIn)
50
- return new Promise((n, r) => {
51
- this.resolveList.push(n), this.rejectList.push(r);
53
+ return new Promise((o, r) => {
54
+ this.resolveList.push(o), this.rejectList.push(r);
52
55
  });
53
56
  try {
54
- this.isEngineLoggingIn = !0, await U.login({
55
- chat: i,
56
- SDKAppID: t,
57
- userID: l,
58
- userSig: E
57
+ this.isEngineLoggingIn = !0;
58
+ const o = C ? c.T_METRICS_STATE_API_LOGIN_MOBILE_COUNT : c.T_METRICS_STATE_API_LOGIN_COUNT;
59
+ p.reportCount(o), await m.login({
60
+ chat: t,
61
+ SDKAppID: i,
62
+ userID: E,
63
+ userSig: I
59
64
  });
60
- const n = await c.login({
61
- sdkAppId: t,
62
- userId: l,
63
- userSig: E,
64
- tim: i
65
+ const r = await l.login({
66
+ sdkAppId: i,
67
+ userId: E,
68
+ userSig: I,
69
+ tim: t
65
70
  });
66
- this.isLogin.value = !0, this.resolveList.forEach((h) => {
67
- h();
71
+ this.isLogin.value = !0, this.resolveList.forEach((u) => {
72
+ u();
68
73
  }), this.rejectList = [], this.resolveList = [];
69
- const { loginUserInfo: r } = m(), a = (await i.getUserProfile({ userIDList: [l] })).data[0];
70
- return a.value || (r.value = {
74
+ const { loginUserInfo: f } = N(), a = (await t.getUserProfile({ userIDList: [E] })).data[0];
75
+ return a.value || (f.value = {
71
76
  userId: a.userID,
72
77
  userName: a.nick,
73
78
  avatarUrl: a.avatar,
74
79
  customInfo: a.profileCustomField
75
- }), n;
76
- } catch (n) {
80
+ }), r;
81
+ } catch (o) {
77
82
  throw this.rejectList.forEach((r) => {
78
- r(n);
79
- }), this.rejectList = [], this.resolveList = [], n;
83
+ r(o);
84
+ }), this.rejectList = [], this.resolveList = [], o;
80
85
  } finally {
81
86
  this.isEngineLoggingIn = !1;
82
87
  }
83
88
  }
84
89
  logout() {
85
- c.logout(), this.isLogin.value = !1, this.isEngineLoggingIn = !1;
90
+ l.logout(), this.isLogin.value = !1, this.isEngineLoggingIn = !1;
86
91
  }
87
92
  };
88
93
  s(e, "instance");
89
- let I = e;
94
+ let L = e;
90
95
  export {
91
- I as default
96
+ L as default
92
97
  };
@@ -0,0 +1,74 @@
1
+ import { TUIUserInfo } from '@tencentcloud/tuiroom-engine-js';
2
+
3
+ export declare enum BarrageType {
4
+ text = 0,
5
+ custom = 1
6
+ }
7
+ interface BaseMessageInfo {
8
+ liveId: string;
9
+ sender: TUIUserInfo;
10
+ sequence: number;
11
+ timestampInSecond: number;
12
+ }
13
+ export interface Barrage extends BaseMessageInfo {
14
+ messageType: BarrageType;
15
+ textContent?: string;
16
+ extensionInfo?: Record<string, string> | null;
17
+ businessId?: string;
18
+ data?: string;
19
+ }
20
+ export declare function useBarrageState(): {
21
+ messageList: import('vue').Ref<{
22
+ messageType: BarrageType;
23
+ textContent?: string | undefined;
24
+ extensionInfo?: (Record<string, string> | null) | undefined;
25
+ businessId?: string | undefined;
26
+ data?: string | undefined;
27
+ liveId: string;
28
+ sender: {
29
+ userId: string;
30
+ userName: string;
31
+ nameCard: string;
32
+ avatarUrl: string;
33
+ userRole: import('@tencentcloud/tuiroom-engine-js').TUIRole;
34
+ hasAudioStream: boolean;
35
+ hasVideoStream: boolean;
36
+ hasScreenStream: boolean;
37
+ isMessageDisabled: boolean;
38
+ roomCustomInfo: Record<string, any>;
39
+ };
40
+ sequence: number;
41
+ timestampInSecond: number;
42
+ }[], Barrage[] | {
43
+ messageType: BarrageType;
44
+ textContent?: string | undefined;
45
+ extensionInfo?: (Record<string, string> | null) | undefined;
46
+ businessId?: string | undefined;
47
+ data?: string | undefined;
48
+ liveId: string;
49
+ sender: {
50
+ userId: string;
51
+ userName: string;
52
+ nameCard: string;
53
+ avatarUrl: string;
54
+ userRole: import('@tencentcloud/tuiroom-engine-js').TUIRole;
55
+ hasAudioStream: boolean;
56
+ hasVideoStream: boolean;
57
+ hasScreenStream: boolean;
58
+ isMessageDisabled: boolean;
59
+ roomCustomInfo: Record<string, any>;
60
+ };
61
+ sequence: number;
62
+ timestampInSecond: number;
63
+ }[]>;
64
+ sendTextMessage: (options: {
65
+ text: string;
66
+ extensionInfo?: Record<string, string>;
67
+ }) => Promise<void> | undefined;
68
+ sendCustomMessage: (options: {
69
+ businessId: string;
70
+ data: string;
71
+ }) => Promise<void> | undefined;
72
+ appendLocalTip: (message: Barrage) => void;
73
+ };
74
+ export {};
@@ -0,0 +1,80 @@
1
+ import { ref as i, watch as d } from "vue";
2
+ import m, { TUIRoomEvents as c } from "@tencentcloud/tuiroom-engine-js";
3
+ import { useRoomEngine as v } from "../../hooks/useRoomEngine.js";
4
+ import { dataReport as I } from "../../report/dataReport.js";
5
+ import { MetricsKey as l } from "../../report/MetricsKey.js";
6
+ import { useLoginState as f } from "../LoginState.js";
7
+ import { useLiveListState as x } from "../LiveListState/LiveListState.js";
8
+ const { loginUserInfo: s } = f();
9
+ var p = /* @__PURE__ */ ((e) => (e[e.text = 0] = "text", e[e.custom = 1] = "custom", e))(p || {});
10
+ const u = v(), { currentLive: T } = x(), a = i([]), E = (e) => {
11
+ var n;
12
+ const t = l.T_METRICS_STATE_API_BARRAGE_SEND_TEXT_MSG_COUNT;
13
+ return I.reportCount(t), (n = u.instance) == null ? void 0 : n.sendTextMessage({
14
+ textContent: e.text,
15
+ extensionInfo: (e == null ? void 0 : e.extensionInfo) || {}
16
+ });
17
+ }, M = (e) => {
18
+ var t;
19
+ return (t = u.instance) == null ? void 0 : t.sendCustomMessage({
20
+ businessId: e.businessId,
21
+ data: e.data
22
+ });
23
+ }, R = (e) => {
24
+ a.value.push(e);
25
+ }, S = (e) => {
26
+ var n, o, r;
27
+ const t = { ...e.sender };
28
+ t.userId === ((n = s.value) == null ? void 0 : n.userId) && (t.userName = t.userName || ((o = s.value) == null ? void 0 : o.userName), t.avatarUrl = t.avatarUrl || ((r = s.value) == null ? void 0 : r.avatarUrl)), a.value.push({
29
+ liveId: e.roomId,
30
+ sender: t,
31
+ sequence: e.sequence,
32
+ timestampInSecond: e.timestampInSecond,
33
+ messageType: 0,
34
+ textContent: e.textContent,
35
+ extensionInfo: e.extensionInfo
36
+ });
37
+ }, C = (e) => {
38
+ var n, o, r;
39
+ const t = { ...e.sender };
40
+ t.userId === ((n = s.value) == null ? void 0 : n.userId) && (t.userName = t.userName || ((o = s.value) == null ? void 0 : o.userName), t.avatarUrl = t.avatarUrl || ((r = s.value) == null ? void 0 : r.avatarUrl)), a.value.push({
41
+ liveId: e.roomId,
42
+ sender: t,
43
+ sequence: e.sequence,
44
+ timestampInSecond: e.timestampInSecond,
45
+ messageType: 1,
46
+ businessId: e.businessId,
47
+ data: e.data
48
+ });
49
+ }, U = [
50
+ { event: c.onReceiveTextMessage, handler: S },
51
+ { event: c.onReceiveCustomMessage, handler: C }
52
+ ], N = () => {
53
+ U.forEach(({ event: e, handler: t }) => {
54
+ var n;
55
+ (n = u.instance) == null || n.on(e, t);
56
+ });
57
+ }, _ = () => {
58
+ a.value = [];
59
+ };
60
+ d(() => {
61
+ var e;
62
+ return (e = T.value) == null ? void 0 : e.liveId;
63
+ }, (e) => {
64
+ e || _();
65
+ });
66
+ m.once("ready", () => {
67
+ N();
68
+ });
69
+ function G() {
70
+ return {
71
+ messageList: a,
72
+ sendTextMessage: E,
73
+ sendCustomMessage: M,
74
+ appendLocalTip: R
75
+ };
76
+ }
77
+ export {
78
+ p as BarrageType,
79
+ G as useBarrageState
80
+ };
@@ -0,0 +1 @@
1
+ export * from './BarrageState';
@@ -0,0 +1,5 @@
1
+ import { BarrageType as a, useBarrageState as t } from "./BarrageState.js";
2
+ export {
3
+ a as BarrageType,
4
+ t as useBarrageState
5
+ };
@@ -1,32 +1,31 @@
1
- import { BattleInfo, DeviceStatus, DeviceStatusReason, SeatUserInfo } from '../types';
2
- import { TUIBattleConfig, TUILiveBattleManagerEvents } from '@tencentcloud/tuiroom-engine-js';
1
+ import { BattleEvent, DeviceStatus, BattleConfig, BattleInfo, SeatUserInfo } from '../../types';
3
2
 
4
3
  export declare function useBattleState(): {
5
4
  currentBattleInfo: import('vue').Ref<BattleInfo | undefined, BattleInfo | undefined>;
6
5
  battleUsers: import('vue').Ref<{
7
- liveId: string;
8
6
  userId: string;
9
7
  userName: string;
10
8
  avatarUrl: string;
9
+ liveId: string;
11
10
  microphoneStatus: DeviceStatus;
12
- microphoneStatusReason: DeviceStatusReason;
11
+ allowOpenMicrophone: boolean;
13
12
  cameraStatus: DeviceStatus;
14
- cameraStatusReason: DeviceStatusReason;
13
+ allowOpenCamera: boolean;
15
14
  }[], SeatUserInfo[] | {
16
- liveId: string;
17
15
  userId: string;
18
16
  userName: string;
19
17
  avatarUrl: string;
18
+ liveId: string;
20
19
  microphoneStatus: DeviceStatus;
21
- microphoneStatusReason: DeviceStatusReason;
20
+ allowOpenMicrophone: boolean;
22
21
  cameraStatus: DeviceStatus;
23
- cameraStatusReason: DeviceStatusReason;
22
+ allowOpenCamera: boolean;
24
23
  }[]>;
25
24
  battleScore: import('vue').Ref<Map<string, number> & Omit<Map<string, number>, keyof Map<any, any>>, Map<string, number> | (Map<string, number> & Omit<Map<string, number>, keyof Map<any, any>>)>;
26
- subscribeEvent: (event: TUILiveBattleManagerEvents, callback: (eventInfo: any) => void) => void;
27
- unsubscribeEvent: (event: TUILiveBattleManagerEvents, callback: (eventInfo: any) => void) => void;
25
+ subscribeEvent: (event: BattleEvent, callback: (eventInfo: any) => void) => void;
26
+ unsubscribeEvent: (event: BattleEvent, callback: (eventInfo: any) => void) => void;
28
27
  requestBattle: (options: {
29
- config: TUIBattleConfig;
28
+ config: BattleConfig;
30
29
  userIdList: string[];
31
30
  timeout: number;
32
31
  }) => Promise<any> | undefined;
@@ -0,0 +1,203 @@
1
+ import { ref as f, watch as L } from "vue";
2
+ import O, { TUILiveBattleManagerEvents as r, TUIBattleStoppedReason as q } from "@tencentcloud/tuiroom-engine-js";
3
+ import { useRoomEngine as T } from "../../hooks/useRoomEngine.js";
4
+ import { useLiveListState as w } from "../LiveListState/LiveListState.js";
5
+ import { BattleEndedReason as S, BattleEvent as o } from "../../types/battle.js";
6
+ import { DeviceStatus as h } from "../../types/device.js";
7
+ const B = T(), { currentLive: M } = w(), a = (e) => ({
8
+ liveId: e.roomId,
9
+ userId: e.userId,
10
+ userName: e.userName,
11
+ avatarUrl: e.avatarUrl,
12
+ microphoneStatus: h.Off,
13
+ allowOpenMicrophone: !0,
14
+ cameraStatus: h.Off,
15
+ allowOpenCamera: !0
16
+ }), d = /* @__PURE__ */ new Map(), C = (e, t) => {
17
+ var n;
18
+ d.has(e) || d.set(e, []), (n = d.get(e)) == null || n.push(t);
19
+ }, j = (e, t) => {
20
+ const n = d.get(e);
21
+ n && (n.splice(n.indexOf(t), 1), n.length === 0 && d.delete(e));
22
+ }, l = (e, t) => {
23
+ const n = d.get(e);
24
+ n && n.forEach((s) => {
25
+ try {
26
+ s(t);
27
+ } catch (u) {
28
+ console.error(`Error in event callback for ${e}:`, u);
29
+ }
30
+ });
31
+ }, E = f(), i = f([]), c = f(/* @__PURE__ */ new Map()), y = (e) => {
32
+ var n;
33
+ const t = (n = B.instance) == null ? void 0 : n.getLiveBattleManager();
34
+ return t == null ? void 0 : t.requestBattle(e);
35
+ }, N = (e) => {
36
+ var n;
37
+ const t = (n = B.instance) == null ? void 0 : n.getLiveBattleManager();
38
+ return t == null ? void 0 : t.cancelBattleRequest(e);
39
+ }, k = (e) => {
40
+ var n;
41
+ const t = (n = B.instance) == null ? void 0 : n.getLiveBattleManager();
42
+ return t == null ? void 0 : t.acceptBattle(e);
43
+ }, A = (e) => {
44
+ var n;
45
+ const t = (n = B.instance) == null ? void 0 : n.getLiveBattleManager();
46
+ return t == null ? void 0 : t.rejectBattle(e);
47
+ }, J = (e) => {
48
+ var s;
49
+ const t = (s = B.instance) == null ? void 0 : s.getLiveBattleManager();
50
+ return t == null ? void 0 : t.exitBattle(e);
51
+ }, x = () => {
52
+ E.value = void 0, i.value = [], c.value = /* @__PURE__ */ new Map();
53
+ }, D = (e) => {
54
+ const { battleInfo: t } = e, { battleId: n, duration: s, needResponse: u, extensionInfo: m, startTime: p, endTime: b } = t;
55
+ x();
56
+ const v = {
57
+ [q.kStoppedByOtherExit]: S.allMemberExit,
58
+ [q.kStoppedByTimeOver]: S.timeOver
59
+ };
60
+ l(o.onBattleEnded, {
61
+ battleInfo: {
62
+ battleId: n,
63
+ config: {
64
+ duration: s,
65
+ needResponse: u,
66
+ extensionInfo: m
67
+ },
68
+ startTime: p,
69
+ endTime: b
70
+ },
71
+ reason: v[e.reason]
72
+ });
73
+ }, $ = (e) => {
74
+ c.value = new Map(e.battleUserList.map((t) => [t.userId, t.score]));
75
+ }, z = (e) => {
76
+ const { battleInfo: t } = e, { battleId: n, duration: s, needResponse: u, extensionInfo: m, startTime: p, endTime: b } = t;
77
+ E.value = {
78
+ battleId: n,
79
+ config: {
80
+ duration: s,
81
+ needResponse: u,
82
+ extensionInfo: m
83
+ },
84
+ startTime: p,
85
+ endTime: b
86
+ };
87
+ const { fromUser: v, toUserList: g } = e.battleInfo, I = a(v), U = g.map((R) => a(R));
88
+ c.value.set(v.userId, v.score), g.forEach((R) => {
89
+ c.value.set(R.userId, R.score);
90
+ }), i.value = [I, ...U], l(o.onBattleStarted, {
91
+ battleInfo: {
92
+ battleId: n,
93
+ config: {
94
+ duration: s,
95
+ needResponse: u,
96
+ extensionInfo: m
97
+ },
98
+ startTime: p,
99
+ endTime: b
100
+ },
101
+ inviter: I,
102
+ invitees: U
103
+ });
104
+ }, F = (e) => {
105
+ var t;
106
+ i.value.length <= 2 || (i.value = (t = i.value) == null ? void 0 : t.filter((n) => n.userId !== e.user.userId), c.value.delete(e.user.userId), l(o.onUserExitBattle, {
107
+ battleId: e.battleId,
108
+ battleUser: a(e.user)
109
+ }));
110
+ }, G = (e) => {
111
+ var t;
112
+ (t = i.value) == null || t.push({
113
+ liveId: e.user.roomId,
114
+ userId: e.user.userId,
115
+ userName: e.user.userName,
116
+ avatarUrl: e.user.avatarUrl,
117
+ microphoneStatus: h.Off,
118
+ allowOpenMicrophone: !0,
119
+ cameraStatus: h.Off,
120
+ allowOpenCamera: !0
121
+ }), c.value.set(e.user.userId, e.user.score), l(o.onUserJoinBattle, {
122
+ battleId: e.battleId,
123
+ battleUser: a(e.user)
124
+ });
125
+ }, H = (e) => {
126
+ const { battleId: t } = e.battleInfo;
127
+ l(o.onBattleRequestReceived, {
128
+ battleId: t,
129
+ inviter: a(e.inviter),
130
+ invitee: a(e.invitee)
131
+ });
132
+ }, K = (e) => {
133
+ const { battleId: t } = e.battleInfo;
134
+ l(o.onBattleRequestCancelled, {
135
+ battleId: t,
136
+ inviter: a(e.inviter),
137
+ invitee: a(e.invitee)
138
+ });
139
+ }, P = (e) => {
140
+ const { battleId: t } = e.battleInfo;
141
+ l(o.onBattleRequestTimeout, {
142
+ battleId: t,
143
+ inviter: a(e.inviter),
144
+ invitee: a(e.invitee)
145
+ });
146
+ }, Q = (e) => {
147
+ const { battleId: t } = e.battleInfo;
148
+ l(o.onBattleRequestAccept, {
149
+ battleId: t,
150
+ inviter: a(e.inviter),
151
+ invitee: a(e.invitee)
152
+ });
153
+ }, V = (e) => {
154
+ const { battleId: t } = e.battleInfo;
155
+ l(o.onBattleRequestReject, {
156
+ battleId: t,
157
+ inviter: a(e.inviter),
158
+ invitee: a(e.invitee)
159
+ });
160
+ }, W = [
161
+ { event: r.onBattleEnded, handler: D },
162
+ { event: r.onBattleScoreChanged, handler: $ },
163
+ { event: r.onBattleStarted, handler: z },
164
+ { event: r.onUserExitBattle, handler: F },
165
+ { event: r.onUserJoinBattle, handler: G },
166
+ { event: r.onBattleRequestReceived, handler: H },
167
+ { event: r.onBattleRequestCancelled, handler: K },
168
+ { event: r.onBattleRequestTimeout, handler: P },
169
+ { event: r.onBattleRequestAccept, handler: Q },
170
+ { event: r.onBattleRequestReject, handler: V }
171
+ ], X = () => {
172
+ W.forEach(({ event: e, handler: t }) => {
173
+ var s;
174
+ const n = (s = B.instance) == null ? void 0 : s.getLiveBattleManager();
175
+ n == null || n.on(e, t);
176
+ });
177
+ };
178
+ L(() => {
179
+ var e;
180
+ return (e = M.value) == null ? void 0 : e.liveId;
181
+ }, (e) => {
182
+ e || x();
183
+ });
184
+ O.once("ready", () => {
185
+ X();
186
+ });
187
+ function ae() {
188
+ return {
189
+ currentBattleInfo: E,
190
+ battleUsers: i,
191
+ battleScore: c,
192
+ subscribeEvent: C,
193
+ unsubscribeEvent: j,
194
+ requestBattle: y,
195
+ cancelBattleRequest: N,
196
+ acceptBattle: k,
197
+ rejectBattle: A,
198
+ exitBattle: J
199
+ };
200
+ }
201
+ export {
202
+ ae as useBattleState
203
+ };
@@ -0,0 +1 @@
1
+ export { useBattleState } from './BattleState';
@@ -0,0 +1,4 @@
1
+ import { useBattleState as a } from "./BattleState.js";
2
+ export {
3
+ a as useBattleState
4
+ };