@arc-lo/ui 0.3.1 → 0.3.3

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/index.cjs CHANGED
@@ -1321,6 +1321,7 @@ Output.displayName = "ToolCall.Output";
1321
1321
  var chat_thread_exports = {};
1322
1322
  __export(chat_thread_exports, {
1323
1323
  AssistantMessage: () => AssistantMessage,
1324
+ Avatar: () => Avatar,
1324
1325
  Message: () => Message,
1325
1326
  Messages: () => Messages,
1326
1327
  Root: () => Root6,
@@ -1500,6 +1501,65 @@ var ScrollAnchor = react.forwardRef(
1500
1501
  }
1501
1502
  );
1502
1503
  ScrollAnchor.displayName = "ChatThread.ScrollAnchor";
1504
+ var Avatar = react.forwardRef(
1505
+ ({
1506
+ src,
1507
+ initials,
1508
+ icon,
1509
+ color,
1510
+ textColor,
1511
+ size = 28,
1512
+ className,
1513
+ style,
1514
+ ...props
1515
+ }, ref) => {
1516
+ const bg = color ?? themeVars.accent;
1517
+ const fg = textColor ?? themeVars.accentFg;
1518
+ if (src) {
1519
+ return /* @__PURE__ */ jsxRuntime.jsx(
1520
+ "div",
1521
+ {
1522
+ ref,
1523
+ className: cn(
1524
+ "arclo-chat-avatar shrink-0 overflow-hidden rounded-full",
1525
+ className
1526
+ ),
1527
+ style: { width: size, height: size, ...style },
1528
+ ...props,
1529
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1530
+ "img",
1531
+ {
1532
+ src,
1533
+ alt: initials ?? "Avatar",
1534
+ className: "h-full w-full object-cover"
1535
+ }
1536
+ )
1537
+ }
1538
+ );
1539
+ }
1540
+ return /* @__PURE__ */ jsxRuntime.jsx(
1541
+ "div",
1542
+ {
1543
+ ref,
1544
+ className: cn(
1545
+ "arclo-chat-avatar shrink-0 flex items-center justify-center rounded-full font-semibold",
1546
+ className
1547
+ ),
1548
+ style: {
1549
+ width: size,
1550
+ height: size,
1551
+ backgroundColor: bg,
1552
+ color: fg,
1553
+ fontSize: size * 0.4,
1554
+ ...style
1555
+ },
1556
+ ...props,
1557
+ children: icon ?? initials ?? "?"
1558
+ }
1559
+ );
1560
+ }
1561
+ );
1562
+ Avatar.displayName = "ChatThread.Avatar";
1503
1563
 
1504
1564
  // src/image-gen/index.ts
1505
1565
  var image_gen_exports = {};