whyuzeim 1.1.47 → 1.1.49

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.
@@ -44,9 +44,9 @@ var CodeMsg = function CodeMsg(props) {
44
44
  padding: "10px 12px",
45
45
  color: "var(--im-msg-bubble-font-color)"
46
46
  },
47
- className: "inline-block"
47
+ className: "inline-block w-full"
48
48
  }, /*#__PURE__*/React.createElement("div", {
49
- className: "p-4 flex justify-between items-center flex-shrink-0"
49
+ className: "flex-1 flex justify-between items-center"
50
50
  }, /*#__PURE__*/React.createElement("div", {
51
51
  className: "flex items-center gap-1 text-white text-[10px] font-normal"
52
52
  }, /*#__PURE__*/React.createElement("svg", {
@@ -61,14 +61,14 @@ var CodeMsg = function CodeMsg(props) {
61
61
  d: "M8 0.0214844H2.58333V2.5396H0.0214844V8.01198H2.58333V10.5301H8V8.01198H10.5618V2.5396H8V0.0214844Z",
62
62
  fill: "#0083FF"
63
63
  })), /*#__PURE__*/React.createElement("span", {
64
- className: "text-[#000]"
64
+ className: "text-[#fff]"
65
65
  }, "main.py")), /*#__PURE__*/React.createElement("button", {
66
66
  onClick: function onClick() {
67
67
  onApply && onApply(msg.customExts.code);
68
68
  },
69
69
  className: "flex items-center h-6 px-2 py-1 bg-white rounded text-black/90 text-[10px] font-normal"
70
70
  }, "Apply")), /*#__PURE__*/React.createElement("div", {
71
- className: "flex-1 px-4 pt-2 pb-4 gap-2 flex flex-col justify-between h-full overflow-hidden"
71
+ className: "flex-1 gap-2 flex flex-col justify-between h-full overflow-hidden"
72
72
  }, /*#__PURE__*/React.createElement("div", {
73
73
  className: "code-scroll-container w-full max-h-[300px] overflow-y-auto"
74
74
  }, /*#__PURE__*/React.createElement("pre", {
@@ -71,8 +71,8 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
71
71
  isAgent = _useState8[0],
72
72
  setIsAgent = _useState8[1];
73
73
  var renderTxtMsg = function renderTxtMsg(msg) {
74
- var _userInfo$uid;
75
- var isMySelf = (msg === null || msg === void 0 ? void 0 : msg.bySelf) === true || (msg === null || msg === void 0 ? void 0 : msg.from.toLowerCase()) === ((_userInfo$uid = userInfo.uid) === null || _userInfo$uid === void 0 ? void 0 : _userInfo$uid.toLowerCase());
74
+ var _msg$from, _userInfo$uid;
75
+ var isMySelf = (msg === null || msg === void 0 ? void 0 : msg.bySelf) === true || (msg === null || msg === void 0 || (_msg$from = msg.from) === null || _msg$from === void 0 ? void 0 : _msg$from.toLowerCase()) === ((_userInfo$uid = userInfo.uid) === null || _userInfo$uid === void 0 ? void 0 : _userInfo$uid.toLowerCase());
76
76
  return /*#__PURE__*/React.createElement(agoraChatUikit.BaseMessage, {
77
77
  bubbleType: "none",
78
78
  reaction: false,
@@ -98,7 +98,7 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
98
98
  });
99
99
  };
100
100
  var renderLongTextMsg = function renderLongTextMsg(msg) {
101
- var _userInfo$uid2;
101
+ var _msg$from2, _userInfo$uid2;
102
102
  // 格式化消息时间
103
103
  var formatMessageTime = function formatMessageTime(timestamp) {
104
104
  if (!timestamp) return "";
@@ -124,7 +124,7 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
124
124
  });
125
125
  }
126
126
  };
127
- var isMySelf = (msg === null || msg === void 0 ? void 0 : msg.bySelf) === true || (msg === null || msg === void 0 ? void 0 : msg.from.toLowerCase()) === ((_userInfo$uid2 = userInfo.uid) === null || _userInfo$uid2 === void 0 ? void 0 : _userInfo$uid2.toLowerCase());
127
+ var isMySelf = (msg === null || msg === void 0 ? void 0 : msg.bySelf) === true || (msg === null || msg === void 0 || (_msg$from2 = msg.from) === null || _msg$from2 === void 0 ? void 0 : _msg$from2.toLowerCase()) === ((_userInfo$uid2 = userInfo.uid) === null || _userInfo$uid2 === void 0 ? void 0 : _userInfo$uid2.toLowerCase());
128
128
  return /*#__PURE__*/React.createElement("div", {
129
129
  className: "text-[var(--im-main-fontColor)] flex flex-col gap-1 ".concat(isMySelf ? "items-end" : "items-start")
130
130
  }, /*#__PURE__*/React.createElement("div", {
@@ -142,8 +142,8 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
142
142
  }, formatMessageTime(msg.time)));
143
143
  };
144
144
  var _renderMessage = function renderMessage(msg) {
145
- var _userInfo$uid3;
146
- var isMySelf = (msg === null || msg === void 0 ? void 0 : msg.bySelf) === true || (msg === null || msg === void 0 ? void 0 : msg.from.toLowerCase()) === ((_userInfo$uid3 = userInfo.uid) === null || _userInfo$uid3 === void 0 ? void 0 : _userInfo$uid3.toLowerCase());
145
+ var _msg$from3, _userInfo$uid3;
146
+ var isMySelf = (msg === null || msg === void 0 ? void 0 : msg.bySelf) === true || (msg === null || msg === void 0 || (_msg$from3 = msg.from) === null || _msg$from3 === void 0 ? void 0 : _msg$from3.toLowerCase()) === ((_userInfo$uid3 = userInfo.uid) === null || _userInfo$uid3 === void 0 ? void 0 : _userInfo$uid3.toLowerCase());
147
147
  if (msg.type === "txt") {
148
148
  return renderTxtMsg(msg);
149
149
  } else if (msg.type === "img") {
@@ -204,7 +204,7 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
204
204
  isMySelf: isMySelf,
205
205
  avatar: !isMySelf ? /*#__PURE__*/React.createElement("img", {
206
206
  src: headerInfo.headerImageURL || avatar_default,
207
- className: "w-[48px] h-[48px] rounded-full overflow-hidden object-fit"
207
+ className: "shrink-0 w-[48px] h-[48px] rounded-full overflow-hidden object-fit"
208
208
  }) : undefined
209
209
  });
210
210
  } else if (msg.type === "custom" && (msg === null || msg === void 0 ? void 0 : msg.customEvent) === "custom_coding") {
@@ -214,7 +214,7 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
214
214
  isMySelf: isMySelf,
215
215
  avatar: !isMySelf ? /*#__PURE__*/React.createElement("img", {
216
216
  src: headerInfo.headerImageURL || avatar_default,
217
- className: "w-[48px] h-[48px] rounded-full overflow-hidden object-fit"
217
+ className: "shrink-0 w-[48px] h-[48px] rounded-full overflow-hidden object-fit"
218
218
  }) : undefined
219
219
  });
220
220
  } else if (msg.type === "custom" && (msg === null || msg === void 0 ? void 0 : msg.customEvent) === "custom_qa_guidance") {
@@ -226,7 +226,7 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
226
226
  isMySelf: isMySelf,
227
227
  avatar: !isMySelf ? /*#__PURE__*/React.createElement("img", {
228
228
  src: headerInfo.headerImageURL || avatar_default,
229
- className: "w-[48px] h-[48px] rounded-full overflow-hidden object-fit"
229
+ className: "shrink-0 w-[48px] h-[48px] rounded-full overflow-hidden object-fit"
230
230
  }) : undefined
231
231
  });
232
232
  } else {
@@ -42,9 +42,9 @@ var CodeMsg = function CodeMsg(props) {
42
42
  padding: "10px 12px",
43
43
  color: "var(--im-msg-bubble-font-color)"
44
44
  },
45
- className: "inline-block"
45
+ className: "inline-block w-full"
46
46
  }, /*#__PURE__*/React.createElement("div", {
47
- className: "p-4 flex justify-between items-center flex-shrink-0"
47
+ className: "flex-1 flex justify-between items-center"
48
48
  }, /*#__PURE__*/React.createElement("div", {
49
49
  className: "flex items-center gap-1 text-white text-[10px] font-normal"
50
50
  }, /*#__PURE__*/React.createElement("svg", {
@@ -59,14 +59,14 @@ var CodeMsg = function CodeMsg(props) {
59
59
  d: "M8 0.0214844H2.58333V2.5396H0.0214844V8.01198H2.58333V10.5301H8V8.01198H10.5618V2.5396H8V0.0214844Z",
60
60
  fill: "#0083FF"
61
61
  })), /*#__PURE__*/React.createElement("span", {
62
- className: "text-[#000]"
62
+ className: "text-[#fff]"
63
63
  }, "main.py")), /*#__PURE__*/React.createElement("button", {
64
64
  onClick: function onClick() {
65
65
  onApply && onApply(msg.customExts.code);
66
66
  },
67
67
  className: "flex items-center h-6 px-2 py-1 bg-white rounded text-black/90 text-[10px] font-normal"
68
68
  }, "Apply")), /*#__PURE__*/React.createElement("div", {
69
- className: "flex-1 px-4 pt-2 pb-4 gap-2 flex flex-col justify-between h-full overflow-hidden"
69
+ className: "flex-1 gap-2 flex flex-col justify-between h-full overflow-hidden"
70
70
  }, /*#__PURE__*/React.createElement("div", {
71
71
  className: "code-scroll-container w-full max-h-[300px] overflow-y-auto"
72
72
  }, /*#__PURE__*/React.createElement("pre", {
@@ -69,8 +69,8 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
69
69
  isAgent = _useState8[0],
70
70
  setIsAgent = _useState8[1];
71
71
  var renderTxtMsg = function renderTxtMsg(msg) {
72
- var _userInfo$uid;
73
- var isMySelf = (msg === null || msg === void 0 ? void 0 : msg.bySelf) === true || (msg === null || msg === void 0 ? void 0 : msg.from.toLowerCase()) === ((_userInfo$uid = userInfo.uid) === null || _userInfo$uid === void 0 ? void 0 : _userInfo$uid.toLowerCase());
72
+ var _msg$from, _userInfo$uid;
73
+ var isMySelf = (msg === null || msg === void 0 ? void 0 : msg.bySelf) === true || (msg === null || msg === void 0 || (_msg$from = msg.from) === null || _msg$from === void 0 ? void 0 : _msg$from.toLowerCase()) === ((_userInfo$uid = userInfo.uid) === null || _userInfo$uid === void 0 ? void 0 : _userInfo$uid.toLowerCase());
74
74
  return /*#__PURE__*/React.createElement(BaseMessage, {
75
75
  bubbleType: "none",
76
76
  reaction: false,
@@ -96,7 +96,7 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
96
96
  });
97
97
  };
98
98
  var renderLongTextMsg = function renderLongTextMsg(msg) {
99
- var _userInfo$uid2;
99
+ var _msg$from2, _userInfo$uid2;
100
100
  // 格式化消息时间
101
101
  var formatMessageTime = function formatMessageTime(timestamp) {
102
102
  if (!timestamp) return "";
@@ -122,7 +122,7 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
122
122
  });
123
123
  }
124
124
  };
125
- var isMySelf = (msg === null || msg === void 0 ? void 0 : msg.bySelf) === true || (msg === null || msg === void 0 ? void 0 : msg.from.toLowerCase()) === ((_userInfo$uid2 = userInfo.uid) === null || _userInfo$uid2 === void 0 ? void 0 : _userInfo$uid2.toLowerCase());
125
+ var isMySelf = (msg === null || msg === void 0 ? void 0 : msg.bySelf) === true || (msg === null || msg === void 0 || (_msg$from2 = msg.from) === null || _msg$from2 === void 0 ? void 0 : _msg$from2.toLowerCase()) === ((_userInfo$uid2 = userInfo.uid) === null || _userInfo$uid2 === void 0 ? void 0 : _userInfo$uid2.toLowerCase());
126
126
  return /*#__PURE__*/React.createElement("div", {
127
127
  className: "text-[var(--im-main-fontColor)] flex flex-col gap-1 ".concat(isMySelf ? "items-end" : "items-start")
128
128
  }, /*#__PURE__*/React.createElement("div", {
@@ -140,8 +140,8 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
140
140
  }, formatMessageTime(msg.time)));
141
141
  };
142
142
  var _renderMessage = function renderMessage(msg) {
143
- var _userInfo$uid3;
144
- var isMySelf = (msg === null || msg === void 0 ? void 0 : msg.bySelf) === true || (msg === null || msg === void 0 ? void 0 : msg.from.toLowerCase()) === ((_userInfo$uid3 = userInfo.uid) === null || _userInfo$uid3 === void 0 ? void 0 : _userInfo$uid3.toLowerCase());
143
+ var _msg$from3, _userInfo$uid3;
144
+ var isMySelf = (msg === null || msg === void 0 ? void 0 : msg.bySelf) === true || (msg === null || msg === void 0 || (_msg$from3 = msg.from) === null || _msg$from3 === void 0 ? void 0 : _msg$from3.toLowerCase()) === ((_userInfo$uid3 = userInfo.uid) === null || _userInfo$uid3 === void 0 ? void 0 : _userInfo$uid3.toLowerCase());
145
145
  if (msg.type === "txt") {
146
146
  return renderTxtMsg(msg);
147
147
  } else if (msg.type === "img") {
@@ -202,7 +202,7 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
202
202
  isMySelf: isMySelf,
203
203
  avatar: !isMySelf ? /*#__PURE__*/React.createElement("img", {
204
204
  src: headerInfo.headerImageURL || img,
205
- className: "w-[48px] h-[48px] rounded-full overflow-hidden object-fit"
205
+ className: "shrink-0 w-[48px] h-[48px] rounded-full overflow-hidden object-fit"
206
206
  }) : undefined
207
207
  });
208
208
  } else if (msg.type === "custom" && (msg === null || msg === void 0 ? void 0 : msg.customEvent) === "custom_coding") {
@@ -212,7 +212,7 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
212
212
  isMySelf: isMySelf,
213
213
  avatar: !isMySelf ? /*#__PURE__*/React.createElement("img", {
214
214
  src: headerInfo.headerImageURL || img,
215
- className: "w-[48px] h-[48px] rounded-full overflow-hidden object-fit"
215
+ className: "shrink-0 w-[48px] h-[48px] rounded-full overflow-hidden object-fit"
216
216
  }) : undefined
217
217
  });
218
218
  } else if (msg.type === "custom" && (msg === null || msg === void 0 ? void 0 : msg.customEvent) === "custom_qa_guidance") {
@@ -224,7 +224,7 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
224
224
  isMySelf: isMySelf,
225
225
  avatar: !isMySelf ? /*#__PURE__*/React.createElement("img", {
226
226
  src: headerInfo.headerImageURL || img,
227
- className: "w-[48px] h-[48px] rounded-full overflow-hidden object-fit"
227
+ className: "shrink-0 w-[48px] h-[48px] rounded-full overflow-hidden object-fit"
228
228
  }) : undefined
229
229
  });
230
230
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whyuzeim",
3
- "version": "1.1.47",
3
+ "version": "1.1.49",
4
4
  "description": "im componenets",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",