tuikit-atomicx-vue3 4.5.0 → 4.5.2

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 (182) hide show
  1. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jPzZ5INK.js → MessageInput.vue_vue_type_script_setup_true_lang-3RVYOdkv.js} +38 -38
  2. package/dist/{PopoverTrigger-L8abAry7.js → PopoverPortal-DV6zFXcf.js} +91 -136
  3. package/dist/PopoverTrigger-DIjW4PKa.js +54 -0
  4. package/dist/{PopperContent-XdhqL8Y2.js → PopperContent-D__dbwpA.js} +6 -6
  5. package/dist/{Teleport-CSEuZbpM.js → Teleport-98QrIYDI.js} +280 -270
  6. package/dist/baseComp/Modal/Modal.js +3 -3
  7. package/dist/components/AudioSettingPanel/index.js +14 -14
  8. package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +10 -9
  9. package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
  10. package/dist/components/BarrageInput/TextEditor/EditorCore.js +16 -15
  11. package/dist/components/ConversationList/ConversationActions/ConversationActions.js +53 -50
  12. package/dist/components/ConversationList/ConversationActions/ConversationActions.vue.d.ts +2 -0
  13. package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +25 -25
  14. package/dist/components/ConversationList/ConversationList.vue.d.ts +16 -0
  15. package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +16 -0
  16. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +62 -40
  17. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +28 -26
  18. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +27 -23
  19. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue.d.ts +1 -1
  20. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +81 -70
  21. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +4 -0
  22. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +33 -31
  23. package/dist/components/ConversationList/ConversationPreview/utils.d.ts +2 -2
  24. package/dist/components/ConversationList/ConversationPreview/utils.js +81 -35
  25. package/dist/components/ConversationList/i18n/en-US.d.ts +11 -1
  26. package/dist/components/ConversationList/i18n/en-US.js +12 -2
  27. package/dist/components/ConversationList/i18n/zh-CN.d.ts +11 -1
  28. package/dist/components/ConversationList/i18n/zh-CN.js +12 -2
  29. package/dist/components/ConversationList/index.d.ts +48 -0
  30. package/dist/components/MessageInput/AttachmentPicker/index.js +10 -9
  31. package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +17 -16
  32. package/dist/components/MessageInput/MessageInput.js +1 -1
  33. package/dist/components/MessageInput/QuotedMessagePreview/index.js +35 -35
  34. package/dist/components/MessageInput/TextEditor/EditorCore.d.ts +13 -12
  35. package/dist/components/MessageInput/TextEditor/EditorCore.js +54 -89
  36. package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.js +229 -0
  37. package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.vue.d.ts +15 -0
  38. package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +1 -1
  39. package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.d.ts +1 -0
  40. package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.js +22 -0
  41. package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.d.ts +3 -0
  42. package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.js +15 -0
  43. package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +2 -2
  44. package/dist/components/MessageInput/TextEditor/extensions/index.d.ts +8 -0
  45. package/dist/components/MessageInput/TextEditor/extensions/index.js +12 -0
  46. package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.d.ts +5 -0
  47. package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.js +330 -0
  48. package/dist/components/MessageInput/TextEditor/index.js +62 -62
  49. package/dist/components/MessageInput/i18n/en-US.d.ts +3 -0
  50. package/dist/components/MessageInput/i18n/en-US.js +4 -1
  51. package/dist/components/MessageInput/i18n/index.d.ts +6 -0
  52. package/dist/components/MessageInput/i18n/zh-CN.d.ts +3 -0
  53. package/dist/components/MessageInput/i18n/zh-CN.js +4 -1
  54. package/dist/components/MessageInput/index.js +1 -1
  55. package/dist/components/MessageList/Message/ImageMessage/ImageMessage.js +119 -89
  56. package/dist/components/MessageList/Message/ImageMessage/ImagePreview.js +142 -0
  57. package/dist/components/MessageList/Message/ImageMessage/ImagePreview.vue.d.ts +20 -0
  58. package/dist/components/MessageList/Message/Message.vue.d.ts +8 -0
  59. package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +3 -3
  60. package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +69 -58
  61. package/dist/components/MessageList/Message/MessageLayout/MessageLayout.vue.d.ts +8 -0
  62. package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.js +37 -28
  63. package/dist/components/MessageList/Message/index.js +8 -4
  64. package/dist/components/MessageList/MessageList.js +109 -91
  65. package/dist/components/MessageList/MessageList.vue.d.ts +1 -1
  66. package/dist/components/MessageList/index.d.ts +21 -3
  67. package/dist/components/ScheduleRoomPanel/RoomDetail.js +22 -22
  68. package/dist/components/ScheduleRoomPanel/RoomEdit.js +1 -1
  69. package/dist/components/ScheduleRoomPanel/RoomShare.js +4 -4
  70. package/dist/components/ScheduleRoomPanel/ScheduleRoomPanel.js +1 -1
  71. package/dist/components/ScheduleRoomPanel/ScheduledRoomList.js +1 -1
  72. package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.js +6 -6
  73. package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.vue.d.ts +1 -1
  74. package/dist/components/UIKitModal/chatErrorModal/chatErrorModal.d.ts +72 -0
  75. package/dist/components/UIKitModal/chatErrorModal/chatErrorModal.js +95 -0
  76. package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.d.ts +40 -0
  77. package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.js +51 -0
  78. package/dist/components/UIKitModal/chatErrorModal/i18n/index.d.ts +4 -0
  79. package/dist/components/UIKitModal/chatErrorModal/i18n/index.js +6 -0
  80. package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.d.ts +40 -0
  81. package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.js +51 -0
  82. package/dist/components/UIKitModal/chatErrorModal/index.d.ts +3 -0
  83. package/dist/components/UIKitModal/chatErrorModal/index.js +11 -0
  84. package/dist/components/VideoSettingPanel/index.js +1 -1
  85. package/dist/hooks/useReadReceipt/useReadReceipt.js +44 -41
  86. package/dist/index-CTthrJb2.js +1461 -0
  87. package/dist/index-DXC5bPY4.js +2174 -0
  88. package/dist/{index-Do-2CngU.js → index-DuAffztD.js} +115 -142
  89. package/dist/{index-7vNB_Vx8.js → index-hHVD-MG2.js} +1 -1
  90. package/dist/index.d.ts +1 -1
  91. package/dist/index.js +150 -149
  92. package/dist/states/GroupSettingState/GroupSettingState.js +109 -102
  93. package/dist/states/LoginState.js +43 -43
  94. package/dist/states/MessageActionState/MessageActionState.js +83 -223
  95. package/dist/states/MessageInputState/MessageInputState.js +111 -82
  96. package/dist/states/MessageInputState/type.d.ts +36 -10
  97. package/dist/states/MessageInputState/utils.d.ts +1 -5
  98. package/dist/states/MessageListState/MessageListState.d.ts +1 -1
  99. package/dist/states/MessageListState/MessageListState.js +26 -23
  100. package/dist/states/RoomParticipantState/index.js +83 -24
  101. package/dist/states/RoomParticipantState/participantEventManager.d.ts +2 -2
  102. package/dist/states/RoomParticipantState/participantEventManager.js +217 -205
  103. package/dist/states/RoomParticipantState/participantManager.d.ts +4 -0
  104. package/dist/states/RoomParticipantState/participantManager.js +159 -127
  105. package/dist/states/RoomState/callManager.d.ts +3 -3
  106. package/dist/states/RoomState/callManager.js +20 -20
  107. package/dist/states/RoomState/common.d.ts +3 -2
  108. package/dist/states/RoomState/common.js +34 -24
  109. package/dist/states/RoomState/roomManager.d.ts +0 -1
  110. package/dist/states/RoomState/roomManager.js +21 -27
  111. package/dist/states/RoomState/scheduleManager.js +2 -2
  112. package/dist/styles/index.css +1 -1
  113. package/dist/{chat/index.d.ts → subEntry/chat/chat.d.ts} +2160 -2087
  114. package/dist/subEntry/chat/chat.js +89 -0
  115. package/dist/subEntry/chat/index.d.ts +11 -0
  116. package/dist/subEntry/chat/index.js +81 -0
  117. package/dist/{chat → subEntry/chat}/server.js +4 -4
  118. package/dist/subEntry/live/index.js +46 -45
  119. package/dist/subEntry/room/index.js +39 -38
  120. package/dist/types/beauty.d.ts +20 -0
  121. package/dist/types/index.js +37 -36
  122. package/dist/types/participant.d.ts +2 -0
  123. package/dist/types/room.d.ts +45 -1
  124. package/dist/types/room.js +4 -3
  125. package/dist/{useId-CtirfF0W.js → useId-B1VwPJLm.js} +1 -1
  126. package/dist/utils/call.js +77 -71
  127. package/dist/{utils-DaB7eSu5.js → utils-BU8IkP_V.js} +1 -1
  128. package/package.json +8 -7
  129. package/src/components/AudioSettingPanel/index.vue +4 -5
  130. package/src/components/ConversationList/ConversationActions/ConversationActions.vue +7 -1
  131. package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +5 -1
  132. package/src/components/ConversationList/ConversationList.vue +0 -1
  133. package/src/components/ConversationList/ConversationPreview/ConversationPreview.scss +10 -2
  134. package/src/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.vue +32 -1
  135. package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +3 -2
  136. package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +15 -0
  137. package/src/components/ConversationList/ConversationPreview/utils.ts +98 -28
  138. package/src/components/ConversationList/i18n/en-US.ts +11 -1
  139. package/src/components/ConversationList/i18n/zh-CN.ts +11 -1
  140. package/src/components/MessageInput/MessageInput.module.scss +1 -0
  141. package/src/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.vue +19 -22
  142. package/src/components/MessageInput/TextEditor/Editor.scss +25 -0
  143. package/src/components/MessageInput/TextEditor/EditorCore.ts +79 -99
  144. package/src/components/MessageInput/TextEditor/TextEditor.vue +64 -68
  145. package/src/components/MessageInput/TextEditor/extensions/MentionSuggestion.vue +449 -0
  146. package/src/components/MessageInput/TextEditor/extensions/emojiExtension.ts +22 -0
  147. package/src/components/MessageInput/TextEditor/extensions/enterKeyExtension.ts +22 -0
  148. package/src/components/MessageInput/TextEditor/extensions/index.ts +8 -0
  149. package/src/components/MessageInput/TextEditor/extensions/mentionExtension.ts +87 -0
  150. package/src/components/MessageInput/i18n/en-US.ts +3 -0
  151. package/src/components/MessageInput/i18n/zh-CN.ts +3 -0
  152. package/src/components/MessageList/Message/ImageMessage/ImageMessage.vue +49 -0
  153. package/src/components/MessageList/Message/ImageMessage/ImagePreview.vue +344 -0
  154. package/src/components/MessageList/Message/Message.vue +6 -0
  155. package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +8 -1
  156. package/src/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +12 -3
  157. package/src/components/MessageList/MessageList.vue +50 -14
  158. package/src/components/ScheduleRoomPanel/RoomDetail.vue +1 -0
  159. package/src/components/ScheduleRoomPanel/RoomEdit.vue +2 -1
  160. package/src/components/ScheduleRoomPanel/RoomShare.vue +1 -0
  161. package/src/components/ScheduleRoomPanel/ScheduleRoomPanel.vue +1 -0
  162. package/src/components/ScheduleRoomPanel/ScheduledRoomList.vue +1 -0
  163. package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.vue +30 -31
  164. package/src/components/UIKitModal/chatErrorModal/chatErrorModal.ts +205 -0
  165. package/src/components/UIKitModal/chatErrorModal/i18n/en-US/index.ts +56 -0
  166. package/src/components/UIKitModal/chatErrorModal/i18n/index.ts +4 -0
  167. package/src/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.ts +56 -0
  168. package/src/components/UIKitModal/chatErrorModal/index.ts +16 -0
  169. package/src/components/VideoSettingPanel/index.vue +1 -0
  170. package/src/hooks/useReadReceipt/useReadReceipt.ts +5 -4
  171. package/src/index.ts +1 -1
  172. package/src/{chat/index.ts → subEntry/chat/chat.ts} +25 -18
  173. package/src/subEntry/chat/index.ts +13 -0
  174. package/src/{chat → subEntry/chat}/server.ts +3 -3
  175. package/src/types/beauty.ts +20 -0
  176. package/src/types/participant.ts +3 -0
  177. package/src/types/room.ts +49 -1
  178. package/src/utils/call.ts +8 -0
  179. package/dist/chat/index.js +0 -59
  180. package/dist/index-ZILx4LYk.js +0 -4826
  181. package/dist/states/SearchState.d.ts +0 -314
  182. /package/dist/{chat → subEntry/chat}/server.d.ts +0 -0
@@ -1,46 +1,49 @@
1
1
  import { ref as o } from "vue";
2
- import { TUIStore as f, StoreName as l, TUIChatService as m } from "@tencentcloud/chat-uikit-engine";
3
- let p;
4
- const d = o(void 0), a = o(void 0), u = o(void 0), R = o(void 0), v = o(void 0), c = o(void 0), r = o(/* @__PURE__ */ new Set()), n = o(/* @__PURE__ */ new Set());
2
+ import { TUIStore as r, StoreName as v, TUIChatService as m } from "@tencentcloud/chat-uikit-engine";
3
+ let f;
4
+ const d = o(void 0), a = o(void 0), u = o(void 0), l = o(void 0), p = o(void 0), c = o(void 0), R = o(/* @__PURE__ */ new Set()), n = o(/* @__PURE__ */ new Set());
5
5
  function M() {
6
- d.value = void 0, a.value = void 0, u.value = void 0, R.value = void 0, v.value = void 0, c.value = void 0, r.value = /* @__PURE__ */ new Set(), n.value = /* @__PURE__ */ new Set();
6
+ d.value = void 0, a.value = void 0, u.value = void 0, l.value = void 0, c.value = void 0, n.value = /* @__PURE__ */ new Set();
7
7
  }
8
8
  function L(t) {
9
- v.value = t;
9
+ p.value = t;
10
10
  }
11
- function w(t) {
11
+ function D(t) {
12
12
  c.value = t;
13
13
  }
14
- function D({ messageID: t, duration: i }) {
14
+ function w({ messageID: t, duration: i }) {
15
15
  n.value.add(t), setTimeout(() => {
16
16
  n.value.delete(t);
17
17
  }, i);
18
18
  }
19
+ async function k() {
20
+ return m.getMessageList();
21
+ }
19
22
  function g() {
20
23
  return {
21
24
  // state
22
25
  activeConversationID: d,
23
26
  messageList: a,
24
27
  hasMoreOlderMessage: u,
25
- hasMoreNewerMessage: R,
26
- enableReadReceipt: v,
28
+ hasMoreNewerMessage: l,
29
+ enableReadReceipt: p,
27
30
  isDisableScroll: c,
28
- recalledMessageIDSet: r,
31
+ recalledMessageIDSet: R,
29
32
  highlightMessageIDSet: n,
30
33
  // actions
31
- loadMoreOlderMessage: m.getMessageList,
34
+ loadMoreOlderMessage: k,
32
35
  // TODO
33
36
  // loadMoreNewerMessage: TUIChatService.getMessageList,
34
37
  setEnableReadReceipt: L,
35
- setIsDisableScroll: w,
36
- highlightMessage: D
38
+ setIsDisableScroll: D,
39
+ highlightMessage: w
37
40
  };
38
41
  }
39
- const k = () => {
42
+ const y = () => {
40
43
  function t(s) {
41
44
  if (!d.value)
42
45
  return;
43
- function I(e) {
46
+ function S(e) {
44
47
  return {
45
48
  ...e,
46
49
  // 🎯 re-create frequently changing properties to ensure React can detect changes
@@ -66,25 +69,25 @@ const k = () => {
66
69
  replyMessage: () => e.replyMessage()
67
70
  };
68
71
  }
69
- const C = s.map(I);
72
+ const C = s.map(S);
70
73
  a.value = C, a.value.forEach((e) => {
71
- e.isRevoked && r.value.add(e.ID);
74
+ e.isRevoked && R.value.add(e.ID);
72
75
  });
73
76
  }
74
77
  function i(s) {
75
78
  u.value = !s;
76
79
  }
77
- function S(s) {
78
- (!s || s !== p) && (M(), d.value = s), p = s || void 0;
80
+ function I(s) {
81
+ (!s || s !== f) && (M(), d.value = s), f = s || void 0;
79
82
  }
80
- f.watch(l.CONV, {
81
- currentConversationID: S
82
- }), f.watch(l.CHAT, {
83
+ r.watch(v.CONV, {
84
+ currentConversationID: I
85
+ }), r.watch(v.CHAT, {
83
86
  messageList: t,
84
87
  isCompleted: i
85
88
  });
86
89
  };
87
- k();
90
+ y();
88
91
  export {
89
92
  g as useMessageListState
90
93
  };
@@ -2,46 +2,46 @@ import { watch as I } from "vue";
2
2
  import { useRoomEngine as D } from "../../hooks/useRoomEngine.js";
3
3
  import { dataReport as P } from "../../report/dataReport.js";
4
4
  import { MetricsKey as g } from "../../report/MetricsKey.js";
5
- import { eventCenter as m } from "../../utils/eventCenter.js";
5
+ import { eventCenter as v } from "../../utils/eventCenter.js";
6
6
  import { useLoginState as O } from "../LoginState.js";
7
- import { useRoomState as T } from "../RoomState/index.js";
8
- import R from "./callEventManager.js";
9
- import { participantTransfer as M } from "./common.js";
7
+ import { useRoomState as M } from "../RoomState/index.js";
8
+ import T from "./callEventManager.js";
9
+ import { participantTransfer as R } from "./common.js";
10
10
  import A from "./participantEventManager.js";
11
11
  import E from "./participantManager.js";
12
- import w from "./scheduleEventManager.js";
13
- import { useRoomParticipantStore as p } from "./store.js";
14
- let s = null, d = !1;
15
- async function C() {
12
+ import h from "./scheduleEventManager.js";
13
+ import { useRoomParticipantStore as s } from "./store.js";
14
+ let p = null, u = !1;
15
+ async function w() {
16
16
  var a, r, c;
17
- const e = D(), { loginUserInfo: i } = O(), { addParticipantInfo: t } = p();
17
+ const e = D(), { loginUserInfo: i } = O(), { addParticipantInfo: t } = s();
18
18
  if (!((a = i.value) != null && a.userId))
19
19
  return;
20
- const n = await ((c = e.instance) == null ? void 0 : c.getUserInfo({ userId: (r = i.value) == null ? void 0 : r.userId })), o = M.transformTUIUserInfoToParticipantInfo(n);
20
+ const n = await ((c = e.instance) == null ? void 0 : c.getUserInfo({ userId: (r = i.value) == null ? void 0 : r.userId })), o = R.transformTUIUserInfoToParticipantInfo(n);
21
21
  t(o);
22
22
  }
23
- function S() {
24
- if (s || (s = new E(), new A(), new R(), new w()), !d) {
25
- d = !0;
26
- const { currentRoom: e } = T(), { reset: i } = p();
23
+ function C() {
24
+ if (p || (p = new E(), new A(), new T(), new h()), !u) {
25
+ u = !0;
26
+ const { currentRoom: e } = M(), { reset: i } = s();
27
27
  I(() => {
28
28
  var t;
29
29
  return (t = e.value) == null ? void 0 : t.roomId;
30
30
  }, async (t, n) => {
31
- !n && t && await C(), n && !t && i();
31
+ !n && t && await w(), n && !t && i();
32
32
  }, { immediate: !0 });
33
33
  }
34
- return s;
34
+ return p;
35
35
  }
36
- function u(e, i) {
37
- m.on(e, i);
36
+ function d(e, i) {
37
+ v.on(e, i);
38
38
  }
39
- function v(e, i) {
40
- m.off(e, i);
39
+ function m(e, i) {
40
+ v.off(e, i);
41
41
  }
42
42
  function Q() {
43
43
  P.reportCount(g.T_METRICS_STATE_ROOM_PARTICIPANT_STATE_COUNT);
44
- const e = S(), {
44
+ const e = C(), {
45
45
  participantList: i,
46
46
  participantListCursor: t,
47
47
  participantListWithVideo: n,
@@ -52,7 +52,7 @@ function Q() {
52
52
  speakingUsers: l,
53
53
  networkQualities: f,
54
54
  pendingParticipantList: b
55
- } = p();
55
+ } = s();
56
56
  return {
57
57
  participantList: i,
58
58
  participantListCursor: t,
@@ -83,8 +83,67 @@ function Q() {
83
83
  cancelOpenDeviceInvitation: e.cancelOpenDeviceInvitation.bind(e),
84
84
  acceptOpenDeviceInvitation: e.acceptOpenDeviceInvitation.bind(e),
85
85
  declineOpenDeviceInvitation: e.declineOpenDeviceInvitation.bind(e),
86
- subscribeEvent: u.bind(u),
87
- unsubscribeEvent: v.bind(v)
86
+ /**
87
+ * 静音本地麦克风
88
+ * @description 静音本地麦克风, 常用于打开麦克风场景下但不向远端推音频流
89
+ * @example
90
+ * ```typescript
91
+ * // 打开麦克风但不向远端推音频流(常用于会议场景下短暂静音场景)
92
+ * import { useDeviceState } from 'tuikit-atomicx-vue3/room';
93
+ * import { useRoomParticipantState } from 'tuikit-atomicx-vue3/room';
94
+ * const { openLocalMicrophone } = useDeviceState();
95
+ * const { muteMicrophone, unmuteMicrophone } = useRoomParticipantState();
96
+ * await openLocalMicrophone();
97
+ * await muteMicrophone();
98
+ * ```
99
+ * @returns {Promise<void>}
100
+ */
101
+ muteMicrophone: e.muteMicrophone.bind(e),
102
+ /**
103
+ * 取消静音本地麦克风
104
+ * @description 取消静音本地麦克风,恢复 muteMicrophone 操作导致的音频传输中断。
105
+ * @example
106
+ * ```typescript
107
+ * import { useDeviceState } from 'tuikit-atomicx-vue3/room';
108
+ * import { useRoomParticipantState } from 'tuikit-atomicx-vue3/room';
109
+ * const { openLocalMicrophone } = useDeviceState();
110
+ * const { muteMicrophone, unmuteMicrophone } = useRoomParticipantState();
111
+ * await openLocalMicrophone();
112
+ * await unmuteMicrophone();
113
+ * ```
114
+ * @returns {Promise<void>}
115
+ */
116
+ unmuteMicrophone: e.unmuteMicrophone.bind(e),
117
+ /**
118
+ * 订阅房间参与者事件
119
+ * @description 订阅房间参与者相关的事件,当事件触发时会调用回调函数
120
+ * @param {RoomParticipantEvent} event - 要订阅的事件名称,可选值包括:
121
+ * - onParticipantJoined: 参与者加入房间
122
+ * - onParticipantLeft: 参与者离开房间
123
+ * - onOwnerChanged: 房间所有者变更
124
+ * - onAdminSet: 用户被设为管理员
125
+ * - onAdminRevoked: 用户管理员权限被撤销
126
+ * - onKickedFromRoom: 被踢出房间
127
+ * - onParticipantDeviceClosed: 设备被关闭
128
+ * - onParticipantMessageMuted: 被禁言/解禁
129
+ * - onAllDevicesDisabled: 全体设备被禁用/启用
130
+ * - onAllMessagesDisabled: 全体消息被禁用/启用
131
+ * - onDeviceRequestReceived: 收到设备开启申请
132
+ * - onDeviceRequestCancelled: 设备开启申请被取消
133
+ * - onDeviceRequestTimeout: 设备开启申请超时
134
+ * - onDeviceRequestApproved: 设备开启申请被批准
135
+ * - onDeviceRequestRejected: 设备开启申请被拒绝
136
+ * - onDeviceRequestProcessed: 设备开启申请已被处理
137
+ * - onDeviceInvitationReceived: 收到设备开启邀请
138
+ * - onDeviceInvitationCancelled: 设备开启邀请被取消
139
+ * - onDeviceInvitationTimeout: 设备开启邀请超时
140
+ * - onDeviceInvitationAccepted: 设备开启邀请被接受
141
+ * - onDeviceInvitationDeclined: 设备开启邀请被拒绝
142
+ * @param {Function} callback - 事件回调函数,参数类型根据事件类型而定
143
+ * @returns {void}
144
+ */
145
+ subscribeEvent: d.bind(d),
146
+ unsubscribeEvent: m.bind(m)
88
147
  };
89
148
  }
90
149
  export {
@@ -1,4 +1,4 @@
1
- import { TUIChangeReason, TUIVideoStreamType, TUIRole, TUIKickedOutOfRoomReason, TUIUserInfo, TUIRequest } from '@tencentcloud/tuiroom-engine-js';
1
+ import { TUIVideoStreamType, TUIRole, TUIKickedOutOfRoomReason, TUIUserInfo, TUIRequest, TUIChangeReason } from '@tencentcloud/tuiroom-engine-js';
2
2
  import { RoomParticipantRole } from '../../types';
3
3
 
4
4
  export default class ParticipantEventManager {
@@ -54,7 +54,7 @@ export default class ParticipantEventManager {
54
54
  onRequestReceived({ request }: {
55
55
  request: TUIRequest;
56
56
  }): void;
57
- onRequestCancelled({ request, userInfo }: {
57
+ onRequestCancelled({ request }: {
58
58
  request: TUIRequest;
59
59
  userInfo: TUIUserInfo;
60
60
  }): void;