tuikit-atomicx-vue3 3.4.1 → 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.
- package/.eslintrc.cjs +1 -0
- 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
- package/dist/baseComp/Modal/Modal.js +431 -23
- package/dist/chat/index.d.ts +68 -53
- package/dist/chat/server.js +15 -15
- package/dist/components/AudioSetting/AudioMediaControl.js +39 -41
- package/dist/components/AudioSetting/AudioSettingTab.js +10 -10
- package/dist/components/AudioSetting/MicrophoneSelect.js +8 -8
- package/dist/components/AudioSetting/SpeakerSelect.js +9 -9
- package/dist/components/AudioSettingPanel/i18n/en-US/index.d.ts +1 -0
- package/dist/components/AudioSettingPanel/i18n/en-US/index.js +2 -1
- package/dist/components/AudioSettingPanel/i18n/zh-CN/index.d.ts +1 -0
- package/dist/components/AudioSettingPanel/i18n/zh-CN/index.js +2 -1
- package/dist/components/AudioSettingPanel/index.js +81 -73
- package/dist/components/BarrageInput/BarrageInputH5.js +9 -9
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +3 -3
- package/dist/components/BarrageInput/MessageInputState.d.ts +28 -0
- package/dist/components/BarrageInput/MessageInputState.js +82 -0
- package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
- package/dist/components/BarrageInput/TextEditor/EditorCore.js +5 -4
- package/dist/components/BarrageInput/TextEditor/index.js +7 -7
- package/dist/components/BarrageInput/type.d.ts +17 -0
- package/dist/components/BarrageInput/type.js +4 -0
- package/dist/components/BarrageInput/utils.d.ts +30 -0
- package/dist/components/BarrageInput/utils.js +41 -0
- package/dist/components/BarrageList/BarrageList.js +80 -110
- package/dist/components/BarrageList/BarrageList.vue.d.ts +0 -29
- package/dist/components/BarrageList/BarrageListH5.js +95 -122
- package/dist/components/BarrageList/BarrageListH5.vue.d.ts +0 -29
- package/dist/components/BarrageList/BarrageListState.d.ts +58 -0
- package/dist/components/BarrageList/BarrageListState.js +106 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.js +16 -24
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +5 -5
- package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.js +48 -73
- package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.vue.d.ts +5 -7
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +70 -76
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.vue.d.ts +6 -6
- package/dist/components/BarrageList/Message/TextMessage/emoji.d.ts +5 -0
- package/dist/components/BarrageList/Message/TextMessage/emoji.js +134 -0
- package/dist/components/BarrageList/index.d.ts +0 -36
- package/dist/components/CameraButton/index.js +18 -19
- package/dist/components/ChatSetting/GroupChatSetting/GroupChatSetting.js +2 -1
- package/dist/components/CoGuestPanel/CoGuestPanel.js +60 -60
- package/dist/components/CoHostPanel/BattlePanel.js +25 -25
- package/dist/components/CoHostPanel/CoHostPanel.js +60 -55
- package/dist/components/CoHostPanel/ConfigSettingPanel.js +49 -55
- package/dist/components/CoHostPanel/ConnectionPanel.js +129 -120
- package/dist/components/CoHostPanel/RecommendHostList.js +39 -36
- package/dist/components/CoHostPanel/constants.d.ts +3 -0
- package/dist/components/CoHostPanel/constants.js +6 -0
- package/dist/components/CoHostPanel/i18n/en-US/index.d.ts +1 -0
- package/dist/components/CoHostPanel/i18n/en-US/index.js +2 -1
- package/dist/components/CoHostPanel/i18n/zh-CN/index.d.ts +1 -0
- package/dist/components/CoHostPanel/i18n/zh-CN/index.js +3 -2
- package/dist/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.js +6 -6
- package/dist/components/ContactList/ContactInfo/ContactInfo.js +1 -1
- package/dist/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.js +1 -1
- package/dist/components/ContactList/ContactInfo/FriendInfo/FriendInfo.js +9 -9
- package/dist/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.js +1 -1
- package/dist/components/ContactList/ContactInfo/GroupInfo/GroupInfo.js +4 -4
- package/dist/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.js +8 -8
- package/dist/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.js +7 -7
- package/dist/components/ContactList/ContactList.js +7 -7
- package/dist/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.js +8 -8
- package/dist/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.js +5 -5
- package/dist/components/ContactList/ContactListItem/FriendItem/FriendItem.js +5 -5
- package/dist/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.js +1 -1
- package/dist/components/ContactList/ContactListItem/GroupItem/GroupItem.js +1 -1
- package/dist/components/ContactList/ContactSearch/ContactSearch.js +6 -6
- package/dist/components/ConversationList/ConversationActions/ConversationActions.js +49 -51
- package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +9 -9
- package/dist/components/ConversationList/ConversationList.js +4 -4
- package/dist/components/ConversationList/ConversationList.vue.d.ts +10 -10
- package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +10 -10
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +31 -29
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +20 -20
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +2 -2
- package/dist/components/ConversationList/ConversationPreview/index.js +1 -1
- package/dist/components/ConversationList/index.d.ts +30 -30
- package/dist/components/LiveAudienceList/LiveAudienceList.js +44 -45
- package/dist/components/LiveAudienceList/LiveAudienceListH5.js +7 -7
- package/dist/components/LiveAudienceList/UserActionMenu.js +57 -64
- package/dist/components/LiveList/LiveList.js +23 -23
- package/dist/components/LiveList/LiveListH5.js +38 -38
- package/dist/components/LiveScenePanel/CameraSettingDialog.js +10 -10
- package/dist/components/LiveScenePanel/MaterialItem.js +15 -15
- package/dist/components/LiveScenePanel/index.js +4 -4
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.js +58 -58
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.js +56 -49
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.js +6 -6
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.js +1 -1
- package/dist/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.js +46 -43
- package/dist/components/LiveView/PlayerControl/AudioControl.js +133 -0
- package/dist/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue.d.ts +10 -6
- package/dist/components/LiveView/PlayerControl/MultiResolution.js +73 -0
- package/dist/components/LiveView/PlayerControl/PlayerControl.js +168 -0
- package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControlState.d.ts +2 -2
- package/dist/components/LiveView/PlayerControl/PlayerControlState.js +222 -0
- package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.d.ts +8 -1
- package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +132 -0
- package/dist/components/{LiveCoreView/i18n/zh-CN → LiveView/i18n/en-US}/index.d.ts +3 -2
- package/dist/components/{LiveCoreView → LiveView}/i18n/en-US/index.js +4 -3
- package/dist/components/{LiveCoreView/i18n/en-US → LiveView/i18n/zh-CN}/index.d.ts +3 -2
- package/dist/components/{LiveCoreView → LiveView}/i18n/zh-CN/index.js +4 -3
- package/dist/components/LiveView/index.d.ts +79 -0
- package/dist/components/{LiveCoreView → LiveView}/index.js +44 -42
- package/dist/components/MessageInput/AudioCallPicker/AudioCallPicker.js +63 -65
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +88 -84
- package/dist/components/MessageInput/MessageInput.js +1 -1
- package/dist/components/MessageInput/MessageInput.vue.d.ts +5 -2
- package/dist/components/MessageInput/TextEditor/EditorCore.d.ts +3 -1
- package/dist/components/MessageInput/TextEditor/EditorCore.js +51 -63
- package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +6 -2
- package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.d.ts +19 -0
- package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +74 -0
- package/dist/components/MessageInput/TextEditor/extensions/imageExtension.d.ts +2 -0
- package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +62 -0
- package/dist/components/MessageInput/TextEditor/index.js +45 -35
- package/dist/components/MessageInput/VideoCallPicker/VideoCallPicker.js +67 -69
- package/dist/components/MessageInput/i18n/index.d.ts +4 -0
- package/dist/components/MessageInput/i18n/zh-CN.d.ts +4 -0
- package/dist/components/MessageInput/i18n/zh-CN.js +5 -1
- package/dist/components/MessageInput/index.d.ts +36 -6
- package/dist/components/MessageInput/index.js +1 -1
- package/dist/components/MessageList/Message/AudioMessage/WaveForm.js +24 -34
- package/dist/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.js +29 -28
- package/dist/components/MessageList/Message/GroupTipMessage/index.js +13 -13
- package/dist/components/MessageList/Message/Message.vue.d.ts +1 -1
- package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +63 -69
- package/dist/components/MessageList/Message/VideoMessage/VideoMessage.js +48 -53
- package/dist/components/MessageList/Message/VideoMessage/VideoMessage.vue.d.ts +8 -8
- package/dist/components/MessageList/MessageList.js +8 -6
- package/dist/components/MessageList/MessageList.vue.d.ts +2 -2
- package/dist/components/MessageList/i18n/en-US.d.ts +65 -1
- package/dist/components/MessageList/i18n/en-US.js +66 -2
- package/dist/components/MessageList/i18n/index.d.ts +128 -0
- package/dist/components/MessageList/i18n/index.js +6 -6
- package/dist/components/MessageList/i18n/zh-CN.d.ts +65 -1
- package/dist/components/MessageList/i18n/zh-CN.js +64 -0
- package/dist/components/MessageList/index.d.ts +20 -20
- package/dist/components/MicButton/index.js +11 -11
- package/dist/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.js +172 -174
- package/dist/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.js +58 -60
- package/dist/components/Search/SearchAdvanced/SearchAdvanced.js +28 -30
- package/dist/components/Search/SearchAdvanced/SearchTab/SearchTab.js +22 -24
- package/dist/components/Search/SearchAdvanced/Slider/Slider.js +26 -28
- package/dist/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.js +133 -135
- package/dist/components/Search/SearchBar/SearchBar.js +56 -58
- package/dist/components/StreamMixer/LocalMixer/MixerControl.js +12 -12
- package/dist/components/StreamMixer/LocalMixer/index.js +66 -63
- package/dist/components/StreamMixer/index.js +6 -6
- package/dist/components/StreamView/Layout/CustomLayout.js +8 -8
- package/dist/components/StreamView/Layout/FloatLayout.js +124 -127
- package/dist/components/StreamView/Layout/GridLayout.js +5 -5
- package/dist/components/StreamView/index.js +25 -33
- package/dist/components/StreamView/manager/mediaManager.js +54 -60
- package/dist/components/UIKitModal/UIKitModal.d.ts +7 -0
- package/dist/components/UIKitModal/UIKitModal.js +156 -0
- package/dist/components/UIKitModal/index.d.ts +1 -0
- package/dist/components/UIKitModal/index.js +4 -0
- package/dist/components/{BarrageList/Message/RecalledMessage/RecalledMessage.vue.d.ts → UIKitModal/index.vue.d.ts} +24 -14
- package/dist/components/UIKitModal/type.d.ts +21 -0
- package/dist/components/UIKitModal/type.js +1 -0
- package/dist/components/UserPicker/UserPicker.js +1 -2
- package/dist/components/UserPicker/components/SelectedPanel/SelectedPanel.js +19 -18
- package/dist/components/UserPicker/hooks/useSearchFilter.d.ts +2 -2
- package/dist/components/UserPicker/hooks/useSearchFilter.js +39 -31
- package/dist/components/UserPicker/i18n/en-US.d.ts +1 -0
- package/dist/components/UserPicker/i18n/en-US.js +2 -1
- package/dist/components/UserPicker/i18n/index.d.ts +2 -0
- package/dist/components/UserPicker/i18n/zh-CN.d.ts +1 -0
- package/dist/components/UserPicker/i18n/zh-CN.js +2 -1
- package/dist/components/UserPicker/index.d.ts +2 -2
- package/dist/components/UserPicker/type.d.ts +1 -1
- package/dist/components/VideoSetting/CameraSelect.js +8 -8
- package/dist/components/VideoSetting/VideoMediaControl.js +10 -10
- package/dist/components/VideoSetting/VideoPreview.js +9 -9
- package/dist/components/VideoSetting/VideoProfile.js +6 -6
- package/dist/components/VideoSetting/VideoSettingTab.js +40 -39
- package/dist/components/VideoSettingPanel/CameraSelect.js +8 -8
- package/dist/components/VideoSettingPanel/VideoPreview.js +1 -1
- package/dist/components/VideoSettingPanel/VideoProfile.js +18 -18
- package/dist/hooks/useAudioControl.d.ts +3 -3
- package/dist/hooks/useAudioControl.js +32 -30
- package/dist/hooks/useRoomEngine.js +6 -6
- package/dist/index-B_-9wgM4.js +64 -0
- package/dist/{index-D-KJvDvy.js → index-DMfTuy0v.js} +574 -631
- package/dist/{index-D88ja_7_.js → index-DV6o6s43.js} +1691 -1660
- package/dist/index.d.ts +3 -1
- package/dist/index.js +180 -156
- package/dist/report/MetricsKey.d.ts +16 -0
- package/dist/report/MetricsKey.js +4 -0
- package/dist/report/dataReport.d.ts +12 -0
- package/dist/report/dataReport.js +45 -0
- package/dist/report/index.d.ts +4 -0
- package/dist/report/index.js +6 -0
- package/dist/rtc/index.d.ts +6 -81
- package/dist/rtc/index.js +53 -52
- package/dist/rtc/server.js +45 -40
- package/dist/states/BarrageState/BarrageState.d.ts +74 -0
- package/dist/states/BarrageState/BarrageState.js +80 -0
- package/dist/states/BarrageState/index.d.ts +1 -0
- package/dist/states/BarrageState/index.js +5 -0
- package/dist/states/{BattleState.d.ts → BattleState/BattleState.d.ts} +10 -11
- package/dist/states/BattleState/BattleState.js +203 -0
- package/dist/states/BattleState/index.d.ts +1 -0
- package/dist/states/BattleState/index.js +4 -0
- package/dist/states/CoGuestState.d.ts +24 -94
- package/dist/states/CoGuestState.js +297 -189
- package/dist/states/CoHostState/CoHostState.d.ts +2 -2
- package/dist/states/CoHostState/CoHostState.js +135 -131
- package/dist/states/{DeviceState.d.ts → DeviceState/DeviceState.d.ts} +25 -13
- package/dist/states/DeviceState/DeviceState.js +314 -0
- package/dist/states/DeviceState/index.d.ts +1 -0
- package/dist/states/DeviceState/index.js +4 -0
- package/dist/states/LiveAudienceState.d.ts +3 -1
- package/dist/states/LiveAudienceState.js +106 -63
- package/dist/states/{LiveState/index.d.ts → LiveListState/LiveListState.d.ts} +13 -8
- package/dist/states/LiveListState/LiveListState.js +285 -0
- package/dist/states/LiveListState/index.d.ts +1 -0
- package/dist/states/LiveListState/index.js +4 -0
- package/dist/states/LiveMonitorState/api/http.js +147 -129
- package/dist/states/LiveMonitorState/index.js +67 -62
- package/dist/states/LiveMonitorState/player/adapters/trtc.js +6 -6
- package/dist/states/LiveSeatState/index.d.ts +46 -11
- package/dist/states/LiveSeatState/index.js +34 -15
- package/dist/states/LiveSeatState/seatEventManager.d.ts +2 -0
- package/dist/states/LiveSeatState/seatEventManager.js +63 -42
- package/dist/states/LiveSeatState/seatManager.d.ts +34 -5
- package/dist/states/LiveSeatState/seatManager.js +131 -29
- package/dist/states/LiveSeatState/store.d.ts +5 -5
- package/dist/states/LiveSeatState/store.js +12 -10
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.js +1 -1
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.js +1 -1
- package/dist/states/LiveSeatState/usePlayStream/index.js +30 -28
- package/dist/states/LoginState.d.ts +23 -0
- package/dist/states/MessageInputState/MessageInputState.d.ts +41 -7
- package/dist/states/MessageInputState/MessageInputState.js +60 -59
- package/dist/states/MessageInputState/utils.d.ts +8 -1
- package/dist/states/MessageInputState/utils.js +30 -10
- package/dist/states/SeatStore.js +82 -83
- package/dist/states/UIKitModalState/UIKitModalState.d.ts +17 -0
- package/dist/states/UIKitModalState/UIKitModalState.js +63 -0
- package/dist/states/UIKitModalState/index.d.ts +1 -0
- package/dist/states/UIKitModalState/index.js +4 -0
- package/dist/states/{VideoMixerState.d.ts → VideoMixerState/VideoMixerState.d.ts} +1 -1
- package/dist/states/VideoMixerState/VideoMixerState.js +269 -0
- package/dist/states/VideoMixerState/index.d.ts +1 -0
- package/dist/states/VideoMixerState/index.js +4 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/audience.d.ts +21 -0
- package/dist/types/audience.js +4 -1
- package/dist/types/battle.d.ts +75 -3
- package/dist/types/battle.js +5 -1
- package/dist/types/coGuest.d.ts +72 -5
- package/dist/types/coGuest.js +4 -2
- package/dist/types/device.d.ts +38 -17
- package/dist/types/device.js +10 -8
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +96 -80
- package/dist/types/live.d.ts +36 -21
- package/dist/types/live.js +6 -4
- package/dist/types/seat.d.ts +23 -4
- package/dist/types/seat.js +7 -1
- package/dist/utils/call.d.ts +1 -1
- package/dist/utils/call.js +78 -79
- package/dist/utils/eventCenter.d.ts +88 -0
- package/dist/utils/eventCenter.js +161 -0
- package/package.json +4 -3
- package/src/chat/server.ts +0 -1
- package/src/components/AudioSetting/AudioMediaControl.vue +1 -3
- package/src/components/AudioSetting/AudioSettingTab.vue +1 -2
- package/src/components/AudioSetting/MicrophoneSelect.vue +1 -2
- package/src/components/AudioSetting/SpeakerSelect.vue +1 -2
- package/src/components/AudioSettingPanel/i18n/en-US/index.ts +1 -0
- package/src/components/AudioSettingPanel/i18n/zh-CN/index.ts +1 -0
- package/src/components/AudioSettingPanel/index.vue +4 -2
- package/src/components/BarrageInput/BarrageInputH5.vue +1 -1
- package/src/components/BarrageInput/EmojiPicker/EmojiPicker.vue +1 -1
- package/src/components/BarrageInput/MessageInputState.ts +160 -0
- package/src/components/BarrageInput/TextEditor/TextEditor.vue +1 -1
- package/src/components/BarrageInput/type.ts +26 -0
- package/src/components/BarrageInput/utils.ts +45 -0
- package/src/components/BarrageList/BarrageList.vue +61 -117
- package/src/components/BarrageList/BarrageListH5.vue +75 -159
- package/src/components/BarrageList/BarrageListState.ts +223 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +8 -55
- package/src/components/BarrageList/Message/MessageLayout/MessageLayout.vue +19 -44
- package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +69 -96
- package/src/components/BarrageList/Message/TextMessage/emoji.ts +132 -0
- package/src/components/CameraButton/index.vue +0 -1
- package/src/components/ChatSetting/GroupChatSetting/GroupChatSetting.vue +5 -0
- package/src/components/CoGuestPanel/CoGuestPanel.vue +16 -91
- package/src/components/CoHostPanel/BattlePanel.vue +4 -7
- package/src/components/CoHostPanel/CoHostPanel.vue +11 -3
- package/src/components/CoHostPanel/ConfigSettingPanel.vue +2 -8
- package/src/components/CoHostPanel/ConnectionPanel.vue +41 -37
- package/src/components/CoHostPanel/RecommendHostList.vue +12 -13
- package/src/components/CoHostPanel/constants.ts +3 -0
- package/src/components/CoHostPanel/i18n/en-US/index.ts +1 -0
- package/src/components/CoHostPanel/i18n/zh-CN/index.ts +2 -1
- package/src/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/ContactInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/FriendInfo/FriendInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.vue +1 -1
- package/src/components/ContactList/ContactList.vue +1 -1
- package/src/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/FriendItem/FriendItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/GroupItem/GroupItem.vue +1 -1
- package/src/components/ContactList/ContactSearch/ContactSearch.vue +1 -1
- package/src/components/ConversationList/ConversationActions/ConversationActions.vue +2 -8
- package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +2 -2
- package/src/components/ConversationList/ConversationCreate/ConversationCreateButton/ConversationCreateButton.vue +1 -1
- package/src/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.vue +1 -1
- package/src/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.vue +1 -1
- package/src/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.vue +1 -1
- package/src/components/ConversationList/ConversationList.vue +2 -2
- package/src/components/ConversationList/ConversationListContent/ConversationListContent.vue +1 -1
- package/src/components/ConversationList/ConversationListHeader/ConversationListHeader.vue +1 -1
- package/src/components/ConversationList/ConversationPlaceHolder/ConversationPlaceHolder.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreview.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.vue +4 -4
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +3 -3
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewUnread.vue +1 -1
- package/src/components/ConversationList/ConversationSearch/ConversationSearch.vue +1 -1
- package/src/components/LiveAudienceList/LiveAudienceList.vue +4 -5
- package/src/components/LiveAudienceList/LiveAudienceListH5.vue +2 -2
- package/src/components/LiveAudienceList/UserActionMenu.vue +7 -48
- package/src/components/LiveList/LiveList.vue +5 -5
- package/src/components/LiveList/LiveListH5.vue +6 -6
- package/src/components/LiveScenePanel/index.vue +2 -2
- package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.vue +10 -15
- package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.vue +30 -31
- package/src/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue +5 -3
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue +72 -80
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/MultiResolution.vue +30 -21
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue +26 -42
- package/src/components/LiveView/PlayerControl/PlayerControlState.ts +516 -0
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.ts +68 -4
- package/src/components/{LiveCoreView → LiveView}/i18n/en-US/index.ts +3 -2
- package/src/components/{LiveCoreView → LiveView}/i18n/zh-CN/index.ts +3 -2
- package/src/components/{LiveCoreView → LiveView}/index.ts +5 -2
- package/src/components/{LiveCoreView → LiveView}/index.vue +4 -3
- package/src/components/MessageInput/AudioCallPicker/AudioCallPicker.vue +8 -6
- package/src/components/MessageInput/EmojiPicker/EmojiPicker.vue +7 -3
- package/src/components/MessageInput/MessageInput.module.scss +1 -0
- package/src/components/MessageInput/MessageInput.vue +3 -1
- package/src/components/MessageInput/TextEditor/EditorCore.ts +17 -28
- package/src/components/MessageInput/TextEditor/TextEditor.vue +24 -4
- package/src/components/MessageInput/TextEditor/extensions/characterCountExtension.ts +159 -0
- package/src/components/MessageInput/TextEditor/extensions/imageExtension.ts +79 -0
- package/src/components/MessageInput/VideoCallPicker/VideoCallPicker.vue +8 -6
- package/src/components/MessageInput/i18n/zh-CN.ts +4 -0
- package/src/components/MessageInput/types.d.ts +1 -0
- package/src/components/MessageList/Message/AudioMessage/WaveForm.vue +20 -37
- package/src/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.vue +5 -3
- package/src/components/MessageList/Message/GroupTipMessage/GroupTipMessage.vue +5 -4
- package/src/components/MessageList/Message/Message.vue +1 -1
- package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +8 -8
- package/src/components/MessageList/Message/VideoMessage/VideoMessage.vue +46 -43
- package/src/components/MessageList/Message/VideoMessage/index.ts +1 -1
- package/src/components/MessageList/MessageList.vue +2 -0
- package/src/components/MessageList/i18n/en-US.ts +66 -0
- package/src/components/MessageList/i18n/index.ts +4 -4
- package/src/components/MessageList/i18n/zh-CN.ts +66 -0
- package/src/components/MicButton/index.vue +3 -3
- package/src/components/Search/Search.vue +1 -1
- package/src/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.scss +1 -4
- package/src/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.vue +1 -1
- package/src/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.scss +1 -4
- package/src/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.vue +1 -1
- package/src/components/Search/SearchAdvanced/SearchAdvanced.scss +1 -4
- package/src/components/Search/SearchAdvanced/SearchAdvanced.vue +1 -1
- package/src/components/Search/SearchAdvanced/SearchTab/SearchTab.scss +1 -4
- package/src/components/Search/SearchAdvanced/SearchTab/SearchTab.vue +1 -1
- package/src/components/Search/SearchAdvanced/Slider/Slider.scss +1 -4
- package/src/components/Search/SearchAdvanced/Slider/Slider.vue +1 -1
- package/src/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.scss +1 -4
- package/src/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.vue +1 -1
- package/src/components/Search/SearchBar/SearchBar.scss +3 -6
- package/src/components/Search/SearchBar/SearchBar.vue +1 -1
- package/src/components/Search/SearchResults/EmptyResult/EmptyResult.vue +1 -1
- package/src/components/Search/SearchResults/Loading/Loading.vue +1 -1
- package/src/components/Search/SearchResults/SearchResults.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/Group/Group.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/User/User.vue +1 -1
- package/src/components/StreamMixer/LocalMixer/index.vue +6 -8
- package/src/components/StreamMixer/index.vue +1 -1
- package/src/components/StreamView/Layout/CustomLayout.vue +2 -2
- package/src/components/StreamView/Layout/FloatLayout.vue +88 -83
- package/src/components/StreamView/index.vue +28 -14
- package/src/components/StreamView/manager/mediaManager.ts +38 -42
- package/src/components/UIKitModal/UIKitModal.ts +71 -0
- package/src/components/UIKitModal/index.scss +134 -0
- package/src/components/UIKitModal/index.ts +1 -0
- package/src/components/UIKitModal/index.vue +160 -0
- package/src/components/UIKitModal/type.ts +24 -0
- package/src/components/UserPicker/UserPicker.vue +1 -1
- package/src/components/UserPicker/components/SelectedPanel/SelectedPanel.vue +1 -0
- package/src/components/UserPicker/hooks/useSearchFilter.ts +27 -18
- package/src/components/UserPicker/i18n/en-US.ts +1 -0
- package/src/components/UserPicker/i18n/zh-CN.ts +1 -0
- package/src/components/UserPicker/type.ts +1 -1
- package/src/components/VideoSetting/CameraSelect.vue +1 -2
- package/src/components/VideoSetting/VideoMediaControl.vue +1 -1
- package/src/components/VideoSetting/VideoPreview.vue +1 -2
- package/src/components/VideoSetting/VideoProfile.vue +1 -1
- package/src/components/VideoSetting/VideoSettingTab.vue +9 -5
- package/src/components/VideoSettingPanel/CameraSelect.vue +1 -2
- package/src/components/VideoSettingPanel/VideoProfile.vue +7 -7
- package/src/hooks/useAudioControl.ts +17 -4
- package/src/hooks/useRoomEngine.ts +1 -1
- package/src/index.ts +3 -0
- package/src/report/MetricsKey.ts +16 -0
- package/src/report/dataReport.ts +55 -0
- package/src/report/index.ts +7 -0
- package/src/rtc/index.ts +8 -10
- package/src/rtc/server.ts +4 -0
- package/src/types/audience.ts +27 -1
- package/src/types/battle.ts +87 -4
- package/src/types/coGuest.ts +87 -5
- package/src/types/device.ts +41 -16
- package/src/types/index.ts +2 -2
- package/src/types/live.ts +41 -22
- package/src/types/seat.ts +28 -4
- package/src/utils/call.ts +26 -27
- package/src/utils/eventCenter.ts +249 -0
- package/dist/DialogPortal-CvJcEAsn.js +0 -417
- package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.js +0 -23
- package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.vue.d.ts +0 -30
- package/dist/components/BarrageList/Message/FaceMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/FaceMessage/index.js +0 -4
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +0 -4
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +0 -16
- package/dist/components/BarrageList/Message/GroupTipMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/GroupTipMessage/index.js +0 -25
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +0 -71
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.vue.d.ts +0 -34
- package/dist/components/BarrageList/Message/ImageMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/ImageMessage/index.js +0 -4
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +0 -9
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.vue.d.ts +0 -2
- package/dist/components/BarrageList/Message/MergerMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/MergerMessage/index.js +0 -4
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +0 -40
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue.d.ts +0 -54
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +0 -26
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue.d.ts +0 -15
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +0 -4
- package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +0 -41
- package/dist/components/BarrageList/Message/RecalledMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/RecalledMessage/index.js +0 -4
- package/dist/components/BarrageList/MessageForward/ForwardListItem.js +0 -45
- package/dist/components/BarrageList/MessageForward/ForwardListItem.vue.d.ts +0 -17
- package/dist/components/BarrageList/MessageForward/MessageForward.js +0 -203
- package/dist/components/BarrageList/MessageForward/MessageForward.vue.d.ts +0 -2
- package/dist/components/BarrageList/MessageForward/index.d.ts +0 -3
- package/dist/components/BarrageList/MessageForward/index.js +0 -4
- package/dist/components/LiveCoreView/PlayerControl/AudioControl.js +0 -129
- package/dist/components/LiveCoreView/PlayerControl/MultiResolution.js +0 -78
- package/dist/components/LiveCoreView/PlayerControl/PlayerControl.js +0 -168
- package/dist/components/LiveCoreView/PlayerControl/PlayerControlState.js +0 -267
- package/dist/components/LiveCoreView/PlayerControl/utils/domHelpers.js +0 -99
- package/dist/components/LiveCoreView/index.d.ts +0 -4
- package/dist/components/StreamView/Layout/MixLayout.js +0 -89
- package/dist/components/StreamView/Layout/MixLayout.vue.d.ts +0 -31
- package/dist/states/BarrageListState/BarrageListState.d.ts +0 -26
- package/dist/states/BarrageListState/BarrageListState.js +0 -122
- package/dist/states/BarrageListState/index.d.ts +0 -1
- package/dist/states/BarrageListState/index.js +0 -4
- package/dist/states/BattleState.js +0 -117
- package/dist/states/DeviceState.js +0 -296
- package/dist/states/LiveState/index.js +0 -254
- package/dist/states/VideoMixerState.js +0 -260
- package/src/components/BarrageList/Message/FaceMessage/FaceMessage.vue +0 -43
- package/src/components/BarrageList/Message/FaceMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue +0 -55
- package/src/components/BarrageList/Message/GroupTipMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/ImageMessage/ImageMessage.vue +0 -181
- package/src/components/BarrageList/Message/ImageMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/MergerMessage/MergerMessage.vue +0 -6
- package/src/components/BarrageList/Message/MergerMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +0 -70
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue +0 -40
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/index.ts +0 -3
- package/src/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue +0 -82
- package/src/components/BarrageList/Message/RecalledMessage/index.ts +0 -3
- package/src/components/BarrageList/MessageForward/ForwardListItem.vue +0 -67
- package/src/components/BarrageList/MessageForward/MessageForward.vue +0 -388
- package/src/components/BarrageList/MessageForward/index.ts +0 -3
- package/src/components/LiveCoreView/PlayerControl/PlayerControlState.ts +0 -718
- package/src/components/StreamView/Layout/MixLayout.vue +0 -144
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/MultiResolution.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/index.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/index.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/i18n/index.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/i18n/index.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/index.vue.d.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.vue +0 -0
- /package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.vue +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.module.scss +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/index.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/img/defeat.png +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/img/draw.png +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/img/victory.png +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/BattleOrdinaryBadge.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/BattleTopBadge.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/blueBkg.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/redBkg.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/s.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/v.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/i18n/index.ts +0 -0
|
@@ -1,40 +1,142 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { useRoomEngine as
|
|
5
|
-
import { usePlayStream as
|
|
6
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
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
|
|
24
|
-
var
|
|
25
|
-
return await ((
|
|
26
|
-
|
|
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
|
|
30
|
-
|
|
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
|
|
135
|
+
return await R();
|
|
34
136
|
}
|
|
35
137
|
};
|
|
36
|
-
|
|
37
|
-
let
|
|
138
|
+
k(l, "instance");
|
|
139
|
+
let y = l;
|
|
38
140
|
export {
|
|
39
|
-
|
|
141
|
+
y as default
|
|
40
142
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { SeatInfo, LiveCanvas,
|
|
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('../..').
|
|
18
|
+
quality: import('../..').NetworkQuality;
|
|
19
19
|
upLoss: number;
|
|
20
20
|
downLoss: number;
|
|
21
21
|
delay: number;
|
|
22
|
-
}> & Omit<Map<string,
|
|
22
|
+
}> & Omit<Map<string, NetworkInfo>, keyof Map<any, any>>, Map<string, NetworkInfo> | (Map<string, {
|
|
23
23
|
userId: string;
|
|
24
|
-
quality: import('../..').
|
|
24
|
+
quality: import('../..').NetworkQuality;
|
|
25
25
|
upLoss: number;
|
|
26
26
|
downLoss: number;
|
|
27
27
|
delay: number;
|
|
28
|
-
}> & Omit<Map<string,
|
|
28
|
+
}> & Omit<Map<string, NetworkInfo>, keyof Map<any, any>>)>;
|
|
29
29
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { ref as t, watch as
|
|
2
|
-
import {
|
|
3
|
-
|
|
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([]),
|
|
9
|
-
|
|
10
|
-
|
|
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:
|
|
20
|
+
canvas: i,
|
|
19
21
|
seatList: a,
|
|
20
|
-
speakingUsers:
|
|
21
|
-
networkQualities:
|
|
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 {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
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
|
|
12
|
+
async function T({ view: e }) {
|
|
14
13
|
var t, o;
|
|
15
|
-
f = e,
|
|
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(
|
|
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
|
-
}),
|
|
19
|
+
}), a.value && u.value.length > 0 && s.update({ userList: u.value });
|
|
21
20
|
});
|
|
22
|
-
async function
|
|
23
|
-
|
|
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
|
|
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:
|
|
30
|
-
} : null : o ? u.value.push({ userId: t, cameraStatus:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
() =>
|
|
41
|
+
() => {
|
|
42
|
+
var e;
|
|
43
|
+
return (e = U.value) == null ? void 0 : e.liveId;
|
|
44
|
+
},
|
|
43
45
|
(e) => {
|
|
44
|
-
e
|
|
46
|
+
e || (l.value = null, u.value = []);
|
|
45
47
|
}
|
|
46
48
|
);
|
|
47
|
-
|
|
49
|
+
p.once("ready", () => {
|
|
48
50
|
var e;
|
|
49
|
-
(e =
|
|
51
|
+
(e = E.instance) == null || e.on(I.onUserVideoStateChanged, b);
|
|
50
52
|
});
|
|
51
|
-
function
|
|
53
|
+
function g() {
|
|
52
54
|
return {
|
|
53
|
-
startPlayStream:
|
|
54
|
-
stopPlayStream:
|
|
55
|
+
startPlayStream: T,
|
|
56
|
+
stopPlayStream: V
|
|
55
57
|
};
|
|
56
58
|
}
|
|
57
59
|
export {
|
|
58
|
-
|
|
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
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
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
|
|
2
|
-
import { TUIStore as w, StoreName as
|
|
3
|
-
import { MessageContentType as
|
|
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 =
|
|
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 : "",
|
|
13
|
-
|
|
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
|
|
23
|
-
n.value.commands.setContent(
|
|
22
|
+
const i = e.map(p);
|
|
23
|
+
n.value.commands.setContent(i, !0);
|
|
24
24
|
}
|
|
25
25
|
n.value.commands.focus();
|
|
26
26
|
}
|
|
27
|
-
},
|
|
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
|
|
33
|
-
n.value.commands.insertContent(
|
|
32
|
+
const o = e.map(p);
|
|
33
|
+
n.value.commands.insertContent(o);
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
i && n.value.commands.focus();
|
|
36
36
|
}
|
|
37
|
-
},
|
|
37
|
+
}, h = () => {
|
|
38
38
|
var e;
|
|
39
39
|
(e = n.value) == null || e.commands.focus();
|
|
40
|
-
},
|
|
40
|
+
}, R = () => {
|
|
41
41
|
var e;
|
|
42
42
|
(e = n.value) == null || e.commands.blur();
|
|
43
|
-
},
|
|
44
|
-
const { enableReadReceipt:
|
|
45
|
-
needReadReceipt:
|
|
46
|
-
}
|
|
47
|
-
|
|
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
|
|
50
|
-
|
|
51
|
-
payload: { text: f(
|
|
52
|
-
...
|
|
50
|
+
if (typeof s == "string") {
|
|
51
|
+
r.sendTextMessage({
|
|
52
|
+
payload: { text: f(s) },
|
|
53
|
+
...o
|
|
53
54
|
});
|
|
54
55
|
return;
|
|
55
56
|
}
|
|
56
|
-
let
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
payload: { text: f(
|
|
60
|
-
...
|
|
61
|
-
}),
|
|
62
|
-
},
|
|
63
|
-
[
|
|
64
|
-
[
|
|
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
|
-
...
|
|
67
|
+
...o
|
|
67
68
|
}), ""),
|
|
68
|
-
[
|
|
69
|
+
[a.VIDEO]: async (t) => (await u(), await r.sendVideoMessage({
|
|
69
70
|
payload: { file: t },
|
|
70
|
-
...
|
|
71
|
+
...o
|
|
71
72
|
}), ""),
|
|
72
|
-
[
|
|
73
|
+
[a.FILE]: async (t) => (await u(), await r.sendFileMessage({
|
|
73
74
|
payload: { file: t },
|
|
74
|
-
...
|
|
75
|
+
...o
|
|
75
76
|
}), ""),
|
|
76
|
-
[
|
|
77
|
-
[
|
|
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
|
|
80
|
-
if (!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 =
|
|
83
|
-
[
|
|
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
|
|
86
|
+
await u();
|
|
86
87
|
};
|
|
87
|
-
function
|
|
88
|
+
function J() {
|
|
88
89
|
return {
|
|
89
90
|
inputRawValue: m,
|
|
90
91
|
isPeerTyping: y,
|
|
91
92
|
updateRawValue: E,
|
|
92
|
-
setEditorInstance:
|
|
93
|
-
setContent:
|
|
94
|
-
insertContent:
|
|
95
|
-
focusEditor:
|
|
96
|
-
blurEditor:
|
|
97
|
-
sendMessage:
|
|
93
|
+
setEditorInstance: C,
|
|
94
|
+
setContent: S,
|
|
95
|
+
insertContent: x,
|
|
96
|
+
focusEditor: h,
|
|
97
|
+
blurEditor: R,
|
|
98
|
+
sendMessage: A
|
|
98
99
|
};
|
|
99
100
|
}
|
|
100
|
-
function
|
|
101
|
-
w.watch(
|
|
101
|
+
function N() {
|
|
102
|
+
w.watch(I.CHAT, {
|
|
102
103
|
typingStatus: (e) => {
|
|
103
104
|
y.value = e;
|
|
104
105
|
}
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
|
-
|
|
108
|
+
N();
|
|
108
109
|
export {
|
|
109
|
-
|
|
110
|
-
|
|
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
|
-
|
|
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, };
|