tuikit-atomicx-vue3 4.5.2 → 4.5.4

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 (66) hide show
  1. package/dist/baseComp/Input/InputH5.vue.d.ts +1 -1
  2. package/dist/baseComp/Input/InputPC.vue.d.ts +1 -1
  3. package/dist/baseComp/Input/InputWX.vue.d.ts +1 -1
  4. package/dist/baseComp/Input/index.d.ts +15 -15
  5. package/dist/components/BarrageInput/TextEditor/TextEditor.vue.d.ts +1 -1
  6. package/dist/components/BarrageInput/index.d.ts +6 -6
  7. package/dist/components/ChatSetting/SettingItem/SettingItem.vue.d.ts +2 -2
  8. package/dist/components/ContactList/index.d.ts +6 -6
  9. package/dist/components/ConversationList/ConversationList.vue.d.ts +190 -190
  10. package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +82 -82
  11. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +16 -16
  12. package/dist/components/ConversationList/ConversationSearch/ConversationSearch.vue.d.ts +36 -36
  13. package/dist/components/ConversationList/index.d.ts +416 -416
  14. package/dist/components/LiveView/PlayerControl/PlayerControl.js +145 -128
  15. package/dist/components/LiveView/PlayerControl/PlayerControlState.d.ts +6 -4
  16. package/dist/components/LiveView/PlayerControl/PlayerControlState.js +148 -122
  17. package/dist/components/LiveView/PlayerControl/utils/domHelpers.d.ts +2 -1
  18. package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +7 -6
  19. package/dist/components/LiveView/i18n/en-US/index.d.ts +3 -0
  20. package/dist/components/LiveView/i18n/en-US/index.js +4 -1
  21. package/dist/components/LiveView/i18n/zh-CN/index.d.ts +3 -0
  22. package/dist/components/LiveView/i18n/zh-CN/index.js +4 -1
  23. package/dist/components/LiveView/index.js +78 -78
  24. package/dist/components/MessageInput/MessageInput.vue.d.ts +1 -1
  25. package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +1 -1
  26. package/dist/components/MessageInput/index.d.ts +30 -30
  27. package/dist/components/RoomParticipantList/useParticpantAction/useNameCardAction/index.d.ts +10 -2
  28. package/dist/components/Search/Search.vue.d.ts +12 -12
  29. package/dist/components/Search/index.d.ts +18 -18
  30. package/dist/components/StreamView/Layout/CustomLayout.vue.d.ts +2 -1
  31. package/dist/components/StreamView/Layout/FloatLayout.vue.d.ts +2 -1
  32. package/dist/components/StreamView/Layout/GridLayout.vue.d.ts +2 -1
  33. package/dist/components/StreamView/Layout/MeetingLayout.vue.d.ts +1 -1
  34. package/dist/components/StreamView/common/StreamList/index.vue.d.ts +1 -1
  35. package/dist/components/StreamView/common/StreamRegion/StreamRegionPC.vue.d.ts +2 -2
  36. package/dist/components/StreamView/index.d.ts +1 -1
  37. package/dist/components/StreamView/index.vue.d.ts +1 -1
  38. package/dist/hooks/useRoomEngine.d.ts +2 -2
  39. package/dist/hooks/useUserActions/index.d.ts +18 -2
  40. package/dist/hooks/useUserActions/useChangeNameCardAction/index.d.ts +9 -1
  41. package/dist/hooks/useUserActions/useKickUserAction.d.ts +9 -1
  42. package/dist/hooks/useUserActions/useTransferOwnerAction.d.ts +9 -1
  43. package/dist/hooks/useUserActions/useVideoAction.d.ts +9 -1
  44. package/dist/states/BarrageState/BarrageState.d.ts +2 -2
  45. package/dist/states/BattleState/BattleState.d.ts +5 -5
  46. package/dist/states/CoGuestState.d.ts +1 -1
  47. package/dist/states/LiveAudienceState.d.ts +4 -4
  48. package/dist/states/LiveListState/LiveListState.d.ts +2 -2
  49. package/dist/states/LiveSeatState/index.d.ts +6 -6
  50. package/dist/states/LiveSeatState/seatManager.d.ts +6 -6
  51. package/dist/states/RoomState/roomManager.d.ts +1 -0
  52. package/dist/states/RoomState/roomManager.js +38 -29
  53. package/dist/states/RoomState/scheduleManager.js +19 -25
  54. package/dist/states/SeatStore.d.ts +148 -16
  55. package/dist/states/UserState/userManager.d.ts +1 -1
  56. package/dist/styles/index.css +1 -1
  57. package/dist/subEntry/chat/chat.d.ts +457 -457
  58. package/dist/subEntry/live/server.d.ts +1 -1
  59. package/dist/subEntry/room/server.d.ts +1 -1
  60. package/package.json +3 -2
  61. package/src/components/LiveView/PlayerControl/PlayerControl.vue +39 -15
  62. package/src/components/LiveView/PlayerControl/PlayerControlState.ts +61 -18
  63. package/src/components/LiveView/PlayerControl/utils/domHelpers.ts +4 -4
  64. package/src/components/LiveView/i18n/en-US/index.ts +3 -0
  65. package/src/components/LiveView/i18n/zh-CN/index.ts +3 -0
  66. package/src/components/LiveView/index.vue +7 -3
@@ -1,171 +1,188 @@
1
- import $ from "./AudioControl.js";
2
- import { defineComponent as ee, ref as v, onMounted as te, onBeforeUnmount as oe, createBlock as p, openBlock as f, Transition as ne, withCtx as se, withDirectives as le, createElementVNode as s, normalizeClass as ce, unref as o, createVNode as m, vShow as re } from "vue";
3
- import { useUIKit as ue, IconPause as ae, IconPlay as ie, IconPictureInPicture as de, IconFullScreen as ve, TUIToast as me, TOAST_TYPE as he } from "@tencentcloud/uikit-base-component-vue3";
4
- import { usePlayerControlState as pe } from "./PlayerControlState.js";
5
- import fe from "./MultiResolution.js";
6
- import { isMobile as r } from "../../../utils/env.js";
7
- import { _ as Ce } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
8
- const _e = { class: "control-buttons" }, Pe = ["title"], ye = { class: "right-controls" }, Ee = { class: "control-btn audio-control-btn" }, Te = ["title"], Le = ["title"], Me = 3e3, Ie = /* @__PURE__ */ ee({
1
+ import ce from "./AudioControl.js";
2
+ import { defineComponent as re, ref as h, onMounted as ue, onBeforeUnmount as ae, createBlock as y, openBlock as v, Transition as ie, withCtx as de, withDirectives as me, createElementVNode as r, normalizeClass as P, unref as t, createElementBlock as A, createCommentVNode as N, createVNode as p, vShow as ve } from "vue";
3
+ import { useUIKit as fe, IconPause as he, IconPlay as pe, IconPictureInPicture as ye, IconFullScreen as Pe, TUIToast as C, TOAST_TYPE as _ } from "@tencentcloud/uikit-base-component-vue3";
4
+ import Ce from "./MultiResolution.js";
5
+ import { usePlayerControlState as _e } from "./PlayerControlState.js";
6
+ import { isMobile as u } from "../../../utils/env.js";
7
+ import { _ as Ee } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
8
+ const Te = { class: "control-buttons" }, Le = ["title"], ge = { class: "right-controls" }, Ie = {
9
+ key: 0,
10
+ class: "control-btn audio-control-btn"
11
+ }, Me = ["title"], we = ["title"], be = 3e3, Se = /* @__PURE__ */ re({
9
12
  __name: "PlayerControl",
10
13
  props: {
11
14
  isLandscapeStyleMode: { type: Boolean }
12
15
  },
13
- setup(g) {
16
+ setup(x) {
14
17
  const {
15
- isMuted: C,
16
- isPlaying: h,
17
- isFullscreen: _,
18
- isPictureInPicture: P,
19
- currentVolume: w,
20
- pause: b,
21
- resume: S,
22
- requestPictureInPicture: x,
23
- exitPictureInPicture: A,
24
- requestFullscreen: k,
25
- exitFullscreen: F,
26
- setVolume: V,
27
- setMute: z,
28
- cleanup: D
29
- } = pe(), R = g, { t: l } = ue(), n = v(), c = v(!1), u = v(null), B = () => {
30
- h.value ? b() : S();
31
- }, O = async () => {
18
+ isMuted: E,
19
+ isPlaying: a,
20
+ isFullscreen: T,
21
+ isPictureInPicture: c,
22
+ currentVolume: V,
23
+ pause: F,
24
+ resume: R,
25
+ requestPictureInPicture: z,
26
+ exitPictureInPicture: B,
27
+ requestFullscreen: D,
28
+ exitFullscreen: O,
29
+ setVolume: U,
30
+ setMute: X,
31
+ cleanup: Y,
32
+ isSafari: L,
33
+ isTcPlayer: g
34
+ } = _e(), q = x, { t: n } = fe(), s = h(), l = h(!1), i = h(null), H = () => {
35
+ if (c.value) {
36
+ C({
37
+ type: _.WARNING,
38
+ message: n('Not allow to "Pause" in picture-in-picture mode')
39
+ });
40
+ return;
41
+ }
42
+ a.value ? F() : R();
43
+ }, K = async () => {
44
+ if (!a.value && !c.value) {
45
+ C({
46
+ type: _.WARNING,
47
+ message: n('Not allow to "Picture in Picture" in non-playing mode')
48
+ });
49
+ return;
50
+ }
32
51
  let e = !1;
33
- P.value ? e = await A() : e = await x(), e || me({
34
- type: he.ERROR,
35
- message: l("The system does not support picture-in-picture mode")
52
+ c.value ? e = await B() : e = await z(), e || C({
53
+ type: _.ERROR,
54
+ message: n("The system does not support picture-in-picture mode")
36
55
  });
37
- }, N = () => {
38
- console.log("handleFullscreen"), _.value ? F() : k();
39
- }, U = async (e) => {
40
- r && d(), await V(e);
41
- }, X = async () => {
42
- await z(!C.value);
56
+ }, G = () => {
57
+ console.log("handleFullscreen"), T.value ? O() : D();
58
+ }, W = async (e) => {
59
+ u && f(), await U(e);
60
+ }, j = async () => {
61
+ await X(!E.value);
62
+ }, f = () => {
63
+ d(), i.value = window.setTimeout(() => {
64
+ l.value = !1, i.value = null;
65
+ }, be);
43
66
  }, d = () => {
44
- a(), u.value = window.setTimeout(() => {
45
- c.value = !1, u.value = null;
46
- }, Me);
47
- }, a = () => {
48
- u.value && (clearTimeout(u.value), u.value = null);
49
- }, y = () => {
50
- a(), c.value = !0;
51
- }, E = () => {
52
- d();
53
- }, Y = () => {
54
- if (!r && n.value) {
55
- const { parentElement: e } = n.value;
56
- e && (e.addEventListener("mouseover", y), e.addEventListener("mouseout", E));
67
+ i.value && (clearTimeout(i.value), i.value = null);
68
+ }, I = () => {
69
+ d(), l.value = !0;
70
+ }, M = () => {
71
+ f();
72
+ }, J = () => {
73
+ if (!u && s.value) {
74
+ const { parentElement: e } = s.value;
75
+ e && (e.addEventListener("mouseover", I), e.addEventListener("mouseout", M));
57
76
  }
58
- }, q = () => {
59
- if (!r && n.value) {
60
- const { parentElement: e } = n.value;
61
- e && (e.removeEventListener("mouseover", y), e.removeEventListener("mouseout", E));
77
+ }, Q = () => {
78
+ if (!u && s.value) {
79
+ const { parentElement: e } = s.value;
80
+ e && (e.removeEventListener("mouseover", I), e.removeEventListener("mouseout", M));
62
81
  }
63
- }, i = v(null), H = (e, t) => Math.sqrt(Math.pow(t.clientX - e.x, 2) + Math.pow(t.clientY - e.y, 2)), K = (e) => {
64
- var t;
65
- return ((t = n.value) == null ? void 0 : t.contains(e)) || !1;
66
- }, j = (e) => {
67
- const t = document.getElementById("live-core-view-container");
68
- return (t == null ? void 0 : t.contains(e)) || !1;
69
- }, G = () => {
70
- a(), d();
71
- }, J = () => {
72
- c.value = !c.value, c.value && d();
73
- }, T = (e) => {
82
+ }, m = h(null), Z = (e, o) => Math.sqrt((o.clientX - e.x) ** 2 + (o.clientY - e.y) ** 2), $ = (e) => {
83
+ var o;
84
+ return ((o = s.value) == null ? void 0 : o.contains(e)) || !1;
85
+ }, ee = (e) => {
86
+ const o = document.getElementById("live-core-view-container");
87
+ return (o == null ? void 0 : o.contains(e)) || !1;
88
+ }, te = () => {
89
+ d(), f();
90
+ }, oe = () => {
91
+ l.value = !l.value, l.value && f();
92
+ }, w = (e) => {
74
93
  if (e.touches.length === 1) {
75
- const t = e.touches[0];
76
- i.value = {
77
- x: t.clientX,
78
- y: t.clientY
94
+ const o = e.touches[0];
95
+ m.value = {
96
+ x: o.clientX,
97
+ y: o.clientY
79
98
  };
80
99
  }
81
- }, L = (e) => {
82
- if (n.value && n.value.contains(e.target)) {
83
- a();
100
+ }, b = (e) => {
101
+ s.value && s.value.contains(e.target) && d();
102
+ }, S = (e) => {
103
+ if (!m.value)
84
104
  return;
85
- }
86
- }, M = (e) => {
87
- if (!i.value)
88
- return;
89
- const t = e.changedTouches[0];
90
- if (H(i.value, t) > 20) {
91
- i.value = null;
105
+ const o = e.changedTouches[0];
106
+ if (Z(m.value, o) > 20) {
107
+ m.value = null;
92
108
  return;
93
109
  }
94
- const I = e.target;
95
- K(I) ? G() : j(I) ? J() : c.value = !1, i.value = null;
96
- }, Q = () => {
97
- r && (document.addEventListener("touchstart", T, !0), document.addEventListener("touchmove", L, !0), document.addEventListener("touchend", M, !0));
98
- }, W = () => {
99
- r && (document.removeEventListener("touchstart", T, !0), document.removeEventListener("touchmove", L, !0), document.removeEventListener("touchend", M, !0));
100
- }, Z = () => {
101
- W(), q(), a();
110
+ const k = e.target;
111
+ $(k) ? te() : ee(k) ? oe() : l.value = !1, m.value = null;
112
+ }, ne = () => {
113
+ u && (document.addEventListener("touchstart", w, !0), document.addEventListener("touchmove", b, !0), document.addEventListener("touchend", S, !0));
114
+ }, se = () => {
115
+ u && (document.removeEventListener("touchstart", w, !0), document.removeEventListener("touchmove", b, !0), document.removeEventListener("touchend", S, !0));
116
+ }, le = () => {
117
+ se(), Q(), d();
102
118
  };
103
- return te(() => {
104
- Q(), Y();
105
- }), oe(() => {
106
- Z(), D();
107
- }), (e, t) => (f(), p(ne, { name: "player-control" }, {
108
- default: se(() => [
109
- le(s("div", {
119
+ return ue(() => {
120
+ ne(), J();
121
+ }), ae(() => {
122
+ le(), Y();
123
+ }), (e, o) => (v(), y(ie, { name: "player-control" }, {
124
+ default: de(() => [
125
+ me(r("div", {
110
126
  ref_key: "playerControlRef",
111
- ref: n,
112
- class: ce([
127
+ ref: s,
128
+ class: P([
113
129
  "playback-controls",
114
- o(r) ? "mobile-mode" : "pc-mode",
115
- { "mobile-landscape-mode": R.isLandscapeStyleMode }
130
+ t(u) ? "mobile-mode" : "pc-mode",
131
+ { "mobile-landscape-mode": q.isLandscapeStyleMode }
116
132
  ])
117
133
  }, [
118
- s("div", _e, [
119
- s("span", {
120
- class: "control-btn play-pause-btn",
121
- title: o(h) ? o(l)("Pause") : o(l)("Play"),
122
- onClick: B
134
+ r("div", Te, [
135
+ !t(L) || !t(g) ? (v(), A("span", {
136
+ key: 0,
137
+ class: P(["control-btn play-pause-btn", { disabled: t(c) }]),
138
+ title: t(a) ? t(n)("Pause") : t(n)("Play"),
139
+ onClick: H
123
140
  }, [
124
- o(h) ? (f(), p(o(ae), {
141
+ t(a) ? (v(), y(t(he), {
125
142
  key: 0,
126
143
  size: "20"
127
- })) : (f(), p(o(ie), {
144
+ })) : (v(), y(t(pe), {
128
145
  key: 1,
129
146
  size: "20"
130
147
  }))
131
- ], 8, Pe),
132
- t[0] || (t[0] = s("div", { class: "center-controls" }, null, -1)),
133
- s("div", ye, [
134
- m(fe),
135
- s("span", Ee, [
136
- m($, {
148
+ ], 10, Le)) : N("", !0),
149
+ o[0] || (o[0] = r("div", { class: "center-controls" }, null, -1)),
150
+ r("div", ge, [
151
+ p(Ce),
152
+ !t(L) || !t(g) ? (v(), A("span", Ie, [
153
+ p(ce, {
137
154
  class: "audio-control-icon",
138
155
  "icon-size": 20,
139
- volume: o(w),
140
- "is-muted": o(C),
141
- onVolumeChange: U,
142
- onMuteChange: X
156
+ volume: t(V),
157
+ "is-muted": t(E),
158
+ onVolumeChange: W,
159
+ onMuteChange: j
143
160
  }, null, 8, ["volume", "is-muted"])
144
- ]),
145
- s("span", {
146
- class: "control-btn",
147
- title: o(P) ? o(l)("Exit Picture in Picture") : o(l)("Picture in Picture"),
148
- onClick: O
161
+ ])) : N("", !0),
162
+ r("span", {
163
+ class: P(["control-btn", { disabled: !t(a) && !t(c) }]),
164
+ title: t(c) ? t(n)("Exit Picture in Picture") : t(n)("Picture in Picture"),
165
+ onClick: K
149
166
  }, [
150
- m(o(de), { size: "20" })
151
- ], 8, Te),
152
- s("span", {
167
+ p(t(ye), { size: "20" })
168
+ ], 10, Me),
169
+ r("span", {
153
170
  class: "control-btn fullscreen-btn",
154
- title: o(_) ? o(l)("Exit Fullscreen") : o(l)("Fullscreen"),
155
- onClick: N
171
+ title: t(T) ? t(n)("Exit Fullscreen") : t(n)("Fullscreen"),
172
+ onClick: G
156
173
  }, [
157
- m(o(ve), { size: "20" })
158
- ], 8, Le)
174
+ p(t(Pe), { size: "20" })
175
+ ], 8, we)
159
176
  ])
160
177
  ])
161
178
  ], 2), [
162
- [re, c.value]
179
+ [ve, l.value]
163
180
  ])
164
181
  ]),
165
182
  _: 1
166
183
  }));
167
184
  }
168
- }), ze = /* @__PURE__ */ Ce(Ie, [["__scopeId", "data-v-b49684d0"]]);
185
+ }), De = /* @__PURE__ */ Ee(Se, [["__scopeId", "data-v-01f3a581"]]);
169
186
  export {
170
- ze as default
187
+ De as default
171
188
  };
@@ -7,10 +7,10 @@ export declare enum FillMode {
7
7
  FILL = "fill"
8
8
  }
9
9
  export declare enum Resolution {
10
- R360P,
11
- R540P,
12
- R720P,
13
- R1080P
10
+ R360P = 1,
11
+ R540P = 2,
12
+ R720P = 3,
13
+ R1080P = 4
14
14
  }
15
15
  export interface PlayerControlState {
16
16
  isPlaying: Ref<boolean>;
@@ -20,6 +20,8 @@ export interface PlayerControlState {
20
20
  isPictureInPicture: Ref<boolean>;
21
21
  currentVolume: Ref<number>;
22
22
  isMuted: Ref<boolean>;
23
+ isSafari: Ref<boolean>;
24
+ isTcPlayer: Ref<boolean>;
23
25
  resolutionList: Ref<Resolution[]>;
24
26
  currentResolution: Ref<Resolution | undefined>;
25
27
  resume: () => Promise<boolean>;