@lobehub/ui 1.136.1 → 1.136.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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- var _excluded = ["avatarAddon", "onAvatarClick", "actions", "className", "primary", "loading", "message", "placement", "type", "avatar", "error", "showTitle", "time", "editing", "onChange", "onEditingChange", "messageExtra", "renderMessage", "text", "errorMessage", "onDoubleClick", "fontSize"];
5
+ var _excluded = ["avatarAddon", "onAvatarClick", "avatarProps", "actions", "className", "primary", "loading", "message", "placement", "type", "avatar", "error", "showTitle", "time", "editing", "onChange", "onEditingChange", "messageExtra", "renderMessage", "text", "errorMessage", "onDoubleClick", "fontSize"];
6
6
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
8
  import { useResponsive } from 'antd-style';
@@ -21,6 +21,7 @@ var MOBILE_AVATAR_SIZE = 32;
21
21
  var ChatItem = /*#__PURE__*/memo(function (_ref) {
22
22
  var avatarAddon = _ref.avatarAddon,
23
23
  onAvatarClick = _ref.onAvatarClick,
24
+ avatarProps = _ref.avatarProps,
24
25
  actions = _ref.actions,
25
26
  className = _ref.className,
26
27
  primary = _ref.primary,
@@ -62,14 +63,14 @@ var ChatItem = /*#__PURE__*/memo(function (_ref) {
62
63
  direction: placement === 'left' ? 'horizontal' : 'horizontal-reverse',
63
64
  gap: mobile ? 6 : 12
64
65
  }, rest), {}, {
65
- children: [/*#__PURE__*/_jsx(Avatar, {
66
+ children: [/*#__PURE__*/_jsx(Avatar, _objectSpread(_objectSpread({}, avatarProps), {}, {
66
67
  addon: avatarAddon,
67
68
  avatar: avatar,
68
69
  loading: loading,
69
70
  onClick: onAvatarClick,
70
71
  placement: placement,
71
72
  size: mobile ? MOBILE_AVATAR_SIZE : undefined
72
- }), /*#__PURE__*/_jsxs(Flexbox, {
73
+ })), /*#__PURE__*/_jsxs(Flexbox, {
73
74
  align: placement === 'left' ? 'flex-start' : 'flex-end',
74
75
  className: styles.messageContainer,
75
76
  children: [/*#__PURE__*/_jsx(Title, {
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { AlertProps } from "../Alert";
3
+ import { AvatarProps } from "../Avatar";
3
4
  import { EditableMessageProps } from "../EditableMessage";
4
5
  import { DivProps, MetaData } from "../types";
5
6
  export interface ChatItemProps {
@@ -12,6 +13,7 @@ export interface ChatItemProps {
12
13
  */
13
14
  avatar: MetaData;
14
15
  avatarAddon?: ReactNode;
16
+ avatarProps?: AvatarProps;
15
17
  /**
16
18
  * @description Custom CSS class name for the chat item
17
19
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.136.1",
3
+ "version": "1.136.2",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",