tuikit-atomicx-vue3 4.5.0 → 4.5.1

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 (109) hide show
  1. package/dist/{PopoverTrigger-L8abAry7.js → PopoverPortal-DghpKKm8.js} +91 -136
  2. package/dist/PopoverTrigger-BajjNkGO.js +54 -0
  3. package/dist/{PopperContent-XdhqL8Y2.js → PopperContent-SLoFuK7k.js} +6 -6
  4. package/dist/{Teleport-CSEuZbpM.js → Teleport-DFrneqLM.js} +4 -4
  5. package/dist/baseComp/Modal/Modal.js +3 -3
  6. package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +10 -9
  7. package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
  8. package/dist/components/BarrageInput/TextEditor/EditorCore.js +16 -15
  9. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +62 -40
  10. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +29 -27
  11. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +27 -23
  12. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue.d.ts +1 -1
  13. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +67 -65
  14. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +32 -30
  15. package/dist/components/ConversationList/ConversationPreview/utils.d.ts +2 -2
  16. package/dist/components/ConversationList/ConversationPreview/utils.js +81 -35
  17. package/dist/components/ConversationList/i18n/en-US.d.ts +10 -1
  18. package/dist/components/ConversationList/i18n/en-US.js +11 -2
  19. package/dist/components/ConversationList/i18n/zh-CN.d.ts +10 -1
  20. package/dist/components/ConversationList/i18n/zh-CN.js +11 -2
  21. package/dist/components/LiveScenePanel/index.js +10 -9
  22. package/dist/components/MessageInput/AttachmentPicker/index.js +10 -9
  23. package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +17 -16
  24. package/dist/components/MessageInput/QuotedMessagePreview/index.js +35 -35
  25. package/dist/components/MessageInput/TextEditor/EditorCore.d.ts +13 -12
  26. package/dist/components/MessageInput/TextEditor/EditorCore.js +54 -89
  27. package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.js +229 -0
  28. package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.vue.d.ts +15 -0
  29. package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +1 -1
  30. package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.d.ts +1 -0
  31. package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.js +22 -0
  32. package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.d.ts +3 -0
  33. package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.js +15 -0
  34. package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +2 -2
  35. package/dist/components/MessageInput/TextEditor/extensions/index.d.ts +8 -0
  36. package/dist/components/MessageInput/TextEditor/extensions/index.js +12 -0
  37. package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.d.ts +5 -0
  38. package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.js +330 -0
  39. package/dist/components/MessageInput/TextEditor/index.js +62 -62
  40. package/dist/components/MessageInput/i18n/en-US.d.ts +3 -0
  41. package/dist/components/MessageInput/i18n/en-US.js +4 -1
  42. package/dist/components/MessageInput/i18n/index.d.ts +6 -0
  43. package/dist/components/MessageInput/i18n/zh-CN.d.ts +3 -0
  44. package/dist/components/MessageInput/i18n/zh-CN.js +4 -1
  45. package/dist/components/MessageList/Message/ImageMessage/ImageMessage.js +119 -89
  46. package/dist/components/MessageList/Message/ImageMessage/ImagePreview.js +142 -0
  47. package/dist/components/MessageList/Message/ImageMessage/ImagePreview.vue.d.ts +20 -0
  48. package/dist/components/MessageList/Message/Message.vue.d.ts +8 -0
  49. package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +3 -3
  50. package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +69 -58
  51. package/dist/components/MessageList/Message/MessageLayout/MessageLayout.vue.d.ts +8 -0
  52. package/dist/components/MessageList/Message/index.js +8 -4
  53. package/dist/components/MessageList/MessageList.js +98 -90
  54. package/dist/components/MessageList/MessageList.vue.d.ts +1 -1
  55. package/dist/components/MessageList/index.d.ts +21 -3
  56. package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.js +6 -6
  57. package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.vue.d.ts +1 -1
  58. package/dist/index-BvFYOUyz.js +2936 -0
  59. package/dist/{index-Do-2CngU.js → index-C8Jw_xE4.js} +1621 -1731
  60. package/dist/{index-7vNB_Vx8.js → index-CiYL_XsE.js} +1 -1
  61. package/dist/index-CzCDLp99.js +2174 -0
  62. package/dist/index.d.ts +1 -1
  63. package/dist/index.js +103 -103
  64. package/dist/states/MessageActionState/MessageActionState.js +83 -223
  65. package/dist/states/MessageInputState/MessageInputState.js +115 -83
  66. package/dist/states/MessageInputState/type.d.ts +36 -10
  67. package/dist/states/MessageInputState/utils.d.ts +1 -5
  68. package/dist/states/MessageListState/MessageListState.d.ts +1 -1
  69. package/dist/styles/index.css +1 -1
  70. package/dist/{chat/index.d.ts → subEntry/chat/chat.d.ts} +2112 -2087
  71. package/dist/subEntry/chat/chat.js +89 -0
  72. package/dist/subEntry/chat/index.d.ts +11 -0
  73. package/dist/subEntry/chat/index.js +81 -0
  74. package/dist/{chat → subEntry/chat}/server.js +4 -4
  75. package/dist/{useId-CtirfF0W.js → useId-D5WE76CM.js} +1 -1
  76. package/dist/{utils-DaB7eSu5.js → utils-CttDpxqz.js} +1 -1
  77. package/package.json +8 -6
  78. package/src/components/ConversationList/ConversationPreview/ConversationPreview.scss +8 -0
  79. package/src/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.vue +32 -1
  80. package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +3 -2
  81. package/src/components/ConversationList/ConversationPreview/utils.ts +98 -28
  82. package/src/components/ConversationList/i18n/en-US.ts +10 -1
  83. package/src/components/ConversationList/i18n/zh-CN.ts +10 -1
  84. package/src/components/LiveScenePanel/index.vue +1 -0
  85. package/src/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.vue +19 -22
  86. package/src/components/MessageInput/TextEditor/Editor.scss +25 -0
  87. package/src/components/MessageInput/TextEditor/EditorCore.ts +79 -99
  88. package/src/components/MessageInput/TextEditor/TextEditor.vue +64 -68
  89. package/src/components/MessageInput/TextEditor/extensions/MentionSuggestion.vue +449 -0
  90. package/src/components/MessageInput/TextEditor/extensions/emojiExtension.ts +22 -0
  91. package/src/components/MessageInput/TextEditor/extensions/enterKeyExtension.ts +22 -0
  92. package/src/components/MessageInput/TextEditor/extensions/index.ts +8 -0
  93. package/src/components/MessageInput/TextEditor/extensions/mentionExtension.ts +87 -0
  94. package/src/components/MessageInput/i18n/en-US.ts +3 -0
  95. package/src/components/MessageInput/i18n/zh-CN.ts +3 -0
  96. package/src/components/MessageList/Message/ImageMessage/ImageMessage.vue +49 -0
  97. package/src/components/MessageList/Message/ImageMessage/ImagePreview.vue +344 -0
  98. package/src/components/MessageList/Message/Message.vue +6 -0
  99. package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +8 -1
  100. package/src/components/MessageList/MessageList.vue +36 -14
  101. package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.vue +30 -31
  102. package/src/index.ts +1 -1
  103. package/src/{chat/index.ts → subEntry/chat/chat.ts} +25 -18
  104. package/src/subEntry/chat/index.ts +13 -0
  105. package/src/{chat → subEntry/chat}/server.ts +3 -3
  106. package/dist/chat/index.js +0 -59
  107. package/dist/index-ZILx4LYk.js +0 -4826
  108. package/dist/states/SearchState.d.ts +0 -314
  109. /package/dist/{chat → subEntry/chat}/server.d.ts +0 -0
@@ -1,43 +1,89 @@
1
- import r from "@tencentcloud/chat-uikit-engine";
2
- const u = (n, e) => {
3
- var T;
4
- const t = (T = n == null ? void 0 : n.getShowName) == null ? void 0 : T.call(n);
1
+ import u from "@tencentcloud/chat-uikit-engine";
2
+ import { MessageType as a, ConversationType as c } from "../../../types/engine.js";
3
+ import { parseCallMessageText as _ } from "../../../utils/call.js";
4
+ import { resolveGroupTipMessage as U } from "../../MessageList/Message/GroupTipMessage/resolveGroupTipMessage.js";
5
+ import { safeJSONParse as C } from "../../../utils/json.js";
6
+ import { transformTextWithEmojiKeyToName as b } from "../../../utils/emoji.js";
7
+ const h = (o, e) => {
8
+ var m;
9
+ const i = (m = o == null ? void 0 : o.getShowName) == null ? void 0 : m.call(o);
5
10
  if (!e)
6
- return [{ text: t, isHighlight: !1 }];
7
- const i = new RegExp(`(${e})`, "gi");
8
- return t.split(i).map((o) => ({
9
- text: o,
10
- isHighlight: o.toLowerCase() === e.toLowerCase()
11
+ return [{ text: i, isHighlight: !1 }];
12
+ const T = new RegExp(`(${e})`, "gi");
13
+ return i.split(T).map((s) => ({
14
+ text: s,
15
+ isHighlight: s.toLowerCase() === e.toLowerCase()
11
16
  }));
12
- }, C = (n, e) => {
13
- const { lastMessage: t } = n || {};
17
+ }, y = (o, e) => {
18
+ var I;
19
+ const { draftText: i } = o || {};
20
+ if (i)
21
+ return typeof i == "string" ? i : C(i, { abstract: "" }).abstract;
22
+ const T = {
23
+ 4: e("TUIConversation.you_have_been_removed_from_the_group"),
24
+ 5: e("TUIConversation.the_group_chat_has_been_disbanded"),
25
+ 8: e("TUIConversation.you_have_left_the_group_chat")
26
+ };
27
+ if (o.operationType && T[o.operationType])
28
+ return T[o.operationType];
29
+ const { lastMessage: t } = o;
14
30
  if (!t)
15
31
  return "";
16
- const { type: i, payload: s } = t, { nick: T, userID: o } = t.nick || (t == null ? void 0 : t.from) || {}, E = T || o || "";
17
- switch (i) {
18
- case r.TYPES.MSG_TEXT:
19
- return s.text || "";
20
- case r.TYPES.MSG_IMAGE:
21
- return `[${e("TUIConversation.Image")}]`;
22
- case r.TYPES.MSG_AUDIO:
23
- return `[${e("TUIConversation.Audio")}]`;
24
- case r.TYPES.MSG_VIDEO:
25
- return `[${e("TUIConversation.Video")}]`;
26
- case r.TYPES.MSG_FILE:
27
- return `[${e("TUIConversation.File")}]`;
28
- case r.TYPES.MSG_CUSTOM:
29
- return `[${e("TUIConversation.Custom")}]`;
30
- case r.TYPES.MSG_LOCATION:
31
- return `[${e("TUIConversation.Location")}]`;
32
- case r.TYPES.MSG_FACE:
33
- return `[${e("TUIConversation.Emoji")}]`;
34
- case r.TYPES.MSG_MERGER:
35
- return `[${e("TUIConversation.Chat History")}]`;
36
- default:
37
- return E ? `${E}: ${(s == null ? void 0 : s.text) || ""}` : (s == null ? void 0 : s.text) || "";
32
+ const m = o.type === c.GROUP, s = t, { type: p, payload: f } = s;
33
+ let r = "";
34
+ if (t != null && t.isRevoked)
35
+ r = e("TUIConversation.recalled_a_message");
36
+ else
37
+ switch (p) {
38
+ case a.TEXT:
39
+ r = b(f.text || "");
40
+ break;
41
+ case a.IMAGE:
42
+ r = `[${e("TUIConversation.Image")}]`;
43
+ break;
44
+ case a.AUDIO:
45
+ r = `[${e("TUIConversation.Audio")}]`;
46
+ break;
47
+ case a.VIDEO:
48
+ r = `[${e("TUIConversation.Video")}]`;
49
+ break;
50
+ case a.FILE:
51
+ r = `[${e("TUIConversation.File")}]`;
52
+ break;
53
+ case a.CUSTOM: {
54
+ const n = C(f == null ? void 0 : f.data, { businessID: void 0 });
55
+ if ((n == null ? void 0 : n.businessID) === 1)
56
+ try {
57
+ r = _(s, e);
58
+ } catch {
59
+ r = `[${e("TUIConversation.call_message")}]`;
60
+ }
61
+ else
62
+ r = `[${e("TUIConversation.Custom")}]`;
63
+ break;
64
+ }
65
+ case a.LOCATION:
66
+ r = `[${e("TUIConversation.Location")}]`;
67
+ break;
68
+ case a.FACE:
69
+ r = `[${e("TUIConversation.Face")}]`;
70
+ break;
71
+ case a.MERGER:
72
+ r = `[${e("TUIConversation.Chat History")}]`;
73
+ break;
74
+ case a.GRP_TIP:
75
+ return (I = U(s)) == null ? void 0 : I.text;
76
+ default:
77
+ r = `[${e("TUIConversation.unknown_message")}]`;
78
+ break;
79
+ }
80
+ if (m) {
81
+ let n = "";
82
+ return (t == null ? void 0 : t.fromAccount) === u.getMyUserID() ? n = e("TUIConversation.me") : n = o.remark || (s == null ? void 0 : s.nameCard) || (t == null ? void 0 : t.nick) || t.fromAccount, n ? `${n}: ${r}` : r;
38
83
  }
84
+ return r;
39
85
  };
40
86
  export {
41
- u as generateHighlightTitle,
42
- C as getLatestMessagePreview
87
+ h as generateHighlightTitle,
88
+ y as getLatestMessagePreview
43
89
  };
@@ -47,8 +47,17 @@ declare const _default: {
47
47
  File: string;
48
48
  Custom: string;
49
49
  Location: string;
50
- Emoji: string;
50
+ Face: string;
51
51
  'Chat History': string;
52
+ call_message: string;
53
+ unknown_message: string;
54
+ me: string;
55
+ recalled_a_message: string;
56
+ you_have_been_removed_from_the_group: string;
57
+ the_group_chat_has_been_disbanded: string;
58
+ you_have_left_the_group_chat: string;
59
+ someone_at_me: string;
60
+ at_all: string;
52
61
  };
53
62
  };
54
63
  export default _default;
@@ -56,8 +56,17 @@ const e = {
56
56
  File: "File",
57
57
  Custom: "Custom",
58
58
  Location: "Location",
59
- Emoji: "Emoji",
60
- "Chat History": "Chat History"
59
+ Face: "Face",
60
+ "Chat History": "Chat History",
61
+ call_message: "Call Message",
62
+ unknown_message: "Unknown Message",
63
+ me: "Me",
64
+ recalled_a_message: "recalled a message",
65
+ you_have_been_removed_from_the_group: "You have been removed from the group by the group administrator",
66
+ the_group_chat_has_been_disbanded: "The group chat has been disbanded",
67
+ you_have_left_the_group_chat: "You have left the group chat",
68
+ someone_at_me: "You were mentioned",
69
+ at_all: "@All"
61
70
  }
62
71
  };
63
72
  export {
@@ -47,8 +47,17 @@ declare const _default: {
47
47
  File: string;
48
48
  Custom: string;
49
49
  Location: string;
50
- Emoji: string;
50
+ Face: string;
51
51
  'Chat History': string;
52
+ call_message: string;
53
+ unknown_message: string;
54
+ me: string;
55
+ recalled_a_message: string;
56
+ you_have_been_removed_from_the_group: string;
57
+ the_group_chat_has_been_disbanded: string;
58
+ you_have_left_the_group_chat: string;
59
+ someone_at_me: string;
60
+ at_all: string;
52
61
  };
53
62
  };
54
63
  export default _default;
@@ -56,8 +56,17 @@ const e = {
56
56
  File: "文件",
57
57
  Custom: "自定义消息",
58
58
  Location: "位置",
59
- Emoji: "表情",
60
- "Chat History": "聊天记录"
59
+ Face: "动画表情",
60
+ "Chat History": "聊天记录",
61
+ call_message: "通话消息",
62
+ unknown_message: "消息",
63
+ me: "我",
64
+ recalled_a_message: "撤回了一条消息",
65
+ you_have_been_removed_from_the_group: "你已被群管理员移出该群",
66
+ the_group_chat_has_been_disbanded: "该群聊已解散",
67
+ you_have_left_the_group_chat: "你已退出该群聊",
68
+ someone_at_me: "有人@我",
69
+ at_all: "@所有人"
61
70
  }
62
71
  };
63
72
  export {
@@ -17,11 +17,11 @@ import { _ as ve } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
17
17
  const ye = { class: "materials-list" }, ke = /* @__PURE__ */ ee({
18
18
  __name: "index",
19
19
  setup(Ce) {
20
- const { t: n } = de(), { currentLive: g } = he(), { mediaSourceList: f, publishVideoQuality: U, addMediaSource: l, updateMediaSource: D, clearMediaSource: P } = ge(), { getCameraList: z } = fe();
20
+ const { t: n } = de(), { currentLive: g } = he(), { mediaSourceList: f, publishVideoQuality: U, addMediaSource: l, updateMediaSource: A, clearMediaSource: D } = ge(), { getCameraList: P } = fe();
21
21
  le.once("ready", async () => {
22
- await z();
22
+ await P();
23
23
  });
24
- const A = V(
24
+ const z = V(
25
25
  () => [...f.value].sort(
26
26
  (e, t) => {
27
27
  var a, i;
@@ -49,7 +49,7 @@ const ye = { class: "materials-list" }, ke = /* @__PURE__ */ ee({
49
49
  });
50
50
  }
51
51
  }, T = async (e, t) => {
52
- console.log("updateMaterial", t), await D(e, t), v(), M();
52
+ console.log("updateMaterial", t), await A(e, t), v(), M();
53
53
  }, y = s(null), Q = (e) => {
54
54
  y.value = e, h.value = !0;
55
55
  }, u = s(null);
@@ -110,6 +110,7 @@ const ye = { class: "materials-list" }, ke = /* @__PURE__ */ ee({
110
110
  name: n("Screen"),
111
111
  screen: {
112
112
  resolution: se.TRTCVideoResolution_1920_1080,
113
+ systemAudio: !0,
113
114
  fps: 15
114
115
  }
115
116
  });
@@ -152,7 +153,7 @@ const ye = { class: "materials-list" }, ke = /* @__PURE__ */ ee({
152
153
  u.value = e, m.value = !0;
153
154
  };
154
155
  return te(() => {
155
- P();
156
+ D();
156
157
  }), (e, t) => (c(), L("div", {
157
158
  class: ae(["live-scene-panel", { "no-material": I(f).length === 0 }])
158
159
  }, [
@@ -161,7 +162,7 @@ const ye = { class: "materials-list" }, ke = /* @__PURE__ */ ee({
161
162
  onAddMaterial: F
162
163
  }, null, 8, ["displayMode"]),
163
164
  ie("div", ye, [
164
- (c(!0), L(re, null, ne(A.value, (a) => (c(), k(pe, {
165
+ (c(!0), L(re, null, ne(z.value, (a) => (c(), k(pe, {
165
166
  key: a.id,
166
167
  material: a,
167
168
  onCameraSetting: (i) => G(a),
@@ -183,10 +184,10 @@ const ye = { class: "materials-list" }, ke = /* @__PURE__ */ ee({
183
184
  }, null, 8, ["material"])) : b("", !0)
184
185
  ], 2));
185
186
  }
186
- }), Se = /* @__PURE__ */ ve(ke, [["__scopeId", "data-v-571e9fbf"]]);
187
+ }), Se = /* @__PURE__ */ ve(ke, [["__scopeId", "data-v-2fc84bfb"]]);
187
188
  N("en-US", { translation: J });
188
189
  N("zh-CN", { translation: X });
189
- const Ae = Se;
190
+ const ze = Se;
190
191
  export {
191
- Ae as LiveScenePanel
192
+ ze as LiveScenePanel
192
193
  };
@@ -1,6 +1,7 @@
1
- import { defineComponent as E, computed as k, createElementBlock as o, openBlock as t, normalizeClass as n, unref as e, createBlock as s, withCtx as r, createVNode as c, renderSlot as b, createElementVNode as I, Fragment as f, renderList as h, resolveDynamicComponent as P, mergeProps as C } from "vue";
1
+ import { defineComponent as E, computed as k, createElementBlock as o, openBlock as t, normalizeClass as n, unref as e, createBlock as s, withCtx as r, createVNode as c, renderSlot as b, createElementVNode as I, Fragment as f, renderList as P, resolveDynamicComponent as h, mergeProps as C } from "vue";
2
2
  import { useUIKit as D, IconPlus as q } from "@tencentcloud/uikit-base-component-vue3";
3
- import { P as A, a as x, b as L, c as N } from "../../../PopoverTrigger-L8abAry7.js";
3
+ import { P as A, a as x, b as L } from "../../../PopoverPortal-DghpKKm8.js";
4
+ import { P as N } from "../../../PopoverTrigger-BajjNkGO.js";
4
5
  import S from "./FilePicker.js";
5
6
  import V from "./ImagePicker.js";
6
7
  import z from "./VideoPicker.js";
@@ -11,7 +12,7 @@ const p = {
11
12
  "attachment-picker--expanded": "_attachment-picker--expanded_1bduq_19",
12
13
  "attachment-picker__item": "_attachment-picker__item_1bduq_24",
13
14
  "attachment-picker__item-icon": "_attachment-picker__item-icon_1bduq_48"
14
- }, w = /* @__PURE__ */ E({
15
+ }, K = /* @__PURE__ */ E({
15
16
  __name: "AttachmentPicker",
16
17
  props: {
17
18
  attachmentPickerMode: { default: "collapsed" }
@@ -36,7 +37,7 @@ const p = {
36
37
  }, [
37
38
  i.value ? (t(), s(e(A), { key: 0 }, {
38
39
  default: r(() => [
39
- c(e(x), { as: "div" }, {
40
+ c(e(N), { as: "div" }, {
40
41
  default: r(() => [
41
42
  b(m.$slots, "default", {}, () => [
42
43
  c(e(q), {
@@ -47,9 +48,9 @@ const p = {
47
48
  ]),
48
49
  _: 3
49
50
  }),
50
- c(e(L), null, {
51
+ c(e(x), null, {
51
52
  default: r(() => [
52
- c(e(N), {
53
+ c(e(L), {
53
54
  side: "top",
54
55
  align: "start",
55
56
  "side-offset": 5
@@ -58,7 +59,7 @@ const p = {
58
59
  I("div", {
59
60
  class: n(e(p)["attachment-picker__popup"])
60
61
  }, [
61
- (t(!0), o(f, null, h(u.value, (a, l) => (t(), s(P(a.Component), C({ key: l }, { ref_for: !0 }, a.props), null, 16))), 128))
62
+ (t(!0), o(f, null, P(u.value, (a, l) => (t(), s(h(a.Component), C({ key: l }, { ref_for: !0 }, a.props), null, 16))), 128))
62
63
  ], 2)
63
64
  ]),
64
65
  _: 1
@@ -72,13 +73,13 @@ const p = {
72
73
  key: 1,
73
74
  class: n(e(p)["attachment-picker--expanded"])
74
75
  }, [
75
- (t(!0), o(f, null, h(u.value, (a, l) => (t(), s(P(a.Component), C({ key: l }, { ref_for: !0 }, a.props), null, 16))), 128))
76
+ (t(!0), o(f, null, P(u.value, (a, l) => (t(), s(h(a.Component), C({ key: l }, { ref_for: !0 }, a.props), null, 16))), 128))
76
77
  ], 2))
77
78
  ], 2));
78
79
  }
79
80
  });
80
81
  export {
81
- w as AttachmentPicker,
82
+ K as AttachmentPicker,
82
83
  S as FilePicker,
83
84
  V as ImagePicker,
84
85
  z as VideoPicker
@@ -1,7 +1,8 @@
1
1
  import { defineComponent as g, ref as C, useCssModule as E, onMounted as P, createBlock as h, openBlock as _, unref as e, withCtx as s, createVNode as i, createElementVNode as n, mergeProps as x, renderSlot as M, normalizeClass as a, createElementBlock as u, Fragment as I, renderList as $ } from "vue";
2
2
  import { useUIKit as z, IconEmoji as B } from "@tencentcloud/uikit-base-component-vue3";
3
3
  import { c as O } from "../../../index-DPczIrgX.js";
4
- import { P as T, a as y, b as S, c as U } from "../../../PopoverTrigger-L8abAry7.js";
4
+ import { P as T, a as y, b as S } from "../../../PopoverPortal-DghpKKm8.js";
5
+ import { P as U } from "../../../PopoverTrigger-BajjNkGO.js";
5
6
  import { View as w } from "../../../baseComp/View/index.js";
6
7
  import { emojiUrlMap as c, emojiBaseUrl as m } from "../../../constants/emoji.js";
7
8
  import { transformTextWithEmojiKeyToName as N } from "../../../utils/emoji.js";
@@ -18,7 +19,7 @@ const J = ["onClick"], L = ["src", "alt"], R = /* @__PURE__ */ g({
18
19
  disabled: { type: Boolean, default: !1 }
19
20
  },
20
21
  setup(f) {
21
- const l = f, d = C(!1), o = E(), { t: k } = z(), { insertContent: j } = V();
22
+ const r = f, d = C(!1), o = E(), { t: k } = z(), { insertContent: j } = V();
22
23
  P(() => {
23
24
  Object.values(c).forEach((t) => {
24
25
  const p = new Image();
@@ -26,7 +27,7 @@ const J = ["onClick"], L = ["src", "alt"], R = /* @__PURE__ */ g({
26
27
  });
27
28
  });
28
29
  const b = (t) => {
29
- l.disabled || (d.value = t);
30
+ r.disabled || (d.value = t);
30
31
  };
31
32
  function v(t) {
32
33
  t && j([
@@ -47,9 +48,9 @@ const J = ["onClick"], L = ["src", "alt"], R = /* @__PURE__ */ g({
47
48
  "onUpdate:open": b
48
49
  }, {
49
50
  default: s(() => [
50
- i(e(y), {
51
+ i(e(U), {
51
52
  as: "div",
52
- disabled: l.disabled
53
+ disabled: r.disabled
53
54
  }, {
54
55
  default: s(() => [
55
56
  n("div", x({
@@ -57,23 +58,23 @@ const J = ["onClick"], L = ["src", "alt"], R = /* @__PURE__ */ g({
57
58
  class: e(O)(
58
59
  e(o)["emoji-picker__button"],
59
60
  {
60
- [e(o).disabled]: l.disabled
61
+ [e(o).disabled]: r.disabled
61
62
  }
62
63
  )
63
64
  }, t.$attrs), [
64
65
  M(t.$slots, "default", {}, () => [
65
66
  i(e(B), {
66
67
  class: a(e(o)["emoji-picker__icon"]),
67
- size: l.iconSize
68
+ size: r.iconSize
68
69
  }, null, 8, ["class", "size"])
69
70
  ])
70
71
  ], 16)
71
72
  ]),
72
73
  _: 3
73
74
  }, 8, ["disabled"]),
74
- i(e(S), null, {
75
+ i(e(y), null, {
75
76
  default: s(() => [
76
- i(e(U), {
77
+ i(e(S), {
77
78
  side: "top",
78
79
  align: "start",
79
80
  "side-offset": 5
@@ -83,15 +84,15 @@ const J = ["onClick"], L = ["src", "alt"], R = /* @__PURE__ */ g({
83
84
  n("div", {
84
85
  class: a(e(o)["emoji-picker__list"])
85
86
  }, [
86
- (_(!0), u(I, null, $(Object.keys(e(c)), (r) => (_(), u("div", {
87
- key: r,
87
+ (_(!0), u(I, null, $(Object.keys(e(c)), (l) => (_(), u("div", {
88
+ key: l,
88
89
  class: a(e(o)["emoji-picker__list-item"]),
89
- onClick: (G) => v(r)
90
+ onClick: (G) => v(l)
90
91
  }, [
91
92
  n("img", {
92
93
  class: a(e(o)["emoji-picker__list-item"]),
93
- src: e(m) + e(c)[r],
94
- alt: e(k)(`Emoji.${r}`)
94
+ src: e(m) + e(c)[l],
95
+ alt: e(k)(`Emoji.${l}`)
95
96
  }, null, 10, L)
96
97
  ], 10, J))), 128))
97
98
  ], 2)
@@ -117,7 +118,7 @@ const J = ["onClick"], L = ["src", "alt"], R = /* @__PURE__ */ g({
117
118
  "emoji-picker__list-item": "_emoji-picker__list-item_kxj4t_36"
118
119
  }, D = {
119
120
  $style: q
120
- }, ie = /* @__PURE__ */ F(R, [["__cssModules", D]]);
121
+ }, re = /* @__PURE__ */ F(R, [["__cssModules", D]]);
121
122
  export {
122
- ie as default
123
+ re as default
123
124
  };
@@ -1,52 +1,52 @@
1
- import { defineComponent as w, watch as i, createElementBlock as v, createCommentVNode as q, unref as e, openBlock as M, normalizeClass as o, createElementVNode as r, createVNode as S, toDisplayString as d } from "vue";
2
- import t from "@tencentcloud/chat";
3
- import { useUIKit as f, IconClose as I } from "@tencentcloud/uikit-base-component-vue3";
4
- import { useMessageActionState as E } from "../../../states/MessageActionState/MessageActionState.js";
5
- import { useMessageInputState as C } from "../../../states/MessageInputState/MessageInputState.js";
6
- import { useConversationListState as T } from "../../../states/ConversationListState/ConversationListState.js";
7
- const z = "_quoted__message__preview_1u7zw_1", P = "_quoted__message__preview__content_1u7zw_15", h = "_quoted__message__preview__close_1u7zw_44", n = {
8
- quoted__message__preview: z,
1
+ import { defineComponent as g, onUnmounted as l, watch as w, createElementBlock as v, createCommentVNode as q, unref as e, openBlock as f, normalizeClass as o, createElementVNode as r, createVNode as M, toDisplayString as i } from "vue";
2
+ import { useUIKit as I, IconClose as z } from "@tencentcloud/uikit-base-component-vue3";
3
+ import { MessageType as t } from "../../../types/engine.js";
4
+ import { useMessageActionState as C } from "../../../states/MessageActionState/MessageActionState.js";
5
+ import { useMessageInputState as h } from "../../../states/MessageInputState/MessageInputState.js";
6
+ import { transformTextWithEmojiKeyToName as E } from "../../../utils/emoji.js";
7
+ const x = "_quoted__message__preview_1u7zw_1", y = "_quoted__message__preview__content_1u7zw_15", T = "_quoted__message__preview__close_1u7zw_44", n = {
8
+ quoted__message__preview: x,
9
9
  "slide-in": "_slide-in_1u7zw_1",
10
- quoted__message__preview__content: P,
10
+ quoted__message__preview__content: y,
11
11
  "quoted__message__preview__content--header": "_quoted__message__preview__content--header_1u7zw_23",
12
12
  "quoted__message__preview__content--title": "_quoted__message__preview__content--title_1u7zw_29",
13
13
  "quoted__message__preview__content--text": "_quoted__message__preview__content--text_1u7zw_34",
14
- quoted__message__preview__close: h
15
- }, N = /* @__PURE__ */ w({
14
+ quoted__message__preview__close: T
15
+ }, V = /* @__PURE__ */ g({
16
16
  __name: "QuotedMessagePreview",
17
- setup(G) {
18
- const { t: _ } = f(), { activeConversation: p } = T(), { focusEditor: m } = C(), { quotedMessage: a, clearQuotedMessage: u } = E();
19
- i(a, (s) => {
20
- s && m();
21
- }), i(p, () => {
22
- u();
17
+ setup(k) {
18
+ const { t: _ } = I(), { focusEditor: d } = h(), { quotedMessage: a, clearQuotedMessage: c } = C();
19
+ l(() => {
20
+ c();
21
+ }), w(a, (s) => {
22
+ s && d();
23
23
  });
24
- const l = () => {
25
- u();
26
- }, g = (s) => {
27
- var c;
24
+ const m = () => {
25
+ c();
26
+ }, p = (s) => {
27
+ var u;
28
28
  if (!s)
29
29
  return "no reference";
30
30
  switch (s.type) {
31
- case t.TYPES.MSG_TEXT:
32
- return (c = s.payload) == null ? void 0 : c.text;
33
- case t.TYPES.MSG_IMAGE:
31
+ case t.TEXT:
32
+ return E(((u = s.payload) == null ? void 0 : u.text) || "");
33
+ case t.IMAGE:
34
34
  return _("MessageInput.image");
35
- case t.TYPES.MSG_AUDIO:
35
+ case t.AUDIO:
36
36
  return _("MessageInput.audio");
37
- case t.TYPES.MSG_VIDEO:
37
+ case t.VIDEO:
38
38
  return _("MessageInput.video");
39
- case t.TYPES.MSG_FILE:
39
+ case t.FILE:
40
40
  return _("MessageInput.file");
41
- case t.TYPES.MSG_LOCATION:
41
+ case t.LOCATION:
42
42
  return _("MessageInput.location");
43
- case t.TYPES.MSG_CUSTOM:
43
+ case t.CUSTOM:
44
44
  return _("MessageInput.custom_message");
45
45
  default:
46
46
  return _("MessageInput.unknown");
47
47
  }
48
48
  };
49
- return (s, c) => e(a) ? (M(), v("div", {
49
+ return (s, u) => e(a) ? (f(), v("div", {
50
50
  key: 0,
51
51
  class: o(e(n).quoted__message__preview)
52
52
  }, [
@@ -58,20 +58,20 @@ const z = "_quoted__message__preview_1u7zw_1", P = "_quoted__message__preview__c
58
58
  }, [
59
59
  r("div", {
60
60
  class: o(e(n)["quoted__message__preview__content--title"])
61
- }, d(e(a).nick || e(a).from), 3)
61
+ }, i(e(a).nick || e(a).from), 3)
62
62
  ], 2),
63
63
  r("div", {
64
64
  class: o(e(n)["quoted__message__preview__content--text"])
65
- }, d(g(e(a))), 3)
65
+ }, i(p(e(a))), 3)
66
66
  ], 2),
67
- S(e(I), {
67
+ M(e(z), {
68
68
  class: o(e(n).quoted__message__preview__close),
69
69
  size: "16",
70
- onClick: l
70
+ onClick: m
71
71
  }, null, 8, ["class"])
72
72
  ], 2)) : q("", !0);
73
73
  }
74
74
  });
75
75
  export {
76
- N as QuotedMessagePreview
76
+ V as QuotedMessagePreview
77
77
  };
@@ -1,18 +1,19 @@
1
- import { Editor } from '@tiptap/vue-3';
2
1
  import { InputContent } from '../../../states/MessageInputState';
2
+ import { JSONContent, Extensions } from '@tiptap/vue-3';
3
3
 
4
- interface EditorOptions {
5
- element: Element;
4
+ interface ExtensionOptions {
6
5
  placeholder?: string;
7
- autoFocus?: boolean;
8
- disabled?: boolean;
9
6
  maxLength?: number;
10
- isPlaceholderOnlyShowWhenEditable?: boolean;
11
- onUpdate?: (content: InputContent[]) => void;
7
+ showPlaceholderOnlyWhenEditable?: boolean;
12
8
  onEnter?: () => void;
13
- onFocus?: () => void;
14
- onBlur?: () => void;
15
9
  }
16
- declare function createEditor({ element, placeholder, autoFocus, disabled, isPlaceholderOnlyShowWhenEditable, maxLength, onUpdate, onEnter, onFocus, onBlur, }: EditorOptions): Editor;
17
- export { createEditor, };
18
- export type { Editor, };
10
+ /**
11
+ * Create all editor extensions with given options
12
+ */
13
+ declare function createExtensions(options?: ExtensionOptions): Extensions;
14
+ /**
15
+ * Convert Tiptap JSON content to business InputContent array
16
+ * Uses simple switch-case for clarity (no over-engineered registry pattern)
17
+ */
18
+ declare function convertEditorContent(node: JSONContent): InputContent[];
19
+ export { createExtensions, convertEditorContent, };