tuikit-atomicx-vue3 3.4.1 → 3.4.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 (84) hide show
  1. package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
  2. package/dist/components/BarrageInput/TextEditor/EditorCore.js +2 -2
  3. package/dist/components/CoHostPanel/BattlePanel.js +16 -16
  4. package/dist/components/CoHostPanel/CoHostPanel.js +60 -55
  5. package/dist/components/CoHostPanel/ConnectionPanel.js +42 -42
  6. package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.js +1 -1
  7. package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.js +56 -49
  8. package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.js +1 -1
  9. package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.js +1 -1
  10. package/dist/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.js +7 -7
  11. package/dist/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.js +16 -16
  12. package/dist/components/{LiveCoreView → LiveView}/PlayerControl/MultiResolution.js +15 -15
  13. package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.js +1 -1
  14. package/dist/components/{LiveCoreView/i18n/zh-CN → LiveView/i18n/en-US}/index.d.ts +1 -0
  15. package/dist/components/{LiveCoreView → LiveView}/i18n/en-US/index.js +2 -1
  16. package/dist/components/{LiveCoreView/i18n/en-US → LiveView/i18n/zh-CN}/index.d.ts +1 -0
  17. package/dist/components/{LiveCoreView → LiveView}/i18n/zh-CN/index.js +2 -1
  18. package/dist/components/LiveView/index.d.ts +79 -0
  19. package/dist/components/{LiveCoreView → LiveView}/index.js +44 -42
  20. package/dist/components/MessageInput/TextEditor/EditorCore.js +2 -2
  21. package/dist/components/StreamMixer/index.js +6 -6
  22. package/dist/{index-D-KJvDvy.js → index-Bm-QfV5o.js} +1 -1
  23. package/dist/{index-D88ja_7_.js → index-D2OVtqc8.js} +1705 -1705
  24. package/dist/index.js +140 -138
  25. package/dist/rtc/index.d.ts +2 -39
  26. package/dist/rtc/index.js +49 -48
  27. package/dist/states/BattleState.js +48 -48
  28. package/dist/styles/index.css +1 -1
  29. package/package.json +2 -2
  30. package/src/components/CoHostPanel/BattlePanel.vue +3 -3
  31. package/src/components/CoHostPanel/CoHostPanel.vue +11 -3
  32. package/src/components/CoHostPanel/ConnectionPanel.vue +4 -4
  33. package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.vue +28 -29
  34. package/src/components/{LiveCoreView → LiveView}/i18n/en-US/index.ts +1 -0
  35. package/src/components/{LiveCoreView → LiveView}/i18n/zh-CN/index.ts +1 -0
  36. package/src/components/{LiveCoreView → LiveView}/index.ts +5 -2
  37. package/src/components/{LiveCoreView → LiveView}/index.vue +1 -1
  38. package/src/components/StreamMixer/index.vue +1 -1
  39. package/src/rtc/index.ts +2 -2
  40. package/dist/components/LiveCoreView/index.d.ts +0 -4
  41. /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.vue.d.ts +0 -0
  42. /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.vue.d.ts +0 -0
  43. /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.vue.d.ts +0 -0
  44. /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.vue.d.ts +0 -0
  45. /package/dist/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue.d.ts +0 -0
  46. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue.d.ts +0 -0
  47. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/MultiResolution.vue.d.ts +0 -0
  48. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue.d.ts +0 -0
  49. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControlState.d.ts +0 -0
  50. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControlState.js +0 -0
  51. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/index.d.ts +0 -0
  52. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/index.js +0 -0
  53. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.d.ts +0 -0
  54. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.js +0 -0
  55. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.d.ts +0 -0
  56. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.js +0 -0
  57. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.d.ts +0 -0
  58. /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.js +0 -0
  59. /package/dist/components/{LiveCoreView → LiveView}/i18n/index.d.ts +0 -0
  60. /package/dist/components/{LiveCoreView → LiveView}/i18n/index.js +0 -0
  61. /package/dist/components/{LiveCoreView → LiveView}/index.vue.d.ts +0 -0
  62. /package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.vue +0 -0
  63. /package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.vue +0 -0
  64. /package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.vue +0 -0
  65. /package/src/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue +0 -0
  66. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue +0 -0
  67. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/MultiResolution.vue +0 -0
  68. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.module.scss +0 -0
  69. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue +0 -0
  70. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControlState.ts +0 -0
  71. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/index.ts +0 -0
  72. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.ts +0 -0
  73. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.ts +0 -0
  74. /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.ts +0 -0
  75. /package/src/components/{LiveCoreView → LiveView}/assets/img/defeat.png +0 -0
  76. /package/src/components/{LiveCoreView → LiveView}/assets/img/draw.png +0 -0
  77. /package/src/components/{LiveCoreView → LiveView}/assets/img/victory.png +0 -0
  78. /package/src/components/{LiveCoreView → LiveView}/assets/svg/BattleOrdinaryBadge.svg +0 -0
  79. /package/src/components/{LiveCoreView → LiveView}/assets/svg/BattleTopBadge.svg +0 -0
  80. /package/src/components/{LiveCoreView → LiveView}/assets/svg/blueBkg.svg +0 -0
  81. /package/src/components/{LiveCoreView → LiveView}/assets/svg/redBkg.svg +0 -0
  82. /package/src/components/{LiveCoreView → LiveView}/assets/svg/s.svg +0 -0
  83. /package/src/components/{LiveCoreView → LiveView}/assets/svg/v.svg +0 -0
  84. /package/src/components/{LiveCoreView → LiveView}/i18n/index.ts +0 -0
@@ -1,51 +1,53 @@
1
- import v, { TUILiveBattleManagerEvents as c } from "@tencentcloud/tuiroom-engine-js";
2
- import { ref as d, watch as f } from "vue";
3
- import { useRoomEngine as B } from "../hooks/useRoomEngine.js";
4
- import { useLiveState as S } from "./LiveState/index.js";
5
- import { DeviceStatusReason as l, DeviceStatus as i } from "../types/device.js";
6
- const s = B(), { currentLive: g } = S(), m = (e) => ({
1
+ import f, { TUILiveBattleManagerEvents as c } from "@tencentcloud/tuiroom-engine-js";
2
+ import { ref as i, watch as v } from "vue";
3
+ import { useRoomEngine as S } from "../hooks/useRoomEngine.js";
4
+ import { useLiveState as g } from "./LiveState/index.js";
5
+ import { DeviceStatusReason as l, DeviceStatus as u } from "../types/device.js";
6
+ const s = S(), { currentLive: h } = g(), m = (e) => ({
7
7
  liveId: e.roomId,
8
8
  userId: e.userId,
9
9
  userName: e.userName,
10
10
  avatarUrl: e.avatarUrl,
11
- microphoneStatus: i.Off,
11
+ microphoneStatus: u.Off,
12
12
  microphoneStatusReason: l.ChangedBySelf,
13
- cameraStatus: i.Off,
13
+ cameraStatus: u.Off,
14
14
  cameraStatusReason: l.ChangedBySelf
15
- }), u = d(), r = d([]), o = d(/* @__PURE__ */ new Map()), h = (e, t) => {
15
+ }), d = i(), r = i([]), o = i(/* @__PURE__ */ new Map()), p = (e, t) => {
16
16
  var n;
17
17
  const a = (n = s.instance) == null ? void 0 : n.getLiveBattleManager();
18
18
  a == null || a.on(e, t);
19
- }, p = (e, t) => {
19
+ }, I = (e, t) => {
20
20
  var n;
21
21
  const a = (n = s.instance) == null ? void 0 : n.getLiveBattleManager();
22
22
  a == null || a.off(e, t);
23
- }, I = (e) => {
23
+ }, b = (e) => {
24
24
  var a;
25
25
  const t = (a = s.instance) == null ? void 0 : a.getLiveBattleManager();
26
26
  return t == null ? void 0 : t.requestBattle(e);
27
- }, b = (e) => {
27
+ }, U = (e) => {
28
28
  var a;
29
29
  const t = (a = s.instance) == null ? void 0 : a.getLiveBattleManager();
30
30
  return t == null ? void 0 : t.cancelBattleRequest(e);
31
- }, U = (e) => {
31
+ }, E = (e) => {
32
32
  var a;
33
33
  const t = (a = s.instance) == null ? void 0 : a.getLiveBattleManager();
34
34
  return t == null ? void 0 : t.acceptBattle(e);
35
- }, E = (e) => {
35
+ }, L = (e) => {
36
36
  var a;
37
37
  const t = (a = s.instance) == null ? void 0 : a.getLiveBattleManager();
38
38
  return t == null ? void 0 : t.rejectBattle(e);
39
- }, L = (e) => {
40
- var n;
41
- const t = (n = s.instance) == null ? void 0 : n.getLiveBattleManager(), a = t == null ? void 0 : t.exitBattle(e);
42
- return u.value = void 0, a;
43
39
  }, R = (e) => {
44
- u.value = void 0;
40
+ var n;
41
+ const t = (n = s.instance) == null ? void 0 : n.getLiveBattleManager();
42
+ return t == null ? void 0 : t.exitBattle(e);
43
+ }, B = () => {
44
+ d.value = void 0, r.value = [], o.value = /* @__PURE__ */ new Map();
45
45
  }, x = (e) => {
46
- o.value = new Map(e.battleUserList.map((t) => [t.userId, t.score]));
46
+ B();
47
47
  }, T = (e) => {
48
- u.value = {
48
+ o.value = new Map(e.battleUserList.map((t) => [t.userId, t.score]));
49
+ }, C = (e) => {
50
+ d.value = {
49
51
  battleId: e.battleInfo.battleId,
50
52
  config: {
51
53
  duration: e.battleInfo.duration,
@@ -59,57 +61,55 @@ const s = B(), { currentLive: g } = S(), m = (e) => ({
59
61
  o.value.set(t.userId, t.score), a.forEach((n) => {
60
62
  o.value.set(n.userId, n.score);
61
63
  }), r.value = [m(t), ...a.map((n) => m(n))];
62
- }, C = (e) => {
64
+ }, y = (e) => {
63
65
  var t;
64
66
  r.value.length <= 2 || (r.value = (t = r.value) == null ? void 0 : t.filter((a) => a.userId !== e.user.userId), o.value.delete(e.user.userId));
65
- }, y = (e) => {
67
+ }, q = (e) => {
66
68
  var t;
67
69
  (t = r.value) == null || t.push({
68
70
  liveId: e.user.roomId,
69
71
  userId: e.user.userId,
70
72
  userName: e.user.userName,
71
73
  avatarUrl: e.user.avatarUrl,
72
- microphoneStatus: i.Off,
74
+ microphoneStatus: u.Off,
73
75
  microphoneStatusReason: l.ChangedBySelf,
74
- cameraStatus: i.Off,
76
+ cameraStatus: u.Off,
75
77
  cameraStatusReason: l.ChangedBySelf
76
78
  }), o.value.set(e.user.userId, e.user.score);
77
- }, q = [
78
- { event: c.onBattleEnded, handler: R },
79
- { event: c.onBattleScoreChanged, handler: x },
80
- { event: c.onBattleStarted, handler: T },
81
- { event: c.onUserExitBattle, handler: C },
82
- { event: c.onUserJoinBattle, handler: y }
83
- ], w = () => {
84
- q.forEach(({ event: e, handler: t }) => {
79
+ }, w = [
80
+ { event: c.onBattleEnded, handler: x },
81
+ { event: c.onBattleScoreChanged, handler: T },
82
+ { event: c.onBattleStarted, handler: C },
83
+ { event: c.onUserExitBattle, handler: y },
84
+ { event: c.onUserJoinBattle, handler: q }
85
+ ], M = () => {
86
+ w.forEach(({ event: e, handler: t }) => {
85
87
  var n;
86
88
  const a = (n = s.instance) == null ? void 0 : n.getLiveBattleManager();
87
89
  a == null || a.on(e, t);
88
90
  });
89
- }, M = () => {
90
- u.value = void 0, r.value = [], o.value = /* @__PURE__ */ new Map();
91
91
  };
92
- f(() => {
92
+ v(() => {
93
93
  var e;
94
- return (e = g.value) == null ? void 0 : e.liveId;
94
+ return (e = h.value) == null ? void 0 : e.liveId;
95
95
  }, (e) => {
96
- e || M();
96
+ e || B();
97
97
  });
98
- v.once("ready", () => {
99
- w();
98
+ f.once("ready", () => {
99
+ M();
100
100
  });
101
101
  function k() {
102
102
  return {
103
- currentBattleInfo: u,
103
+ currentBattleInfo: d,
104
104
  battleUsers: r,
105
105
  battleScore: o,
106
- subscribeEvent: h,
107
- unsubscribeEvent: p,
108
- requestBattle: I,
109
- cancelBattleRequest: b,
110
- acceptBattle: U,
111
- rejectBattle: E,
112
- exitBattle: L
106
+ subscribeEvent: p,
107
+ unsubscribeEvent: I,
108
+ requestBattle: b,
109
+ cancelBattleRequest: U,
110
+ acceptBattle: E,
111
+ rejectBattle: L,
112
+ exitBattle: R
113
113
  };
114
114
  }
115
115
  export {