@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 +60 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +60 -0
- package/dist/index.js.map +1 -1
- package/package.json +22 -3
package/dist/index.d.cts
CHANGED
|
@@ -318,9 +318,26 @@ declare const SystemMessage: react.ForwardRefExoticComponent<ChatThreadSystemMes
|
|
|
318
318
|
interface ChatThreadScrollAnchorProps extends HTMLAttributes<HTMLDivElement> {
|
|
319
319
|
}
|
|
320
320
|
declare const ScrollAnchor: react.ForwardRefExoticComponent<ChatThreadScrollAnchorProps & react.RefAttributes<HTMLDivElement>>;
|
|
321
|
+
interface ChatThreadAvatarProps extends HTMLAttributes<HTMLDivElement> {
|
|
322
|
+
/** Image URL for the avatar */
|
|
323
|
+
src?: string;
|
|
324
|
+
/** Initials to display when no src is provided */
|
|
325
|
+
initials?: string;
|
|
326
|
+
/** Custom icon element */
|
|
327
|
+
icon?: ReactNode;
|
|
328
|
+
/** Background color. Default: accent for assistant, surface-secondary for user */
|
|
329
|
+
color?: string;
|
|
330
|
+
/** Text/icon color. Default: auto based on background */
|
|
331
|
+
textColor?: string;
|
|
332
|
+
/** Size in px. Default: 28 */
|
|
333
|
+
size?: number;
|
|
334
|
+
}
|
|
335
|
+
declare const Avatar: react.ForwardRefExoticComponent<ChatThreadAvatarProps & react.RefAttributes<HTMLDivElement>>;
|
|
321
336
|
|
|
322
337
|
declare const index$2_AssistantMessage: typeof AssistantMessage;
|
|
338
|
+
declare const index$2_Avatar: typeof Avatar;
|
|
323
339
|
type index$2_ChatThreadAssistantMessageProps = ChatThreadAssistantMessageProps;
|
|
340
|
+
type index$2_ChatThreadAvatarProps = ChatThreadAvatarProps;
|
|
324
341
|
type index$2_ChatThreadMessageProps = ChatThreadMessageProps;
|
|
325
342
|
type index$2_ChatThreadMessagesProps = ChatThreadMessagesProps;
|
|
326
343
|
type index$2_ChatThreadRootProps = ChatThreadRootProps;
|
|
@@ -334,7 +351,7 @@ declare const index$2_ScrollAnchor: typeof ScrollAnchor;
|
|
|
334
351
|
declare const index$2_SystemMessage: typeof SystemMessage;
|
|
335
352
|
declare const index$2_UserMessage: typeof UserMessage;
|
|
336
353
|
declare namespace index$2 {
|
|
337
|
-
export { index$2_AssistantMessage as AssistantMessage, type index$2_ChatThreadAssistantMessageProps as ChatThreadAssistantMessageProps, type index$2_ChatThreadMessageProps as ChatThreadMessageProps, type index$2_ChatThreadMessagesProps as ChatThreadMessagesProps, type index$2_ChatThreadRootProps as ChatThreadRootProps, type index$2_ChatThreadScrollAnchorProps as ChatThreadScrollAnchorProps, type index$2_ChatThreadSystemMessageProps as ChatThreadSystemMessageProps, type index$2_ChatThreadUserMessageProps as ChatThreadUserMessageProps, index$2_Message as Message, type index$2_MessageRole as MessageRole, index$2_Messages as Messages, Root$2 as Root, index$2_ScrollAnchor as ScrollAnchor, index$2_SystemMessage as SystemMessage, index$2_UserMessage as UserMessage };
|
|
354
|
+
export { index$2_AssistantMessage as AssistantMessage, index$2_Avatar as Avatar, type index$2_ChatThreadAssistantMessageProps as ChatThreadAssistantMessageProps, type index$2_ChatThreadAvatarProps as ChatThreadAvatarProps, type index$2_ChatThreadMessageProps as ChatThreadMessageProps, type index$2_ChatThreadMessagesProps as ChatThreadMessagesProps, type index$2_ChatThreadRootProps as ChatThreadRootProps, type index$2_ChatThreadScrollAnchorProps as ChatThreadScrollAnchorProps, type index$2_ChatThreadSystemMessageProps as ChatThreadSystemMessageProps, type index$2_ChatThreadUserMessageProps as ChatThreadUserMessageProps, index$2_Message as Message, type index$2_MessageRole as MessageRole, index$2_Messages as Messages, Root$2 as Root, index$2_ScrollAnchor as ScrollAnchor, index$2_SystemMessage as SystemMessage, index$2_UserMessage as UserMessage };
|
|
338
355
|
}
|
|
339
356
|
|
|
340
357
|
interface ImageGenRootProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
package/dist/index.d.ts
CHANGED
|
@@ -318,9 +318,26 @@ declare const SystemMessage: react.ForwardRefExoticComponent<ChatThreadSystemMes
|
|
|
318
318
|
interface ChatThreadScrollAnchorProps extends HTMLAttributes<HTMLDivElement> {
|
|
319
319
|
}
|
|
320
320
|
declare const ScrollAnchor: react.ForwardRefExoticComponent<ChatThreadScrollAnchorProps & react.RefAttributes<HTMLDivElement>>;
|
|
321
|
+
interface ChatThreadAvatarProps extends HTMLAttributes<HTMLDivElement> {
|
|
322
|
+
/** Image URL for the avatar */
|
|
323
|
+
src?: string;
|
|
324
|
+
/** Initials to display when no src is provided */
|
|
325
|
+
initials?: string;
|
|
326
|
+
/** Custom icon element */
|
|
327
|
+
icon?: ReactNode;
|
|
328
|
+
/** Background color. Default: accent for assistant, surface-secondary for user */
|
|
329
|
+
color?: string;
|
|
330
|
+
/** Text/icon color. Default: auto based on background */
|
|
331
|
+
textColor?: string;
|
|
332
|
+
/** Size in px. Default: 28 */
|
|
333
|
+
size?: number;
|
|
334
|
+
}
|
|
335
|
+
declare const Avatar: react.ForwardRefExoticComponent<ChatThreadAvatarProps & react.RefAttributes<HTMLDivElement>>;
|
|
321
336
|
|
|
322
337
|
declare const index$2_AssistantMessage: typeof AssistantMessage;
|
|
338
|
+
declare const index$2_Avatar: typeof Avatar;
|
|
323
339
|
type index$2_ChatThreadAssistantMessageProps = ChatThreadAssistantMessageProps;
|
|
340
|
+
type index$2_ChatThreadAvatarProps = ChatThreadAvatarProps;
|
|
324
341
|
type index$2_ChatThreadMessageProps = ChatThreadMessageProps;
|
|
325
342
|
type index$2_ChatThreadMessagesProps = ChatThreadMessagesProps;
|
|
326
343
|
type index$2_ChatThreadRootProps = ChatThreadRootProps;
|
|
@@ -334,7 +351,7 @@ declare const index$2_ScrollAnchor: typeof ScrollAnchor;
|
|
|
334
351
|
declare const index$2_SystemMessage: typeof SystemMessage;
|
|
335
352
|
declare const index$2_UserMessage: typeof UserMessage;
|
|
336
353
|
declare namespace index$2 {
|
|
337
|
-
export { index$2_AssistantMessage as AssistantMessage, type index$2_ChatThreadAssistantMessageProps as ChatThreadAssistantMessageProps, type index$2_ChatThreadMessageProps as ChatThreadMessageProps, type index$2_ChatThreadMessagesProps as ChatThreadMessagesProps, type index$2_ChatThreadRootProps as ChatThreadRootProps, type index$2_ChatThreadScrollAnchorProps as ChatThreadScrollAnchorProps, type index$2_ChatThreadSystemMessageProps as ChatThreadSystemMessageProps, type index$2_ChatThreadUserMessageProps as ChatThreadUserMessageProps, index$2_Message as Message, type index$2_MessageRole as MessageRole, index$2_Messages as Messages, Root$2 as Root, index$2_ScrollAnchor as ScrollAnchor, index$2_SystemMessage as SystemMessage, index$2_UserMessage as UserMessage };
|
|
354
|
+
export { index$2_AssistantMessage as AssistantMessage, index$2_Avatar as Avatar, type index$2_ChatThreadAssistantMessageProps as ChatThreadAssistantMessageProps, type index$2_ChatThreadAvatarProps as ChatThreadAvatarProps, type index$2_ChatThreadMessageProps as ChatThreadMessageProps, type index$2_ChatThreadMessagesProps as ChatThreadMessagesProps, type index$2_ChatThreadRootProps as ChatThreadRootProps, type index$2_ChatThreadScrollAnchorProps as ChatThreadScrollAnchorProps, type index$2_ChatThreadSystemMessageProps as ChatThreadSystemMessageProps, type index$2_ChatThreadUserMessageProps as ChatThreadUserMessageProps, index$2_Message as Message, type index$2_MessageRole as MessageRole, index$2_Messages as Messages, Root$2 as Root, index$2_ScrollAnchor as ScrollAnchor, index$2_SystemMessage as SystemMessage, index$2_UserMessage as UserMessage };
|
|
338
355
|
}
|
|
339
356
|
|
|
340
357
|
interface ImageGenRootProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
package/dist/index.js
CHANGED
|
@@ -1319,6 +1319,7 @@ Output.displayName = "ToolCall.Output";
|
|
|
1319
1319
|
var chat_thread_exports = {};
|
|
1320
1320
|
__export(chat_thread_exports, {
|
|
1321
1321
|
AssistantMessage: () => AssistantMessage,
|
|
1322
|
+
Avatar: () => Avatar,
|
|
1322
1323
|
Message: () => Message,
|
|
1323
1324
|
Messages: () => Messages,
|
|
1324
1325
|
Root: () => Root6,
|
|
@@ -1498,6 +1499,65 @@ var ScrollAnchor = forwardRef(
|
|
|
1498
1499
|
}
|
|
1499
1500
|
);
|
|
1500
1501
|
ScrollAnchor.displayName = "ChatThread.ScrollAnchor";
|
|
1502
|
+
var Avatar = forwardRef(
|
|
1503
|
+
({
|
|
1504
|
+
src,
|
|
1505
|
+
initials,
|
|
1506
|
+
icon,
|
|
1507
|
+
color,
|
|
1508
|
+
textColor,
|
|
1509
|
+
size = 28,
|
|
1510
|
+
className,
|
|
1511
|
+
style,
|
|
1512
|
+
...props
|
|
1513
|
+
}, ref) => {
|
|
1514
|
+
const bg = color ?? themeVars.accent;
|
|
1515
|
+
const fg = textColor ?? themeVars.accentFg;
|
|
1516
|
+
if (src) {
|
|
1517
|
+
return /* @__PURE__ */ jsx(
|
|
1518
|
+
"div",
|
|
1519
|
+
{
|
|
1520
|
+
ref,
|
|
1521
|
+
className: cn(
|
|
1522
|
+
"arclo-chat-avatar shrink-0 overflow-hidden rounded-full",
|
|
1523
|
+
className
|
|
1524
|
+
),
|
|
1525
|
+
style: { width: size, height: size, ...style },
|
|
1526
|
+
...props,
|
|
1527
|
+
children: /* @__PURE__ */ jsx(
|
|
1528
|
+
"img",
|
|
1529
|
+
{
|
|
1530
|
+
src,
|
|
1531
|
+
alt: initials ?? "Avatar",
|
|
1532
|
+
className: "h-full w-full object-cover"
|
|
1533
|
+
}
|
|
1534
|
+
)
|
|
1535
|
+
}
|
|
1536
|
+
);
|
|
1537
|
+
}
|
|
1538
|
+
return /* @__PURE__ */ jsx(
|
|
1539
|
+
"div",
|
|
1540
|
+
{
|
|
1541
|
+
ref,
|
|
1542
|
+
className: cn(
|
|
1543
|
+
"arclo-chat-avatar shrink-0 flex items-center justify-center rounded-full font-semibold",
|
|
1544
|
+
className
|
|
1545
|
+
),
|
|
1546
|
+
style: {
|
|
1547
|
+
width: size,
|
|
1548
|
+
height: size,
|
|
1549
|
+
backgroundColor: bg,
|
|
1550
|
+
color: fg,
|
|
1551
|
+
fontSize: size * 0.4,
|
|
1552
|
+
...style
|
|
1553
|
+
},
|
|
1554
|
+
...props,
|
|
1555
|
+
children: icon ?? initials ?? "?"
|
|
1556
|
+
}
|
|
1557
|
+
);
|
|
1558
|
+
}
|
|
1559
|
+
);
|
|
1560
|
+
Avatar.displayName = "ChatThread.Avatar";
|
|
1501
1561
|
|
|
1502
1562
|
// src/image-gen/index.ts
|
|
1503
1563
|
var image_gen_exports = {};
|