@getsoren/design-system 4.56.2 → 4.57.0

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.
package/dist/main.js CHANGED
@@ -17595,8 +17595,8 @@ var Hn = (e) => e.endsWith("Z") || /[+-]\d{2}:\d{2}$/.test(e) ? e : `${e}Z`, Pb
17595
17595
  py: 1.3
17596
17596
  },
17597
17597
  children: e
17598
- }), Np = ({ isOwn: e, message: t, participants: r, avatarSrcResolver: o, renderAfterBubble: a, formatTime: i }) => {
17599
- const l = (i ?? Db)(t.createdAt), s = Mb(t.body);
17598
+ }), Np = ({ isOwn: e, message: t, participants: r, avatarSrcResolver: o, renderAfterBubble: a, formatTime: i, hideAvatar: l }) => {
17599
+ const s = (i ?? Db)(t.createdAt), u = Mb(t.body);
17600
17600
  if (e) return /* @__PURE__ */ B(Xe, {
17601
17601
  alignItems: "flex-end",
17602
17602
  spacing: 0.5,
@@ -17611,31 +17611,31 @@ var Hn = (e) => e.endsWith("Z") || /[+-]\d{2}:\d{2}$/.test(e) ? e : `${e}Z`, Pb
17611
17611
  children: tu(t.body, e)
17612
17612
  })
17613
17613
  }),
17614
- a?.(s),
17614
+ a?.(u),
17615
17615
  /* @__PURE__ */ d(Ye, {
17616
17616
  variant: "caption",
17617
17617
  color: "text.secondary",
17618
- children: l
17618
+ children: s
17619
17619
  })
17620
17620
  ]
17621
17621
  });
17622
- const u = r?.find((c) => c.userId === t.authorId);
17622
+ const c = r?.find((p) => p.userId === t.authorId);
17623
17623
  return /* @__PURE__ */ B(Xe, {
17624
17624
  direction: "row",
17625
17625
  spacing: 1.5,
17626
17626
  alignItems: "flex-start",
17627
- children: [/* @__PURE__ */ d(Lo, {
17628
- src: o?.(u?.avatar),
17627
+ children: [!l && /* @__PURE__ */ d(Lo, {
17628
+ src: o?.(c?.avatar),
17629
17629
  sx: {
17630
- backgroundColor: ({ palette: c }) => c.mode === "dark" ? "grey.500" : "grey.100",
17630
+ backgroundColor: ({ palette: p }) => p.mode === "dark" ? "grey.500" : "grey.100",
17631
17631
  fontSize: 12,
17632
17632
  height: 28,
17633
17633
  mt: 0.5,
17634
17634
  width: 28
17635
17635
  },
17636
- children: ja(u ? {
17637
- firstName: u.firstName,
17638
- lastName: u.lastName
17636
+ children: ja(c ? {
17637
+ firstName: c.firstName,
17638
+ lastName: c.lastName
17639
17639
  } : { fullName: String(t.authorId).slice(0, 2) }, !0)
17640
17640
  }), /* @__PURE__ */ B(Xe, {
17641
17641
  spacing: 0.5,
@@ -17646,11 +17646,11 @@ var Hn = (e) => e.endsWith("Z") || /[+-]\d{2}:\d{2}$/.test(e) ? e : `${e}Z`, Pb
17646
17646
  sx: { whiteSpace: "pre-wrap" },
17647
17647
  children: tu(t.body, e)
17648
17648
  }) }),
17649
- a?.(s),
17649
+ a?.(u),
17650
17650
  /* @__PURE__ */ d(Ye, {
17651
17651
  variant: "caption",
17652
17652
  color: "text.secondary",
17653
- children: l
17653
+ children: s
17654
17654
  })
17655
17655
  ]
17656
17656
  })]
@@ -17755,7 +17755,7 @@ var Hn = (e) => e.endsWith("Z") || /[+-]\d{2}:\d{2}$/.test(e) ? e : `${e}Z`, Pb
17755
17755
  })]
17756
17756
  })]
17757
17757
  }),
17758
- /* @__PURE__ */ d(Ye, {
17758
+ t?.enterToSend !== "" && /* @__PURE__ */ d(Ye, {
17759
17759
  variant: "caption",
17760
17760
  color: "text.secondary",
17761
17761
  display: "block",
@@ -1,3 +1,3 @@
1
1
  import { ChatMessageBubbleProps } from '../types';
2
- declare const ChatMessageBubble: ({ isOwn, message, participants, avatarSrcResolver, renderAfterBubble, formatTime }: ChatMessageBubbleProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ declare const ChatMessageBubble: ({ isOwn, message, participants, avatarSrcResolver, renderAfterBubble, formatTime, hideAvatar, }: ChatMessageBubbleProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
3
  export default ChatMessageBubble;
@@ -100,6 +100,8 @@ export interface ChatMessageBubbleProps {
100
100
  avatarSrcResolver?: (src?: string | null) => string | undefined;
101
101
  renderAfterBubble?: (urls: string[]) => ReactNode;
102
102
  formatTime?: (date: string) => string;
103
+ /** Hide the author avatar on received messages (e.g. single-author AI assistant chat) */
104
+ hideAvatar?: boolean;
103
105
  }
104
106
  export interface ChatMessageInputProps {
105
107
  onSend: (message: string) => void;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@getsoren/design-system",
3
3
  "description": "Design System React library",
4
4
  "sideEffects": false,
5
- "version": "4.56.2",
5
+ "version": "4.57.0",
6
6
  "license": "ISC",
7
7
  "type": "module",
8
8
  "types": "./dist/src/main.d.ts",