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

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 (498) 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/{PopoverTrigger-L8abAry7.js → PopoverTrigger-CglNN8IV.js} +3 -3
  4. package/dist/{PopperContent-XdhqL8Y2.js → PopperContent-CQa08BXt.js} +1 -1
  5. package/dist/{Teleport-CSEuZbpM.js → Teleport-D3gvcBbZ.js} +278 -268
  6. package/dist/baseComp/Modal/Modal.js +431 -23
  7. package/dist/chat/index.d.ts +68 -53
  8. package/dist/chat/server.js +15 -15
  9. package/dist/components/AudioSetting/AudioMediaControl.js +39 -41
  10. package/dist/components/AudioSetting/AudioSettingTab.js +10 -10
  11. package/dist/components/AudioSetting/MicrophoneSelect.js +8 -8
  12. package/dist/components/AudioSetting/SpeakerSelect.js +9 -9
  13. package/dist/components/AudioSettingPanel/i18n/en-US/index.d.ts +1 -0
  14. package/dist/components/AudioSettingPanel/i18n/en-US/index.js +2 -1
  15. package/dist/components/AudioSettingPanel/i18n/zh-CN/index.d.ts +1 -0
  16. package/dist/components/AudioSettingPanel/i18n/zh-CN/index.js +2 -1
  17. package/dist/components/AudioSettingPanel/index.js +81 -73
  18. package/dist/components/BarrageInput/BarrageInputH5.js +9 -9
  19. package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +4 -4
  20. package/dist/components/BarrageInput/MessageInputState.d.ts +28 -0
  21. package/dist/components/BarrageInput/MessageInputState.js +82 -0
  22. package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
  23. package/dist/components/BarrageInput/TextEditor/EditorCore.js +5 -4
  24. package/dist/components/BarrageInput/TextEditor/index.js +7 -7
  25. package/dist/components/BarrageInput/type.d.ts +17 -0
  26. package/dist/components/BarrageInput/type.js +4 -0
  27. package/dist/components/BarrageInput/utils.d.ts +30 -0
  28. package/dist/components/BarrageInput/utils.js +41 -0
  29. package/dist/components/BarrageList/BarrageList.js +80 -110
  30. package/dist/components/BarrageList/BarrageList.vue.d.ts +0 -29
  31. package/dist/components/BarrageList/BarrageListH5.js +95 -122
  32. package/dist/components/BarrageList/BarrageListH5.vue.d.ts +0 -29
  33. package/dist/components/BarrageList/BarrageListState.d.ts +58 -0
  34. package/dist/components/BarrageList/BarrageListState.js +106 -0
  35. package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.js +16 -24
  36. package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +5 -5
  37. package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.js +48 -73
  38. package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.vue.d.ts +5 -7
  39. package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +70 -76
  40. package/dist/components/BarrageList/Message/TextMessage/TextMessage.vue.d.ts +6 -6
  41. package/dist/components/BarrageList/Message/TextMessage/emoji.d.ts +5 -0
  42. package/dist/components/BarrageList/Message/TextMessage/emoji.js +134 -0
  43. package/dist/components/BarrageList/index.d.ts +0 -36
  44. package/dist/components/CameraButton/index.js +18 -19
  45. package/dist/components/ChatSetting/GroupChatSetting/GroupChatSetting.js +2 -1
  46. package/dist/components/CoGuestPanel/CoGuestPanel.js +60 -60
  47. package/dist/components/CoHostPanel/BattlePanel.js +11 -11
  48. package/dist/components/CoHostPanel/CoHostPanel.js +10 -10
  49. package/dist/components/CoHostPanel/ConfigSettingPanel.js +49 -55
  50. package/dist/components/CoHostPanel/ConnectionPanel.js +132 -123
  51. package/dist/components/CoHostPanel/RecommendHostList.js +39 -36
  52. package/dist/components/CoHostPanel/constants.d.ts +3 -0
  53. package/dist/components/CoHostPanel/constants.js +6 -0
  54. package/dist/components/CoHostPanel/i18n/en-US/index.d.ts +1 -0
  55. package/dist/components/CoHostPanel/i18n/en-US/index.js +2 -1
  56. package/dist/components/CoHostPanel/i18n/zh-CN/index.d.ts +1 -0
  57. package/dist/components/CoHostPanel/i18n/zh-CN/index.js +3 -2
  58. package/dist/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.js +6 -6
  59. package/dist/components/ContactList/ContactInfo/ContactInfo.js +1 -1
  60. package/dist/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.js +1 -1
  61. package/dist/components/ContactList/ContactInfo/FriendInfo/FriendInfo.js +9 -9
  62. package/dist/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.js +1 -1
  63. package/dist/components/ContactList/ContactInfo/GroupInfo/GroupInfo.js +4 -4
  64. package/dist/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.js +8 -8
  65. package/dist/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.js +7 -7
  66. package/dist/components/ContactList/ContactList.js +7 -7
  67. package/dist/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.js +8 -8
  68. package/dist/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.js +5 -5
  69. package/dist/components/ContactList/ContactListItem/FriendItem/FriendItem.js +5 -5
  70. package/dist/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.js +1 -1
  71. package/dist/components/ContactList/ContactListItem/GroupItem/GroupItem.js +1 -1
  72. package/dist/components/ContactList/ContactSearch/ContactSearch.js +6 -6
  73. package/dist/components/ConversationList/ConversationActions/ConversationActions.js +49 -51
  74. package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +9 -9
  75. package/dist/components/ConversationList/ConversationList.js +4 -4
  76. package/dist/components/ConversationList/ConversationList.vue.d.ts +10 -10
  77. package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +10 -10
  78. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +31 -29
  79. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +20 -20
  80. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +2 -2
  81. package/dist/components/ConversationList/ConversationPreview/index.js +1 -1
  82. package/dist/components/ConversationList/index.d.ts +30 -30
  83. package/dist/components/LiveAudienceList/LiveAudienceList.js +44 -45
  84. package/dist/components/LiveAudienceList/LiveAudienceListH5.js +7 -7
  85. package/dist/components/LiveAudienceList/UserActionMenu.js +57 -64
  86. package/dist/components/LiveList/LiveList.js +23 -23
  87. package/dist/components/LiveList/LiveListH5.js +38 -38
  88. package/dist/components/LiveScenePanel/CameraSettingDialog.js +10 -10
  89. package/dist/components/LiveScenePanel/MaterialItem.js +15 -15
  90. package/dist/components/LiveScenePanel/index.js +28 -27
  91. package/dist/components/LiveView/CoreViewDecorate/BattleDecorate.js +58 -58
  92. package/dist/components/LiveView/CoreViewDecorate/BattleUserDecorate.js +6 -6
  93. package/dist/components/LiveView/CoreViewDecorate/CoHostDecorate.js +5 -5
  94. package/dist/components/LiveView/DefaultStreamViewUI.js +44 -41
  95. package/dist/components/LiveView/PlayerControl/AudioControl.js +97 -93
  96. package/dist/components/LiveView/PlayerControl/AudioControl.vue.d.ts +10 -6
  97. package/dist/components/LiveView/PlayerControl/MultiResolution.js +57 -62
  98. package/dist/components/LiveView/PlayerControl/PlayerControl.js +79 -79
  99. package/dist/components/LiveView/PlayerControl/PlayerControlState.d.ts +2 -2
  100. package/dist/components/LiveView/PlayerControl/PlayerControlState.js +164 -209
  101. package/dist/components/LiveView/PlayerControl/utils/domHelpers.d.ts +8 -1
  102. package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +57 -24
  103. package/dist/components/LiveView/i18n/en-US/index.d.ts +2 -2
  104. package/dist/components/LiveView/i18n/en-US/index.js +2 -2
  105. package/dist/components/LiveView/i18n/zh-CN/index.d.ts +2 -2
  106. package/dist/components/LiveView/i18n/zh-CN/index.js +2 -2
  107. package/dist/components/LiveView/index.js +17 -17
  108. package/dist/components/MessageInput/AttachmentPicker/index.js +1 -1
  109. package/dist/components/MessageInput/AudioCallPicker/AudioCallPicker.js +63 -65
  110. package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +88 -84
  111. package/dist/components/MessageInput/MessageInput.js +1 -1
  112. package/dist/components/MessageInput/MessageInput.vue.d.ts +5 -2
  113. package/dist/components/MessageInput/TextEditor/EditorCore.d.ts +3 -1
  114. package/dist/components/MessageInput/TextEditor/EditorCore.js +51 -63
  115. package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +6 -2
  116. package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.d.ts +19 -0
  117. package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +74 -0
  118. package/dist/components/MessageInput/TextEditor/extensions/imageExtension.d.ts +2 -0
  119. package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +62 -0
  120. package/dist/components/MessageInput/TextEditor/index.js +45 -35
  121. package/dist/components/MessageInput/VideoCallPicker/VideoCallPicker.js +67 -69
  122. package/dist/components/MessageInput/i18n/index.d.ts +4 -0
  123. package/dist/components/MessageInput/i18n/zh-CN.d.ts +4 -0
  124. package/dist/components/MessageInput/i18n/zh-CN.js +5 -1
  125. package/dist/components/MessageInput/index.d.ts +36 -6
  126. package/dist/components/MessageInput/index.js +1 -1
  127. package/dist/components/MessageList/Message/AudioMessage/WaveForm.js +24 -34
  128. package/dist/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.js +29 -28
  129. package/dist/components/MessageList/Message/GroupTipMessage/index.js +13 -13
  130. package/dist/components/MessageList/Message/Message.vue.d.ts +1 -1
  131. package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +3 -3
  132. package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +63 -69
  133. package/dist/components/MessageList/Message/VideoMessage/VideoMessage.js +48 -53
  134. package/dist/components/MessageList/Message/VideoMessage/VideoMessage.vue.d.ts +8 -8
  135. package/dist/components/MessageList/MessageList.js +8 -6
  136. package/dist/components/MessageList/MessageList.vue.d.ts +2 -2
  137. package/dist/components/MessageList/i18n/en-US.d.ts +65 -1
  138. package/dist/components/MessageList/i18n/en-US.js +66 -2
  139. package/dist/components/MessageList/i18n/index.d.ts +128 -0
  140. package/dist/components/MessageList/i18n/index.js +6 -6
  141. package/dist/components/MessageList/i18n/zh-CN.d.ts +65 -1
  142. package/dist/components/MessageList/i18n/zh-CN.js +64 -0
  143. package/dist/components/MessageList/index.d.ts +20 -20
  144. package/dist/components/MicButton/index.js +11 -11
  145. package/dist/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.js +172 -174
  146. package/dist/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.js +58 -60
  147. package/dist/components/Search/SearchAdvanced/SearchAdvanced.js +28 -30
  148. package/dist/components/Search/SearchAdvanced/SearchTab/SearchTab.js +22 -24
  149. package/dist/components/Search/SearchAdvanced/Slider/Slider.js +26 -28
  150. package/dist/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.js +133 -135
  151. package/dist/components/Search/SearchBar/SearchBar.js +56 -58
  152. package/dist/components/StreamMixer/LocalMixer/MixerControl.js +12 -12
  153. package/dist/components/StreamMixer/LocalMixer/index.js +66 -63
  154. package/dist/components/StreamView/Layout/CustomLayout.js +8 -8
  155. package/dist/components/StreamView/Layout/FloatLayout.js +124 -127
  156. package/dist/components/StreamView/Layout/GridLayout.js +5 -5
  157. package/dist/components/StreamView/index.js +25 -33
  158. package/dist/components/StreamView/manager/mediaManager.js +54 -60
  159. package/dist/components/UIKitModal/UIKitModal.d.ts +7 -0
  160. package/dist/components/UIKitModal/UIKitModal.js +156 -0
  161. package/dist/components/UIKitModal/index.d.ts +1 -0
  162. package/dist/components/UIKitModal/index.js +4 -0
  163. package/dist/components/{BarrageList/Message/FaceMessage/FaceMessage.vue.d.ts → UIKitModal/index.vue.d.ts} +24 -9
  164. package/dist/components/UIKitModal/type.d.ts +21 -0
  165. package/dist/components/UIKitModal/type.js +1 -0
  166. package/dist/components/UserPicker/UserPicker.js +1 -2
  167. package/dist/components/UserPicker/components/SelectedPanel/SelectedPanel.js +19 -18
  168. package/dist/components/UserPicker/hooks/useSearchFilter.d.ts +2 -2
  169. package/dist/components/UserPicker/hooks/useSearchFilter.js +39 -31
  170. package/dist/components/UserPicker/i18n/en-US.d.ts +1 -0
  171. package/dist/components/UserPicker/i18n/en-US.js +2 -1
  172. package/dist/components/UserPicker/i18n/index.d.ts +2 -0
  173. package/dist/components/UserPicker/i18n/zh-CN.d.ts +1 -0
  174. package/dist/components/UserPicker/i18n/zh-CN.js +2 -1
  175. package/dist/components/UserPicker/index.d.ts +2 -2
  176. package/dist/components/UserPicker/type.d.ts +1 -1
  177. package/dist/components/VideoSetting/CameraSelect.js +8 -8
  178. package/dist/components/VideoSetting/VideoMediaControl.js +10 -10
  179. package/dist/components/VideoSetting/VideoPreview.js +9 -9
  180. package/dist/components/VideoSetting/VideoProfile.js +6 -6
  181. package/dist/components/VideoSetting/VideoSettingTab.js +40 -39
  182. package/dist/components/VideoSettingPanel/CameraSelect.js +8 -8
  183. package/dist/components/VideoSettingPanel/VideoPreview.js +1 -1
  184. package/dist/components/VideoSettingPanel/VideoProfile.js +18 -18
  185. package/dist/hooks/useAudioControl.d.ts +3 -3
  186. package/dist/hooks/useAudioControl.js +32 -30
  187. package/dist/hooks/useRoomEngine.js +6 -6
  188. package/dist/index-B_-9wgM4.js +64 -0
  189. package/dist/{index-Bm-QfV5o.js → index-DMfTuy0v.js} +574 -631
  190. package/dist/{index-D2OVtqc8.js → index-DV6o6s43.js} +946 -915
  191. package/dist/index.d.ts +3 -1
  192. package/dist/index.js +164 -142
  193. package/dist/report/MetricsKey.d.ts +16 -0
  194. package/dist/report/MetricsKey.js +4 -0
  195. package/dist/report/dataReport.d.ts +12 -0
  196. package/dist/report/dataReport.js +45 -0
  197. package/dist/report/index.d.ts +4 -0
  198. package/dist/report/index.js +6 -0
  199. package/dist/rtc/index.d.ts +5 -43
  200. package/dist/rtc/index.js +48 -48
  201. package/dist/rtc/server.js +45 -40
  202. package/dist/states/BarrageState/BarrageState.d.ts +74 -0
  203. package/dist/states/BarrageState/BarrageState.js +80 -0
  204. package/dist/states/BarrageState/index.d.ts +1 -0
  205. package/dist/states/BarrageState/index.js +5 -0
  206. package/dist/states/{BattleState.d.ts → BattleState/BattleState.d.ts} +10 -11
  207. package/dist/states/BattleState/BattleState.js +203 -0
  208. package/dist/states/BattleState/index.d.ts +1 -0
  209. package/dist/states/BattleState/index.js +4 -0
  210. package/dist/states/CoGuestState.d.ts +24 -94
  211. package/dist/states/CoGuestState.js +297 -189
  212. package/dist/states/CoHostState/CoHostState.d.ts +2 -2
  213. package/dist/states/CoHostState/CoHostState.js +135 -131
  214. package/dist/states/{DeviceState.d.ts → DeviceState/DeviceState.d.ts} +25 -13
  215. package/dist/states/DeviceState/DeviceState.js +314 -0
  216. package/dist/states/DeviceState/index.d.ts +1 -0
  217. package/dist/states/DeviceState/index.js +4 -0
  218. package/dist/states/LiveAudienceState.d.ts +3 -1
  219. package/dist/states/LiveAudienceState.js +106 -63
  220. package/dist/states/{LiveState/index.d.ts → LiveListState/LiveListState.d.ts} +13 -8
  221. package/dist/states/LiveListState/LiveListState.js +285 -0
  222. package/dist/states/LiveListState/index.d.ts +1 -0
  223. package/dist/states/LiveListState/index.js +4 -0
  224. package/dist/states/LiveMonitorState/api/http.js +147 -129
  225. package/dist/states/LiveMonitorState/index.js +67 -62
  226. package/dist/states/LiveMonitorState/player/adapters/trtc.js +6 -6
  227. package/dist/states/LiveSeatState/index.d.ts +46 -11
  228. package/dist/states/LiveSeatState/index.js +34 -15
  229. package/dist/states/LiveSeatState/seatEventManager.d.ts +2 -0
  230. package/dist/states/LiveSeatState/seatEventManager.js +63 -42
  231. package/dist/states/LiveSeatState/seatManager.d.ts +34 -5
  232. package/dist/states/LiveSeatState/seatManager.js +131 -29
  233. package/dist/states/LiveSeatState/store.d.ts +5 -5
  234. package/dist/states/LiveSeatState/store.js +12 -10
  235. package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.js +1 -1
  236. package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.js +1 -1
  237. package/dist/states/LiveSeatState/usePlayStream/index.js +30 -28
  238. package/dist/states/LoginState.d.ts +23 -0
  239. package/dist/states/MessageInputState/MessageInputState.d.ts +41 -7
  240. package/dist/states/MessageInputState/MessageInputState.js +60 -59
  241. package/dist/states/MessageInputState/utils.d.ts +8 -1
  242. package/dist/states/MessageInputState/utils.js +30 -10
  243. package/dist/states/SeatStore.js +82 -83
  244. package/dist/states/UIKitModalState/UIKitModalState.d.ts +17 -0
  245. package/dist/states/UIKitModalState/UIKitModalState.js +63 -0
  246. package/dist/states/UIKitModalState/index.d.ts +1 -0
  247. package/dist/states/UIKitModalState/index.js +4 -0
  248. package/dist/states/{VideoMixerState.d.ts → VideoMixerState/VideoMixerState.d.ts} +1 -1
  249. package/dist/states/VideoMixerState/VideoMixerState.js +269 -0
  250. package/dist/states/VideoMixerState/index.d.ts +1 -0
  251. package/dist/states/VideoMixerState/index.js +4 -0
  252. package/dist/styles/index.css +1 -1
  253. package/dist/types/audience.d.ts +21 -0
  254. package/dist/types/audience.js +4 -1
  255. package/dist/types/battle.d.ts +75 -3
  256. package/dist/types/battle.js +5 -1
  257. package/dist/types/coGuest.d.ts +72 -5
  258. package/dist/types/coGuest.js +4 -2
  259. package/dist/types/device.d.ts +38 -17
  260. package/dist/types/device.js +10 -8
  261. package/dist/types/index.d.ts +2 -2
  262. package/dist/types/index.js +96 -80
  263. package/dist/types/live.d.ts +36 -21
  264. package/dist/types/live.js +6 -4
  265. package/dist/types/seat.d.ts +23 -4
  266. package/dist/types/seat.js +7 -1
  267. package/dist/{useId-CtirfF0W.js → useId-oQ5JZeuH.js} +1 -1
  268. package/dist/utils/call.d.ts +1 -1
  269. package/dist/utils/call.js +78 -79
  270. package/dist/utils/eventCenter.d.ts +88 -0
  271. package/dist/utils/eventCenter.js +161 -0
  272. package/dist/{utils-DaB7eSu5.js → utils-DuzSgmS6.js} +1 -1
  273. package/package.json +4 -3
  274. package/src/chat/server.ts +0 -1
  275. package/src/components/AudioSetting/AudioMediaControl.vue +1 -3
  276. package/src/components/AudioSetting/AudioSettingTab.vue +1 -2
  277. package/src/components/AudioSetting/MicrophoneSelect.vue +1 -2
  278. package/src/components/AudioSetting/SpeakerSelect.vue +1 -2
  279. package/src/components/AudioSettingPanel/i18n/en-US/index.ts +1 -0
  280. package/src/components/AudioSettingPanel/i18n/zh-CN/index.ts +1 -0
  281. package/src/components/AudioSettingPanel/index.vue +4 -2
  282. package/src/components/BarrageInput/BarrageInputH5.vue +1 -1
  283. package/src/components/BarrageInput/EmojiPicker/EmojiPicker.vue +1 -1
  284. package/src/components/BarrageInput/MessageInputState.ts +160 -0
  285. package/src/components/BarrageInput/TextEditor/TextEditor.vue +1 -1
  286. package/src/components/BarrageInput/type.ts +26 -0
  287. package/src/components/BarrageInput/utils.ts +45 -0
  288. package/src/components/BarrageList/BarrageList.vue +61 -117
  289. package/src/components/BarrageList/BarrageListH5.vue +75 -159
  290. package/src/components/BarrageList/BarrageListState.ts +223 -0
  291. package/src/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +8 -55
  292. package/src/components/BarrageList/Message/MessageLayout/MessageLayout.vue +19 -44
  293. package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +69 -96
  294. package/src/components/BarrageList/Message/TextMessage/emoji.ts +132 -0
  295. package/src/components/CameraButton/index.vue +0 -1
  296. package/src/components/ChatSetting/GroupChatSetting/GroupChatSetting.vue +5 -0
  297. package/src/components/CoGuestPanel/CoGuestPanel.vue +16 -91
  298. package/src/components/CoHostPanel/BattlePanel.vue +1 -4
  299. package/src/components/CoHostPanel/ConfigSettingPanel.vue +2 -8
  300. package/src/components/CoHostPanel/ConnectionPanel.vue +37 -33
  301. package/src/components/CoHostPanel/RecommendHostList.vue +12 -13
  302. package/src/components/CoHostPanel/constants.ts +3 -0
  303. package/src/components/CoHostPanel/i18n/en-US/index.ts +1 -0
  304. package/src/components/CoHostPanel/i18n/zh-CN/index.ts +2 -1
  305. package/src/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.vue +1 -1
  306. package/src/components/ContactList/ContactInfo/ContactInfo.vue +1 -1
  307. package/src/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.vue +1 -1
  308. package/src/components/ContactList/ContactInfo/FriendInfo/FriendInfo.vue +1 -1
  309. package/src/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.vue +1 -1
  310. package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.vue +1 -1
  311. package/src/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.vue +1 -1
  312. package/src/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.vue +1 -1
  313. package/src/components/ContactList/ContactList.vue +1 -1
  314. package/src/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.vue +1 -1
  315. package/src/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.vue +1 -1
  316. package/src/components/ContactList/ContactListItem/FriendItem/FriendItem.vue +1 -1
  317. package/src/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.vue +1 -1
  318. package/src/components/ContactList/ContactListItem/GroupItem/GroupItem.vue +1 -1
  319. package/src/components/ContactList/ContactSearch/ContactSearch.vue +1 -1
  320. package/src/components/ConversationList/ConversationActions/ConversationActions.vue +2 -8
  321. package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +2 -2
  322. package/src/components/ConversationList/ConversationCreate/ConversationCreateButton/ConversationCreateButton.vue +1 -1
  323. package/src/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.vue +1 -1
  324. package/src/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.vue +1 -1
  325. package/src/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.vue +1 -1
  326. package/src/components/ConversationList/ConversationList.vue +2 -2
  327. package/src/components/ConversationList/ConversationListContent/ConversationListContent.vue +1 -1
  328. package/src/components/ConversationList/ConversationListHeader/ConversationListHeader.vue +1 -1
  329. package/src/components/ConversationList/ConversationPlaceHolder/ConversationPlaceHolder.vue +1 -1
  330. package/src/components/ConversationList/ConversationPreview/ConversationPreview.vue +1 -1
  331. package/src/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.vue +1 -1
  332. package/src/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.vue +4 -4
  333. package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +1 -1
  334. package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +3 -3
  335. package/src/components/ConversationList/ConversationPreview/ConversationPreviewUnread.vue +1 -1
  336. package/src/components/ConversationList/ConversationSearch/ConversationSearch.vue +1 -1
  337. package/src/components/LiveAudienceList/LiveAudienceList.vue +4 -5
  338. package/src/components/LiveAudienceList/LiveAudienceListH5.vue +2 -2
  339. package/src/components/LiveAudienceList/UserActionMenu.vue +7 -48
  340. package/src/components/LiveList/LiveList.vue +5 -5
  341. package/src/components/LiveList/LiveListH5.vue +6 -6
  342. package/src/components/LiveScenePanel/index.vue +3 -2
  343. package/src/components/LiveView/CoreViewDecorate/BattleDecorate.vue +10 -15
  344. package/src/components/LiveView/CoreViewDecorate/BattleUserDecorate.vue +2 -2
  345. package/src/components/LiveView/DefaultStreamViewUI.vue +5 -3
  346. package/src/components/LiveView/PlayerControl/AudioControl.vue +72 -80
  347. package/src/components/LiveView/PlayerControl/MultiResolution.vue +30 -21
  348. package/src/components/LiveView/PlayerControl/PlayerControl.vue +26 -42
  349. package/src/components/LiveView/PlayerControl/PlayerControlState.ts +253 -455
  350. package/src/components/LiveView/PlayerControl/utils/domHelpers.ts +68 -4
  351. package/src/components/LiveView/i18n/en-US/index.ts +2 -2
  352. package/src/components/LiveView/i18n/zh-CN/index.ts +2 -2
  353. package/src/components/LiveView/index.vue +3 -2
  354. package/src/components/MessageInput/AudioCallPicker/AudioCallPicker.vue +8 -6
  355. package/src/components/MessageInput/EmojiPicker/EmojiPicker.vue +7 -3
  356. package/src/components/MessageInput/MessageInput.module.scss +1 -0
  357. package/src/components/MessageInput/MessageInput.vue +3 -1
  358. package/src/components/MessageInput/TextEditor/EditorCore.ts +17 -28
  359. package/src/components/MessageInput/TextEditor/TextEditor.vue +24 -4
  360. package/src/components/MessageInput/TextEditor/extensions/characterCountExtension.ts +159 -0
  361. package/src/components/MessageInput/TextEditor/extensions/imageExtension.ts +79 -0
  362. package/src/components/MessageInput/VideoCallPicker/VideoCallPicker.vue +8 -6
  363. package/src/components/MessageInput/i18n/zh-CN.ts +4 -0
  364. package/src/components/MessageInput/types.d.ts +1 -0
  365. package/src/components/MessageList/Message/AudioMessage/WaveForm.vue +20 -37
  366. package/src/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.vue +5 -3
  367. package/src/components/MessageList/Message/GroupTipMessage/GroupTipMessage.vue +5 -4
  368. package/src/components/MessageList/Message/Message.vue +1 -1
  369. package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +8 -8
  370. package/src/components/MessageList/Message/VideoMessage/VideoMessage.vue +46 -43
  371. package/src/components/MessageList/Message/VideoMessage/index.ts +1 -1
  372. package/src/components/MessageList/MessageList.vue +2 -0
  373. package/src/components/MessageList/i18n/en-US.ts +66 -0
  374. package/src/components/MessageList/i18n/index.ts +4 -4
  375. package/src/components/MessageList/i18n/zh-CN.ts +66 -0
  376. package/src/components/MicButton/index.vue +3 -3
  377. package/src/components/Search/Search.vue +1 -1
  378. package/src/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.scss +1 -4
  379. package/src/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.vue +1 -1
  380. package/src/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.scss +1 -4
  381. package/src/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.vue +1 -1
  382. package/src/components/Search/SearchAdvanced/SearchAdvanced.scss +1 -4
  383. package/src/components/Search/SearchAdvanced/SearchAdvanced.vue +1 -1
  384. package/src/components/Search/SearchAdvanced/SearchTab/SearchTab.scss +1 -4
  385. package/src/components/Search/SearchAdvanced/SearchTab/SearchTab.vue +1 -1
  386. package/src/components/Search/SearchAdvanced/Slider/Slider.scss +1 -4
  387. package/src/components/Search/SearchAdvanced/Slider/Slider.vue +1 -1
  388. package/src/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.scss +1 -4
  389. package/src/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.vue +1 -1
  390. package/src/components/Search/SearchBar/SearchBar.scss +3 -6
  391. package/src/components/Search/SearchBar/SearchBar.vue +1 -1
  392. package/src/components/Search/SearchResults/EmptyResult/EmptyResult.vue +1 -1
  393. package/src/components/Search/SearchResults/Loading/Loading.vue +1 -1
  394. package/src/components/Search/SearchResults/SearchResults.vue +1 -1
  395. package/src/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.vue +1 -1
  396. package/src/components/Search/SearchResults/SearchResultsItem/Group/Group.vue +1 -1
  397. package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.vue +1 -1
  398. package/src/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.vue +1 -1
  399. package/src/components/Search/SearchResults/SearchResultsItem/User/User.vue +1 -1
  400. package/src/components/StreamMixer/LocalMixer/index.vue +6 -8
  401. package/src/components/StreamView/Layout/CustomLayout.vue +2 -2
  402. package/src/components/StreamView/Layout/FloatLayout.vue +88 -83
  403. package/src/components/StreamView/index.vue +28 -14
  404. package/src/components/StreamView/manager/mediaManager.ts +38 -42
  405. package/src/components/UIKitModal/UIKitModal.ts +71 -0
  406. package/src/components/UIKitModal/index.scss +134 -0
  407. package/src/components/UIKitModal/index.ts +1 -0
  408. package/src/components/UIKitModal/index.vue +160 -0
  409. package/src/components/UIKitModal/type.ts +24 -0
  410. package/src/components/UserPicker/UserPicker.vue +1 -1
  411. package/src/components/UserPicker/components/SelectedPanel/SelectedPanel.vue +1 -0
  412. package/src/components/UserPicker/hooks/useSearchFilter.ts +27 -18
  413. package/src/components/UserPicker/i18n/en-US.ts +1 -0
  414. package/src/components/UserPicker/i18n/zh-CN.ts +1 -0
  415. package/src/components/UserPicker/type.ts +1 -1
  416. package/src/components/VideoSetting/CameraSelect.vue +1 -2
  417. package/src/components/VideoSetting/VideoMediaControl.vue +1 -1
  418. package/src/components/VideoSetting/VideoPreview.vue +1 -2
  419. package/src/components/VideoSetting/VideoProfile.vue +1 -1
  420. package/src/components/VideoSetting/VideoSettingTab.vue +9 -5
  421. package/src/components/VideoSettingPanel/CameraSelect.vue +1 -2
  422. package/src/components/VideoSettingPanel/VideoProfile.vue +7 -7
  423. package/src/hooks/useAudioControl.ts +17 -4
  424. package/src/hooks/useRoomEngine.ts +1 -1
  425. package/src/index.ts +3 -0
  426. package/src/report/MetricsKey.ts +16 -0
  427. package/src/report/dataReport.ts +55 -0
  428. package/src/report/index.ts +7 -0
  429. package/src/rtc/index.ts +7 -9
  430. package/src/rtc/server.ts +4 -0
  431. package/src/types/audience.ts +27 -1
  432. package/src/types/battle.ts +87 -4
  433. package/src/types/coGuest.ts +87 -5
  434. package/src/types/device.ts +41 -16
  435. package/src/types/index.ts +2 -2
  436. package/src/types/live.ts +41 -22
  437. package/src/types/seat.ts +28 -4
  438. package/src/utils/call.ts +26 -27
  439. package/src/utils/eventCenter.ts +249 -0
  440. package/dist/DialogPortal-CvJcEAsn.js +0 -417
  441. package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.js +0 -23
  442. package/dist/components/BarrageList/Message/FaceMessage/index.d.ts +0 -3
  443. package/dist/components/BarrageList/Message/FaceMessage/index.js +0 -4
  444. package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +0 -4
  445. package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +0 -16
  446. package/dist/components/BarrageList/Message/GroupTipMessage/index.d.ts +0 -3
  447. package/dist/components/BarrageList/Message/GroupTipMessage/index.js +0 -25
  448. package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +0 -71
  449. package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.vue.d.ts +0 -34
  450. package/dist/components/BarrageList/Message/ImageMessage/index.d.ts +0 -3
  451. package/dist/components/BarrageList/Message/ImageMessage/index.js +0 -4
  452. package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +0 -9
  453. package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.vue.d.ts +0 -2
  454. package/dist/components/BarrageList/Message/MergerMessage/index.d.ts +0 -3
  455. package/dist/components/BarrageList/Message/MergerMessage/index.js +0 -4
  456. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +0 -40
  457. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue.d.ts +0 -54
  458. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +0 -26
  459. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue.d.ts +0 -15
  460. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.d.ts +0 -3
  461. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +0 -4
  462. package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +0 -41
  463. package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue.d.ts +0 -35
  464. package/dist/components/BarrageList/Message/RecalledMessage/index.d.ts +0 -3
  465. package/dist/components/BarrageList/Message/RecalledMessage/index.js +0 -4
  466. package/dist/components/BarrageList/MessageForward/ForwardListItem.js +0 -45
  467. package/dist/components/BarrageList/MessageForward/ForwardListItem.vue.d.ts +0 -17
  468. package/dist/components/BarrageList/MessageForward/MessageForward.js +0 -203
  469. package/dist/components/BarrageList/MessageForward/MessageForward.vue.d.ts +0 -2
  470. package/dist/components/BarrageList/MessageForward/index.d.ts +0 -3
  471. package/dist/components/BarrageList/MessageForward/index.js +0 -4
  472. package/dist/components/StreamView/Layout/MixLayout.js +0 -89
  473. package/dist/components/StreamView/Layout/MixLayout.vue.d.ts +0 -31
  474. package/dist/states/BarrageListState/BarrageListState.d.ts +0 -26
  475. package/dist/states/BarrageListState/BarrageListState.js +0 -122
  476. package/dist/states/BarrageListState/index.d.ts +0 -1
  477. package/dist/states/BarrageListState/index.js +0 -4
  478. package/dist/states/BattleState.js +0 -117
  479. package/dist/states/DeviceState.js +0 -296
  480. package/dist/states/LiveState/index.js +0 -254
  481. package/dist/states/VideoMixerState.js +0 -260
  482. package/src/components/BarrageList/Message/FaceMessage/FaceMessage.vue +0 -43
  483. package/src/components/BarrageList/Message/FaceMessage/index.ts +0 -3
  484. package/src/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue +0 -55
  485. package/src/components/BarrageList/Message/GroupTipMessage/index.ts +0 -3
  486. package/src/components/BarrageList/Message/ImageMessage/ImageMessage.vue +0 -181
  487. package/src/components/BarrageList/Message/ImageMessage/index.ts +0 -3
  488. package/src/components/BarrageList/Message/MergerMessage/MergerMessage.vue +0 -6
  489. package/src/components/BarrageList/Message/MergerMessage/index.ts +0 -3
  490. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +0 -70
  491. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue +0 -40
  492. package/src/components/BarrageList/Message/MessageLayout/MessageMeta/index.ts +0 -3
  493. package/src/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue +0 -82
  494. package/src/components/BarrageList/Message/RecalledMessage/index.ts +0 -3
  495. package/src/components/BarrageList/MessageForward/ForwardListItem.vue +0 -67
  496. package/src/components/BarrageList/MessageForward/MessageForward.vue +0 -388
  497. package/src/components/BarrageList/MessageForward/index.ts +0 -3
  498. package/src/components/StreamView/Layout/MixLayout.vue +0 -144
@@ -1,40 +1,142 @@
1
- var y = Object.defineProperty;
2
- var d = (o, t, a) => t in o ? y(o, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : o[t] = a;
3
- var s = (o, t, a) => d(o, typeof t != "symbol" ? t + "" : t, a);
4
- import { useRoomEngine as S } from "../../hooks/useRoomEngine.js";
5
- import { usePlayStream as k } from "./usePlayStream/index.js";
6
- const c = S(), { startPlayStream: f, stopPlayStream: P } = k(), e = class e {
1
+ var p = Object.defineProperty;
2
+ var w = (r, e, t) => e in r ? p(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var k = (r, e, t) => w(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { useRoomEngine as A } from "../../hooks/useRoomEngine.js";
5
+ import { usePlayStream as I } from "./usePlayStream/index.js";
6
+ import { useLoginState as v } from "../LoginState.js";
7
+ import { TUIRole as U, TUIMoveSeatPolicy as u, TUIMediaDevice as f } from "@tencentcloud/tuiroom-engine-js";
8
+ import { useSeatStore as L } from "./store.js";
9
+ import { MoveSeatPolicy as d } from "../../types/seat.js";
10
+ const i = A(), { startPlayStream: P, stopPlayStream: R } = I(), { loginUserInfo: g } = v(), { seatList: S } = L(), l = class l {
7
11
  constructor() {
8
- s(this, "lockSeat", async ({ seatIndex: t, isLocked: a }) => {
9
- var r, m;
10
- const n = await ((r = c.instance) == null ? void 0 : r.getSeatList()), i = n == null ? void 0 : n.find((u) => u.index === t);
11
- if (i)
12
- return await ((m = c.instance) == null ? void 0 : m.lockSeatByAdmin({
13
- seatIndex: t,
14
- lockParams: {
15
- lockSeat: a,
16
- lockVideo: i.isVideoLocked,
17
- lockAudio: i.isAudioLocked
18
- }
19
- }));
12
+ l.instance || (l.instance = this);
13
+ }
14
+ async takeSeat({ seatIndex: e }) {
15
+ var o, a, n;
16
+ if ((await ((a = i.instance) == null ? void 0 : a.getUserInfo({ userId: ((o = g.value) == null ? void 0 : o.userId) || "" }))).userRole === U.kAdministrator)
17
+ throw new Error("general user please use applyForSeat in useCoGuestState to take seat");
18
+ return await ((n = i.instance) == null ? void 0 : n.takeSeat({
19
+ seatIndex: e,
20
+ timeout: 0
21
+ }));
22
+ }
23
+ async leaveSeat() {
24
+ var e;
25
+ return await ((e = i.instance) == null ? void 0 : e.leaveSeat());
26
+ }
27
+ async lockSeat({ seatIndex: e }) {
28
+ var a, n;
29
+ const t = await ((a = i.instance) == null ? void 0 : a.getSeatList()), o = t == null ? void 0 : t.find((c) => c.index === e);
30
+ if (o)
31
+ return await ((n = i.instance) == null ? void 0 : n.lockSeatByAdmin({
32
+ seatIndex: e,
33
+ lockParams: {
34
+ lockSeat: !0,
35
+ lockVideo: o.isVideoLocked,
36
+ lockAudio: o.isAudioLocked
37
+ }
38
+ }));
39
+ }
40
+ async unLockSeat({ seatIndex: e }) {
41
+ var a, n;
42
+ const t = await ((a = i.instance) == null ? void 0 : a.getSeatList()), o = t == null ? void 0 : t.find((c) => c.index === e);
43
+ if (o)
44
+ return await ((n = i.instance) == null ? void 0 : n.lockSeatByAdmin({
45
+ seatIndex: e,
46
+ lockParams: {
47
+ lockSeat: !1,
48
+ lockVideo: o.isVideoLocked,
49
+ lockAudio: o.isAudioLocked
50
+ }
51
+ }));
52
+ }
53
+ async kickUserOutOfSeat({ userId: e }) {
54
+ var o;
55
+ const t = S.value.find((a) => {
56
+ var n;
57
+ return ((n = a.userInfo) == null ? void 0 : n.userId) === e;
20
58
  });
21
- e.instance || (e.instance = this);
59
+ if (t)
60
+ return await ((o = i.instance) == null ? void 0 : o.kickUserOffSeatByAdmin({
61
+ seatIndex: t.index,
62
+ userId: e
63
+ }));
64
+ }
65
+ async moveUserToSeat({ userId: e, targetIndex: t, policy: o }) {
66
+ var c;
67
+ if (!S.value.find((s) => {
68
+ var m;
69
+ return ((m = s.userInfo) == null ? void 0 : m.userId) === e;
70
+ }))
71
+ return;
72
+ const n = {
73
+ [d.AbortWhenOccupied]: u.kAbortWhenOccupied,
74
+ [d.ForceReplace]: u.kForceReplace,
75
+ [d.SwapPosition]: u.kSwapPosition
76
+ };
77
+ return await ((c = i.instance) == null ? void 0 : c.moveUserToSeatByAdmin({
78
+ userId: e,
79
+ targetSeatIndex: t,
80
+ policy: n[o]
81
+ }));
82
+ }
83
+ async closeRemoteCamera({ userId: e }) {
84
+ var t;
85
+ return await ((t = i.instance) == null ? void 0 : t.closeRemoteDeviceByAdmin({
86
+ userId: e,
87
+ device: f.kCamera
88
+ }));
22
89
  }
23
- async moveToSeat({ targetSeatIndex: t }) {
24
- var a;
25
- return await ((a = c.instance) == null ? void 0 : a.moveToSeat({
26
- targetSeatIndex: t
90
+ async closeRemoteMicrophone({ userId: e }) {
91
+ var t;
92
+ return await ((t = i.instance) == null ? void 0 : t.closeRemoteDeviceByAdmin({
93
+ userId: e,
94
+ device: f.kMicrophone
27
95
  }));
28
96
  }
29
- async startPlayStream({ view: t }) {
30
- return await f({ view: t });
97
+ async openRemoteCamera({ userId: e, policy: t }) {
98
+ var n, c;
99
+ const o = await ((n = i.instance) == null ? void 0 : n.getSeatList()), a = o == null ? void 0 : o.find((s) => (s == null ? void 0 : s.userId) === e);
100
+ if (a)
101
+ return await ((c = i.instance) == null ? void 0 : c.lockSeatByAdmin({
102
+ seatIndex: a.index,
103
+ lockParams: {
104
+ lockSeat: a.isLocked,
105
+ lockVideo: !1,
106
+ lockAudio: a.isAudioLocked
107
+ }
108
+ }));
109
+ }
110
+ async openRemoteMicrophone({ userId: e, policy: t }) {
111
+ var n, c;
112
+ const o = await ((n = i.instance) == null ? void 0 : n.getSeatList()), a = o == null ? void 0 : o.find((s) => (s == null ? void 0 : s.userId) === e);
113
+ if (a)
114
+ return await ((c = i.instance) == null ? void 0 : c.lockSeatByAdmin({
115
+ seatIndex: a.index,
116
+ lockParams: {
117
+ lockSeat: a.isLocked,
118
+ lockVideo: a.isVideoLocked,
119
+ lockAudio: !1
120
+ }
121
+ }));
122
+ }
123
+ async muteMicrophone() {
124
+ var e;
125
+ await ((e = i.instance) == null ? void 0 : e.muteLocalAudio());
126
+ }
127
+ async unmuteMicrophone() {
128
+ var e;
129
+ await ((e = i.instance) == null ? void 0 : e.unmuteLocalAudio());
130
+ }
131
+ async startPlayStream({ view: e }) {
132
+ return await P({ view: e });
31
133
  }
32
134
  async stopPlayStream() {
33
- return await P();
135
+ return await R();
34
136
  }
35
137
  };
36
- s(e, "instance");
37
- let l = e;
138
+ k(l, "instance");
139
+ let y = l;
38
140
  export {
39
- l as default
141
+ y as default
40
142
  };
@@ -1,5 +1,5 @@
1
1
  import { Ref } from 'vue';
2
- import { SeatInfo, LiveCanvas, TUINetwork } from '../../types';
2
+ import { SeatInfo, LiveCanvas, NetworkInfo } from '../../types';
3
3
 
4
4
  export declare function useSeatStore(): {
5
5
  canvas: Ref<{
@@ -15,15 +15,15 @@ export declare function useSeatStore(): {
15
15
  speakingUsers: 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>>)>;
16
16
  networkQualities: Ref<Map<string, {
17
17
  userId: string;
18
- quality: import('../..').TUINetworkQuality;
18
+ quality: import('../..').NetworkQuality;
19
19
  upLoss: number;
20
20
  downLoss: number;
21
21
  delay: number;
22
- }> & Omit<Map<string, TUINetwork>, keyof Map<any, any>>, Map<string, TUINetwork> | (Map<string, {
22
+ }> & Omit<Map<string, NetworkInfo>, keyof Map<any, any>>, Map<string, NetworkInfo> | (Map<string, {
23
23
  userId: string;
24
- quality: import('../..').TUINetworkQuality;
24
+ quality: import('../..').NetworkQuality;
25
25
  upLoss: number;
26
26
  downLoss: number;
27
27
  delay: number;
28
- }> & Omit<Map<string, TUINetwork>, keyof Map<any, any>>)>;
28
+ }> & Omit<Map<string, NetworkInfo>, keyof Map<any, any>>)>;
29
29
  };
@@ -1,13 +1,15 @@
1
- import { ref as t, watch as r } from "vue";
2
- import { useLiveState as s } from "../LiveState/index.js";
3
- import { LiveStatus as n } from "../../types/live.js";
4
- const { localLiveStatus: u } = s(), e = t({
1
+ import { ref as t, watch as n } from "vue";
2
+ import { useLiveListState as r } from "../LiveListState/LiveListState.js";
3
+ const { currentLive: o } = r(), i = t({
5
4
  width: 0,
6
5
  height: 0,
7
6
  background: ""
8
- }), a = t([]), c = t(/* @__PURE__ */ new Map()), m = t(/* @__PURE__ */ new Map());
9
- r(u, (i, o) => {
10
- o && i === n.IDLE && (e.value = {
7
+ }), a = t([]), s = t(/* @__PURE__ */ new Map()), u = t(/* @__PURE__ */ new Map());
8
+ n(() => {
9
+ var e;
10
+ return (e = o.value) == null ? void 0 : e.liveId;
11
+ }, (e) => {
12
+ e || (i.value = {
11
13
  width: 0,
12
14
  height: 0,
13
15
  background: ""
@@ -15,10 +17,10 @@ r(u, (i, o) => {
15
17
  }, { immediate: !0 });
16
18
  function v() {
17
19
  return {
18
- canvas: e,
20
+ canvas: i,
19
21
  seatList: a,
20
- speakingUsers: c,
21
- networkQualities: m
22
+ speakingUsers: s,
23
+ networkQualities: u
22
24
  };
23
25
  }
24
26
  export {
@@ -4,7 +4,7 @@ var o = (c, a, t) => I(c, typeof a != "symbol" ? a + "" : a, t);
4
4
  import { TUIVideoStreamType as y } from "@tencentcloud/tuiroom-engine-js";
5
5
  import M from "./RTCStreamPlayer.js";
6
6
  import { useLoginState as S } from "../../LoginState.js";
7
- import { useVideoMixerState as g } from "../../VideoMixerState.js";
7
+ import { useVideoMixerState as g } from "../../VideoMixerState/VideoMixerState.js";
8
8
  import { DeviceStatus as l } from "../../../types/device.js";
9
9
  const { loginUserInfo: m } = S(), { isVideoMixerEnabled: f } = g(), n = class n {
10
10
  constructor() {
@@ -4,7 +4,7 @@ var s = (r, e, t) => m(r, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { TUIVideoStreamType as u, TRTCVideoFillMode as p, TRTCVideoRotation as T, TRTCVideoMirrorType as w } from "@tencentcloud/tuiroom-engine-js";
5
5
  import { useRoomEngine as V } from "../../../hooks/useRoomEngine.js";
6
6
  import { useLoginState as v } from "../../LoginState.js";
7
- import { useVideoMixerState as I } from "../../VideoMixerState.js";
7
+ import { useVideoMixerState as I } from "../../VideoMixerState/VideoMixerState.js";
8
8
  const a = V(), { loginUserInfo: h } = v(), { isVideoMixerEnabled: c } = I();
9
9
  class S {
10
10
  constructor(e) {
@@ -1,59 +1,61 @@
1
- import { RTCStreamManager as p } from "./RTCStreamManager.js";
2
- import { MixStreamPlayer as m } from "./MixStreamPlayer.js";
3
1
  import { ref as i, watch as r } from "vue";
4
- import { useStreamPosition as I } from "./useStreamPostion.js";
5
- import h, { TUIRoomEvents as y } from "@tencentcloud/tuiroom-engine-js";
6
- import { useRoomEngine as E } from "../../../hooks/useRoomEngine.js";
7
- import { useLiveState as O } from "../../LiveState/index.js";
8
- import { LiveStatus as R } from "../../../types/live.js";
9
- import { DeviceStatus as c } from "../../../types/device.js";
10
- const S = E(), { positionList: d, createResizeObserver: C, deleteResizeObserver: L } = I(), { localLiveStatus: U } = O(), n = i(!1), T = i(null), a = new m(), s = new p();
2
+ import p, { TUIRoomEvents as I } from "@tencentcloud/tuiroom-engine-js";
3
+ import { useRoomEngine as m } from "../../../hooks/useRoomEngine.js";
4
+ import { MixStreamPlayer as h } from "./MixStreamPlayer.js";
5
+ import { RTCStreamManager as y } from "./RTCStreamManager.js";
6
+ import { useStreamPosition as O } from "./useStreamPostion.js";
7
+ import { useLiveListState as R } from "../../LiveListState/LiveListState.js";
8
+ import { DeviceStatus as d } from "../../../types/device.js";
9
+ const E = m(), { positionList: c, createResizeObserver: C, deleteResizeObserver: S } = O(), { currentLive: U } = R(), a = i(!1), L = i(null), n = new h(), s = new y();
11
10
  let f = "";
12
11
  const l = i(null), u = i([]);
13
- async function V({ view: e }) {
12
+ async function T({ view: e }) {
14
13
  var t, o;
15
- f = e, n.value = !0, C({ view: e }), (t = l.value) != null && t.userId && ((o = l.value) == null ? void 0 : o.cameraStatus) === c.On ? await (a == null ? void 0 : a.start({ view: e, userInfo: l.value })) : u.value.length > 0 && await (s == null ? void 0 : s.start({ view: e, userList: u.value }));
14
+ f = e, a.value = !0, C({ view: e }), (t = l.value) != null && t.userId && ((o = l.value) == null ? void 0 : o.cameraStatus) === d.On ? await (n == null ? void 0 : n.start({ view: e, userInfo: l.value })) : u.value.length > 0 && await (s == null ? void 0 : s.start({ view: e, userList: u.value }));
16
15
  }
17
- r(d, (e) => {
16
+ r(c, (e) => {
18
17
  u.value.forEach((t) => {
19
18
  e.find((o) => o.userId === t.userId) && (t.rect = e.find((o) => o.userId === t.userId));
20
- }), n.value && u.value.length > 0 && s.update({ userList: u.value });
19
+ }), a.value && u.value.length > 0 && s.update({ userList: u.value });
21
20
  });
22
- async function b() {
23
- a == null || a.stop(), s == null || s.stop(), T.value = null, n.value = !1, f = "", L();
21
+ async function V() {
22
+ n == null || n.stop(), s == null || s.stop(), L.value = null, a.value = !1, f = "", S();
24
23
  }
25
- function w(e) {
24
+ function b(e) {
26
25
  const { userId: t, hasVideo: o } = e;
27
26
  t.indexOf("livekit_") === 0 ? l.value = o ? {
28
27
  userId: t,
29
- cameraStatus: c.On
30
- } : null : o ? u.value.push({ userId: t, cameraStatus: c.On, rect: d.value.find((v) => v.userId === t) }) : u.value = u.value.filter((v) => v.userId !== t);
28
+ cameraStatus: d.On
29
+ } : null : o ? u.value.push({ userId: t, cameraStatus: d.On, rect: c.value.find((v) => v.userId === t) }) : u.value = u.value.filter((v) => v.userId !== t);
31
30
  }
32
31
  r(() => l.value, (e) => {
33
- n.value && (e ? a.start({ view: f, userInfo: l.value }) : a.stop());
32
+ a.value && (e ? n.start({ view: f, userInfo: l.value }) : n.stop());
34
33
  });
35
34
  r(
36
35
  () => u.value.length,
37
36
  (e, t) => {
38
- n.value && (t === 0 && e > 0 && (s == null || s.start({ view: f, userList: u.value })), t > 0 && e === 0 && (s == null || s.stop()));
37
+ a.value && (t === 0 && e > 0 && (s == null || s.start({ view: f, userList: u.value })), t > 0 && e === 0 && (s == null || s.stop()));
39
38
  }
40
39
  );
41
40
  r(
42
- () => U.value,
41
+ () => {
42
+ var e;
43
+ return (e = U.value) == null ? void 0 : e.liveId;
44
+ },
43
45
  (e) => {
44
- e === R.IDLE && n.value && (l.value = null, u.value = []);
46
+ e || (l.value = null, u.value = []);
45
47
  }
46
48
  );
47
- h.once("ready", () => {
49
+ p.once("ready", () => {
48
50
  var e;
49
- (e = S.instance) == null || e.on(y.onUserVideoStateChanged, w);
51
+ (e = E.instance) == null || e.on(I.onUserVideoStateChanged, b);
50
52
  });
51
- function q() {
53
+ function g() {
52
54
  return {
53
- startPlayStream: V,
54
- stopPlayStream: b
55
+ startPlayStream: T,
56
+ stopPlayStream: V
55
57
  };
56
58
  }
57
59
  export {
58
- q as usePlayStream
60
+ g as usePlayStream
59
61
  };
@@ -3,6 +3,29 @@ import { LoginParams, LoginUserInfo, SetSelfInfoParams } from '../types/login';
3
3
  declare function login(options: LoginParams): Promise<void>;
4
4
  declare function setSelfInfo(options: SetSelfInfoParams): Promise<void>;
5
5
  declare function logout(): Promise<void>;
6
+ /**
7
+ * 用户登录状态管理 Hook
8
+ * @memberof module:LoginState
9
+ * @description 提供用户登录、登出、个人信息管理等功能
10
+ * @returns {Object} 返回登录状态管理对象
11
+ * @returns {Ref<LoginUserInfo | null>} returns.loginUserInfo - 当前登录用户信息
12
+ * @returns {Function} returns.login - 登录函数
13
+ * @returns {Function} returns.logout - 登出函数
14
+ * @returns {Function} returns.setSelfInfo - 设置个人信息函数
15
+ * @example
16
+ * ```typescript
17
+ * const { loginUserInfo, login, logout, setSelfInfo } = useLoginState();
18
+ *
19
+ * // 登录
20
+ * await login({ userId: 'user123', userSig: 'sig', sdkAppId: 123456 });
21
+ *
22
+ * // 设置个人信息
23
+ * await setSelfInfo({ nick: '新昵称' });
24
+ *
25
+ * // 登出
26
+ * await logout();
27
+ * ```
28
+ */
6
29
  export declare function useLoginState(): {
7
30
  loginUserInfo: import('vue').Ref<{
8
31
  userId: string;
@@ -3,13 +3,13 @@ import { MessageContentType, InputContent } from './type';
3
3
  import { Editor } from '@tiptap/vue-3';
4
4
 
5
5
  /**
6
- * Message Input Store
7
- *
8
- * This store manages the state and operations related to the chat message input, including:
9
- * - Raw input value (text or structured content)
10
- * - Editor instance management
11
- * - Content manipulation (insertion, updating, etc.)
12
- * - Message sending functionality
6
+ * 消息输入状态管理
7
+ * @module MessageInputState
8
+ * @description 管理聊天消息输入相关的状态和操作,包括:
9
+ * - 原始输入值(文本或结构化内容)
10
+ * - 编辑器实例管理
11
+ * - 内容操作(插入、更新等)
12
+ * - 消息发送功能
13
13
  */
14
14
  interface MessageInputState {
15
15
  inputRawValue: Ref<string | InputContent[]>;
@@ -24,6 +24,40 @@ interface MessageInputAction {
24
24
  blurEditor: () => void;
25
25
  sendMessage: (msg?: string | InputContent[]) => void;
26
26
  }
27
+ /**
28
+ * 消息输入状态管理 Hook
29
+ * @memberof module:MessageInputState
30
+ * @description 提供消息输入相关的状态管理和操作功能,包括文本输入、编辑器控制、消息发送等
31
+ * @returns {MessageInputState & MessageInputAction} 返回消息输入状态管理对象
32
+ * @returns {Ref<string>} returns.inputRawValue - 输入框原始值
33
+ * @returns {Ref<boolean>} returns.isPeerTyping - 对方是否正在输入
34
+ * @returns {Function} returns.updateRawValue - 更新输入框原始值函数
35
+ * @returns {Function} returns.setEditorInstance - 设置编辑器实例函数
36
+ * @returns {Function} returns.setContent - 设置编辑器内容函数
37
+ * @returns {Function} returns.insertContent - 插入内容到编辑器函数
38
+ * @returns {Function} returns.focusEditor - 聚焦编辑器函数
39
+ * @returns {Function} returns.blurEditor - 失焦编辑器函数
40
+ * @returns {Function} returns.sendMessage - 发送消息函数
41
+ * @example
42
+ * ```typescript
43
+ * const {
44
+ * inputRawValue,
45
+ * isPeerTyping,
46
+ * setContent,
47
+ * sendMessage,
48
+ * focusEditor
49
+ * } = useMessageInputState();
50
+ *
51
+ * // 设置编辑器内容
52
+ * setContent('Hello World');
53
+ *
54
+ * // 发送消息
55
+ * await sendMessage();
56
+ *
57
+ * // 聚焦编辑器
58
+ * focusEditor();
59
+ * ```
60
+ */
27
61
  declare function useMessageInputState(): MessageInputState & MessageInputAction;
28
62
  export { useMessageInputState, MessageContentType };
29
63
  export type { InputContent };
@@ -1,111 +1,112 @@
1
- import { ref as d } from "vue";
2
- import { TUIStore as w, StoreName as M, TUIChatService as o } from "@tencentcloud/chat-uikit-engine";
3
- import { MessageContentType as s } from "./type.js";
4
- import { convertInputContentToEditorNode as p } from "./utils.js";
1
+ import { ref as l } from "vue";
2
+ import { TUIStore as w, StoreName as I, TUIChatService as r } from "@tencentcloud/chat-uikit-engine";
3
+ import { MessageContentType as a } from "./type.js";
4
+ import { trimInputContent as M, convertInputContentToEditorNode as p } from "./utils.js";
5
5
  import { useMessageListState as v } from "../MessageListState/MessageListState.js";
6
6
  import { transformTextWithEmojiNameToKey as f } from "../../utils/emoji.js";
7
- const n = d(null), m = d(""), y = d(!1), E = (e) => {
7
+ const n = l(null), m = l(""), y = l(!1), E = (e) => {
8
8
  if (typeof e != "string" && !Array.isArray(e)) {
9
9
  console.warn("Invalid input type for updateRawValue");
10
10
  return;
11
11
  }
12
- typeof e == "string" ? m.value = e.trim() : m.value = (e == null ? void 0 : e.length) > 0 ? e : "", o.enterTypingState(), setTimeout(() => {
13
- o.leaveTypingState();
12
+ typeof e == "string" ? m.value = e.trim() : m.value = (e == null ? void 0 : e.length) > 0 ? e : "", r.enterTypingState(), setTimeout(() => {
13
+ r.leaveTypingState();
14
14
  }, 3e3);
15
- }, I = (e) => {
16
- n.value && n.value.destroy(), n.value = e;
17
15
  }, C = (e) => {
16
+ n.value && n.value.destroy(), n.value = e;
17
+ }, S = (e) => {
18
18
  if (n.value) {
19
19
  if (typeof e == "string")
20
20
  n.value.commands.setContent(e, !0);
21
21
  else {
22
- const r = e.map(p);
23
- n.value.commands.setContent(r, !0);
22
+ const i = e.map(p);
23
+ n.value.commands.setContent(i, !0);
24
24
  }
25
25
  n.value.commands.focus();
26
26
  }
27
- }, S = (e, r = !0) => {
27
+ }, x = (e, i = !0) => {
28
28
  if (n.value) {
29
29
  if (typeof e == "string")
30
30
  n.value.commands.insertContent(e);
31
31
  else {
32
- const a = e.map(p);
33
- n.value.commands.insertContent(a);
32
+ const o = e.map(p);
33
+ n.value.commands.insertContent(o);
34
34
  }
35
- r && n.value.commands.focus();
35
+ i && n.value.commands.focus();
36
36
  }
37
- }, x = () => {
37
+ }, h = () => {
38
38
  var e;
39
39
  (e = n.value) == null || e.commands.focus();
40
- }, h = () => {
40
+ }, R = () => {
41
41
  var e;
42
42
  (e = n.value) == null || e.commands.blur();
43
- }, R = async (e) => {
44
- const { enableReadReceipt: r } = v(), a = {
45
- needReadReceipt: r.value || !1
46
- }, c = e ?? m.value;
47
- if (!c)
43
+ }, A = async (e) => {
44
+ const { enableReadReceipt: i } = v(), o = {
45
+ needReadReceipt: i.value || !1
46
+ };
47
+ let s = e ?? m.value;
48
+ if (typeof s == "string" ? s = s.trim() : s = M(s), !s)
48
49
  return;
49
- if (typeof c == "string") {
50
- o.sendTextMessage({
51
- payload: { text: f(c) },
52
- ...a
50
+ if (typeof s == "string") {
51
+ r.sendTextMessage({
52
+ payload: { text: f(s) },
53
+ ...o
53
54
  });
54
55
  return;
55
56
  }
56
- let u = "";
57
- const i = async () => {
58
- u && (await o.sendTextMessage({
59
- payload: { text: f(u) },
60
- ...a
61
- }), u = "");
62
- }, l = {
63
- [s.TEXT]: (t) => t,
64
- [s.IMAGE]: async (t) => (await i(), await o.sendImageMessage({
57
+ let c = "";
58
+ const u = async () => {
59
+ c && (await r.sendTextMessage({
60
+ payload: { text: f(c) },
61
+ ...o
62
+ }), c = "");
63
+ }, d = {
64
+ [a.TEXT]: (t) => t,
65
+ [a.IMAGE]: async (t) => (await u(), await r.sendImageMessage({
65
66
  payload: { file: t },
66
- ...a
67
+ ...o
67
68
  }), ""),
68
- [s.VIDEO]: async (t) => (await i(), await o.sendVideoMessage({
69
+ [a.VIDEO]: async (t) => (await u(), await r.sendVideoMessage({
69
70
  payload: { file: t },
70
- ...a
71
+ ...o
71
72
  }), ""),
72
- [s.FILE]: async (t) => (await i(), await o.sendFileMessage({
73
+ [a.FILE]: async (t) => (await u(), await r.sendFileMessage({
73
74
  payload: { file: t },
74
- ...a
75
+ ...o
75
76
  }), ""),
76
- [s.MENTION]: async () => (await i(), console.warn("Mention feature not implemented yet"), ""),
77
- [s.EMOJI]: (t) => t.key
77
+ [a.MENTION]: async () => (await u(), console.warn("Mention feature not implemented yet"), ""),
78
+ [a.EMOJI]: (t) => t.key
78
79
  };
79
- for (const t of c) {
80
- if (!t.type || !l[t.type])
80
+ for (const t of s) {
81
+ if (!t.type || !d[t.type])
81
82
  throw new Error(`Invalid message type: ${t.type}`);
82
- const g = l[t.type], T = await g(t.content);
83
- [s.TEXT, s.EMOJI].includes(t.type) && (u += T);
83
+ const g = d[t.type], T = await g(t.content);
84
+ [a.TEXT, a.EMOJI].includes(t.type) && (c += T);
84
85
  }
85
- await i();
86
+ await u();
86
87
  };
87
- function F() {
88
+ function J() {
88
89
  return {
89
90
  inputRawValue: m,
90
91
  isPeerTyping: y,
91
92
  updateRawValue: E,
92
- setEditorInstance: I,
93
- setContent: C,
94
- insertContent: S,
95
- focusEditor: x,
96
- blurEditor: h,
97
- sendMessage: R
93
+ setEditorInstance: C,
94
+ setContent: S,
95
+ insertContent: x,
96
+ focusEditor: h,
97
+ blurEditor: R,
98
+ sendMessage: A
98
99
  };
99
100
  }
100
- function A() {
101
- w.watch(M.CHAT, {
101
+ function N() {
102
+ w.watch(I.CHAT, {
102
103
  typingStatus: (e) => {
103
104
  y.value = e;
104
105
  }
105
106
  });
106
107
  }
107
- A();
108
+ N();
108
109
  export {
109
- s as MessageContentType,
110
- F as useMessageInputState
110
+ a as MessageContentType,
111
+ J as useMessageInputState
111
112
  };
@@ -27,4 +27,11 @@ declare function convertInputContentToEditorNode(item: InputContent): {
27
27
  };
28
28
  text?: undefined;
29
29
  };
30
- export { convertInputContentToEditorNode, };
30
+ /**
31
+ * Trims whitespace from the beginning and end of an InputContent array,
32
+ * while preserving internal whitespace and line breaks
33
+ * @param content - The input content array to trim
34
+ * @returns Trimmed input content array
35
+ */
36
+ declare function trimInputContent(content: InputContent[]): InputContent[];
37
+ export { trimInputContent, convertInputContentToEditorNode, };