@arbidocs/react 0.3.149 → 0.3.151

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.d.cts CHANGED
@@ -1707,6 +1707,13 @@ interface UserEntityProps {
1707
1707
  isAgent?: boolean;
1708
1708
  /** Inline border/text colour for agent avatars (from the app's agentAvatarColors). */
1709
1709
  agentStyle?: React__default.CSSProperties;
1710
+ /**
1711
+ * Inline avatar colours for ANY user, not only agents — e.g. the deterministic
1712
+ * tint the DM rows derive from the user id. Takes precedence over
1713
+ * `agentStyle`, which predates it and is the same mechanism under a narrower
1714
+ * name.
1715
+ */
1716
+ avatarStyle?: React__default.CSSProperties;
1710
1717
  /** Whether this pill represents the current user — hides the chat icon and drives
1711
1718
  * which action `onClick` performs. */
1712
1719
  isMe?: boolean;
@@ -1721,6 +1728,32 @@ interface UserEntityProps {
1721
1728
  }
1722
1729
  declare const UserEntity: React__default.NamedExoticComponent<UserEntityProps>;
1723
1730
 
1731
+ /**
1732
+ * "AGENT" stamp for an `agt-` peer.
1733
+ *
1734
+ * `UserEntity` already marks agents with a dashed ring and a bot icon, but that
1735
+ * is a detail you have to know to read. An agent is a different KIND of
1736
+ * correspondent — it acts on someone's behalf, and what you send it may be
1737
+ * acted on rather than read — so it also gets a label you cannot miss.
1738
+ */
1739
+ declare function AgentBadge({ className }: {
1740
+ className?: string;
1741
+ }): React$1.JSX.Element;
1742
+ /**
1743
+ * Presence in words rather than a coloured dot alone.
1744
+ *
1745
+ * `status` is *resolved* by the app, exactly as {@link UserEntity} expects it,
1746
+ * and `undefined` renders nothing at all. That default matters: a consumer that
1747
+ * has not wired a WebSocket provider has no presence information, and labelling
1748
+ * every one of its contacts "Offline" would be stating something we do not
1749
+ * know. Whether absence of a signal means offline is a claim only the app can
1750
+ * make, so the app makes it by resolving to `disconnected`.
1751
+ */
1752
+ declare function PresenceLabel({ status, className, }: {
1753
+ status?: PresenceDisplayStatus;
1754
+ className?: string;
1755
+ }): React$1.JSX.Element | null;
1756
+
1724
1757
  /** A status variant is an opaque string — its valid values are defined by the
1725
1758
  * injected Badge (or the default Badge's variants). */
1726
1759
  type StatusVariant = string;
@@ -2326,6 +2359,12 @@ interface DmConversation {
2326
2359
  leading?: React.ReactNode;
2327
2360
  /** Controls pinned to the row's end, for rows that aren't openable. */
2328
2361
  trailing?: React.ReactNode;
2362
+ /**
2363
+ * Rendered immediately after the name — for marking what KIND of correspondent
2364
+ * this is when that changes how you should read the thread. The kit has no
2365
+ * notion of those kinds; the caller supplies the mark.
2366
+ */
2367
+ badge?: React.ReactNode;
2329
2368
  /**
2330
2369
  * Groups the row under a heading. The heading renders once, above the first
2331
2370
  * row that carries it, so a list can hold more than one kind of thing without
@@ -2423,8 +2462,10 @@ declare function DmComposer({ placeholder, disabled, busy, onSend, error, childr
2423
2462
  interface DmAvatarProps {
2424
2463
  user: DmUser;
2425
2464
  className?: string;
2465
+ /** Defaults to the 40px row avatar this component has always drawn. */
2466
+ size?: 'xs' | 'sm' | 'md' | 'lg';
2426
2467
  }
2427
- declare function DmAvatar({ user, className }: DmAvatarProps): React$1.JSX.Element;
2468
+ declare function DmAvatar({ user, className, size }: DmAvatarProps): React$1.JSX.Element;
2428
2469
 
2429
2470
  /**
2430
2471
  * useDirectMessages — the data layer for the DM block kit.
@@ -2883,4 +2924,4 @@ interface ArbiUiState {
2883
2924
  }
2884
2925
  declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState>>;
2885
2926
 
2886
- export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, type AiRunOptions, type AiTaskStatus, type AppNotification, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, type ArbiChatLabels, ArbiChatPanel, type ArbiChatPanelProps, type ArbiChatProps, type ArbiChatTheme, ArbiIcon, ArbiProvider, type ArbiProviderProps, type ArbiUiState, ArbiWebSocketProvider, type ArbiWebSocketProviderProps, type ArbiWsState, type ArbiWsStatus, ArtifactCanvas, type AspectOption, AudIcon, BASE_COLORS, ChatBubble, type ChatBubbleProps, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, CommandPalette, type CommandPaletteClassNames, type CommandPaletteProps, CommandPaletteProvider, type CommandPaletteProviderProps, type CommandPaletteValue, ConversationList, type ConversationListProps, type CropArea, type CropOutput, type CropResult, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, DateSeparator, type DateSeparatorProps, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmNotification, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentCard, DocumentCardMenu, type DocumentCardMenuProps, type DocumentCardProps, DocumentEntity, type DocumentEntityProps, DocumentGallery, type DocumentGalleryProps, type DocumentLike, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, ENTITY_MAPPINGS, EmlIcon, EntityIcon, type EntityIconComponent, EntityPill, type EntityRegistryOverride, type EntityType, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HtmlIcon, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, LinkedInIcon, type MessageArtifact, MessageArtifactCard, MessageBubble, type MessageBubbleProps, MessageThread, type MessageThreadProps, NEUTRAL_GRAY, NotificationBell, type NotificationBellProps, type NotificationTypeMeta, type NotifyOptions, type NotifyVariant, OpenAIIcon, PLACEHOLDER_COLOR, type PaletteNavItem, type ParsedChunk, type ParsedChunkMetadata, type ParsedDocument, type ParsedDocumentMetadata, PassageCard, type PassageCardProps, PdfIcon, type PresenceDisplayStatus, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, RUN_WINDOW_MS, type Rag, RagDot, RelevanceDot, type RenderMarkdown, type SearchChunk, SemanticSearch, type SemanticSearchProps, type StatusBadgeComponent, type StatusBadgeProps, StatusPill, type StatusPillProps, type StatusVariant, TAG_TYPE_ICONS, TAG_TYPE_LABELS, TagEntity, type TagEntityProps, type TagLike, type ThreadAccessors, type ThreadItem, Toaster, type ToolResponses, TxtIcon, TypingIndicator, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, annotateThread, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, dayKey, describeActivity, formatRelativeTime, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, isWorkspaceNotificationType, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useFacts, useHealth, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
2927
+ export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, AgentBadge, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, type AiRunOptions, type AiTaskStatus, type AppNotification, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, type ArbiChatLabels, ArbiChatPanel, type ArbiChatPanelProps, type ArbiChatProps, type ArbiChatTheme, ArbiIcon, ArbiProvider, type ArbiProviderProps, type ArbiUiState, ArbiWebSocketProvider, type ArbiWebSocketProviderProps, type ArbiWsState, type ArbiWsStatus, ArtifactCanvas, type AspectOption, AudIcon, BASE_COLORS, ChatBubble, type ChatBubbleProps, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, CommandPalette, type CommandPaletteClassNames, type CommandPaletteProps, CommandPaletteProvider, type CommandPaletteProviderProps, type CommandPaletteValue, ConversationList, type ConversationListProps, type CropArea, type CropOutput, type CropResult, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, DateSeparator, type DateSeparatorProps, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmNotification, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentCard, DocumentCardMenu, type DocumentCardMenuProps, type DocumentCardProps, DocumentEntity, type DocumentEntityProps, DocumentGallery, type DocumentGalleryProps, type DocumentLike, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, ENTITY_MAPPINGS, EmlIcon, EntityIcon, type EntityIconComponent, EntityPill, type EntityRegistryOverride, type EntityType, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HtmlIcon, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, LinkedInIcon, type MessageArtifact, MessageArtifactCard, MessageBubble, type MessageBubbleProps, MessageThread, type MessageThreadProps, NEUTRAL_GRAY, NotificationBell, type NotificationBellProps, type NotificationTypeMeta, type NotifyOptions, type NotifyVariant, OpenAIIcon, PLACEHOLDER_COLOR, type PaletteNavItem, type ParsedChunk, type ParsedChunkMetadata, type ParsedDocument, type ParsedDocumentMetadata, PassageCard, type PassageCardProps, PdfIcon, type PresenceDisplayStatus, PresenceLabel, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, RUN_WINDOW_MS, type Rag, RagDot, RelevanceDot, type RenderMarkdown, type SearchChunk, SemanticSearch, type SemanticSearchProps, type StatusBadgeComponent, type StatusBadgeProps, StatusPill, type StatusPillProps, type StatusVariant, TAG_TYPE_ICONS, TAG_TYPE_LABELS, TagEntity, type TagEntityProps, type TagLike, type ThreadAccessors, type ThreadItem, Toaster, type ToolResponses, TxtIcon, TypingIndicator, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, annotateThread, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, dayKey, describeActivity, formatRelativeTime, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, isWorkspaceNotificationType, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useFacts, useHealth, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
package/dist/index.d.ts CHANGED
@@ -1707,6 +1707,13 @@ interface UserEntityProps {
1707
1707
  isAgent?: boolean;
1708
1708
  /** Inline border/text colour for agent avatars (from the app's agentAvatarColors). */
1709
1709
  agentStyle?: React__default.CSSProperties;
1710
+ /**
1711
+ * Inline avatar colours for ANY user, not only agents — e.g. the deterministic
1712
+ * tint the DM rows derive from the user id. Takes precedence over
1713
+ * `agentStyle`, which predates it and is the same mechanism under a narrower
1714
+ * name.
1715
+ */
1716
+ avatarStyle?: React__default.CSSProperties;
1710
1717
  /** Whether this pill represents the current user — hides the chat icon and drives
1711
1718
  * which action `onClick` performs. */
1712
1719
  isMe?: boolean;
@@ -1721,6 +1728,32 @@ interface UserEntityProps {
1721
1728
  }
1722
1729
  declare const UserEntity: React__default.NamedExoticComponent<UserEntityProps>;
1723
1730
 
1731
+ /**
1732
+ * "AGENT" stamp for an `agt-` peer.
1733
+ *
1734
+ * `UserEntity` already marks agents with a dashed ring and a bot icon, but that
1735
+ * is a detail you have to know to read. An agent is a different KIND of
1736
+ * correspondent — it acts on someone's behalf, and what you send it may be
1737
+ * acted on rather than read — so it also gets a label you cannot miss.
1738
+ */
1739
+ declare function AgentBadge({ className }: {
1740
+ className?: string;
1741
+ }): React$1.JSX.Element;
1742
+ /**
1743
+ * Presence in words rather than a coloured dot alone.
1744
+ *
1745
+ * `status` is *resolved* by the app, exactly as {@link UserEntity} expects it,
1746
+ * and `undefined` renders nothing at all. That default matters: a consumer that
1747
+ * has not wired a WebSocket provider has no presence information, and labelling
1748
+ * every one of its contacts "Offline" would be stating something we do not
1749
+ * know. Whether absence of a signal means offline is a claim only the app can
1750
+ * make, so the app makes it by resolving to `disconnected`.
1751
+ */
1752
+ declare function PresenceLabel({ status, className, }: {
1753
+ status?: PresenceDisplayStatus;
1754
+ className?: string;
1755
+ }): React$1.JSX.Element | null;
1756
+
1724
1757
  /** A status variant is an opaque string — its valid values are defined by the
1725
1758
  * injected Badge (or the default Badge's variants). */
1726
1759
  type StatusVariant = string;
@@ -2326,6 +2359,12 @@ interface DmConversation {
2326
2359
  leading?: React.ReactNode;
2327
2360
  /** Controls pinned to the row's end, for rows that aren't openable. */
2328
2361
  trailing?: React.ReactNode;
2362
+ /**
2363
+ * Rendered immediately after the name — for marking what KIND of correspondent
2364
+ * this is when that changes how you should read the thread. The kit has no
2365
+ * notion of those kinds; the caller supplies the mark.
2366
+ */
2367
+ badge?: React.ReactNode;
2329
2368
  /**
2330
2369
  * Groups the row under a heading. The heading renders once, above the first
2331
2370
  * row that carries it, so a list can hold more than one kind of thing without
@@ -2423,8 +2462,10 @@ declare function DmComposer({ placeholder, disabled, busy, onSend, error, childr
2423
2462
  interface DmAvatarProps {
2424
2463
  user: DmUser;
2425
2464
  className?: string;
2465
+ /** Defaults to the 40px row avatar this component has always drawn. */
2466
+ size?: 'xs' | 'sm' | 'md' | 'lg';
2426
2467
  }
2427
- declare function DmAvatar({ user, className }: DmAvatarProps): React$1.JSX.Element;
2468
+ declare function DmAvatar({ user, className, size }: DmAvatarProps): React$1.JSX.Element;
2428
2469
 
2429
2470
  /**
2430
2471
  * useDirectMessages — the data layer for the DM block kit.
@@ -2883,4 +2924,4 @@ interface ArbiUiState {
2883
2924
  }
2884
2925
  declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState>>;
2885
2926
 
2886
- export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, type AiRunOptions, type AiTaskStatus, type AppNotification, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, type ArbiChatLabels, ArbiChatPanel, type ArbiChatPanelProps, type ArbiChatProps, type ArbiChatTheme, ArbiIcon, ArbiProvider, type ArbiProviderProps, type ArbiUiState, ArbiWebSocketProvider, type ArbiWebSocketProviderProps, type ArbiWsState, type ArbiWsStatus, ArtifactCanvas, type AspectOption, AudIcon, BASE_COLORS, ChatBubble, type ChatBubbleProps, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, CommandPalette, type CommandPaletteClassNames, type CommandPaletteProps, CommandPaletteProvider, type CommandPaletteProviderProps, type CommandPaletteValue, ConversationList, type ConversationListProps, type CropArea, type CropOutput, type CropResult, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, DateSeparator, type DateSeparatorProps, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmNotification, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentCard, DocumentCardMenu, type DocumentCardMenuProps, type DocumentCardProps, DocumentEntity, type DocumentEntityProps, DocumentGallery, type DocumentGalleryProps, type DocumentLike, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, ENTITY_MAPPINGS, EmlIcon, EntityIcon, type EntityIconComponent, EntityPill, type EntityRegistryOverride, type EntityType, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HtmlIcon, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, LinkedInIcon, type MessageArtifact, MessageArtifactCard, MessageBubble, type MessageBubbleProps, MessageThread, type MessageThreadProps, NEUTRAL_GRAY, NotificationBell, type NotificationBellProps, type NotificationTypeMeta, type NotifyOptions, type NotifyVariant, OpenAIIcon, PLACEHOLDER_COLOR, type PaletteNavItem, type ParsedChunk, type ParsedChunkMetadata, type ParsedDocument, type ParsedDocumentMetadata, PassageCard, type PassageCardProps, PdfIcon, type PresenceDisplayStatus, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, RUN_WINDOW_MS, type Rag, RagDot, RelevanceDot, type RenderMarkdown, type SearchChunk, SemanticSearch, type SemanticSearchProps, type StatusBadgeComponent, type StatusBadgeProps, StatusPill, type StatusPillProps, type StatusVariant, TAG_TYPE_ICONS, TAG_TYPE_LABELS, TagEntity, type TagEntityProps, type TagLike, type ThreadAccessors, type ThreadItem, Toaster, type ToolResponses, TxtIcon, TypingIndicator, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, annotateThread, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, dayKey, describeActivity, formatRelativeTime, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, isWorkspaceNotificationType, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useFacts, useHealth, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
2927
+ export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, AgentBadge, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, type AiRunOptions, type AiTaskStatus, type AppNotification, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, type ArbiChatLabels, ArbiChatPanel, type ArbiChatPanelProps, type ArbiChatProps, type ArbiChatTheme, ArbiIcon, ArbiProvider, type ArbiProviderProps, type ArbiUiState, ArbiWebSocketProvider, type ArbiWebSocketProviderProps, type ArbiWsState, type ArbiWsStatus, ArtifactCanvas, type AspectOption, AudIcon, BASE_COLORS, ChatBubble, type ChatBubbleProps, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, CommandPalette, type CommandPaletteClassNames, type CommandPaletteProps, CommandPaletteProvider, type CommandPaletteProviderProps, type CommandPaletteValue, ConversationList, type ConversationListProps, type CropArea, type CropOutput, type CropResult, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, DateSeparator, type DateSeparatorProps, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmNotification, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentCard, DocumentCardMenu, type DocumentCardMenuProps, type DocumentCardProps, DocumentEntity, type DocumentEntityProps, DocumentGallery, type DocumentGalleryProps, type DocumentLike, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, ENTITY_MAPPINGS, EmlIcon, EntityIcon, type EntityIconComponent, EntityPill, type EntityRegistryOverride, type EntityType, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HtmlIcon, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, LinkedInIcon, type MessageArtifact, MessageArtifactCard, MessageBubble, type MessageBubbleProps, MessageThread, type MessageThreadProps, NEUTRAL_GRAY, NotificationBell, type NotificationBellProps, type NotificationTypeMeta, type NotifyOptions, type NotifyVariant, OpenAIIcon, PLACEHOLDER_COLOR, type PaletteNavItem, type ParsedChunk, type ParsedChunkMetadata, type ParsedDocument, type ParsedDocumentMetadata, PassageCard, type PassageCardProps, PdfIcon, type PresenceDisplayStatus, PresenceLabel, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, RUN_WINDOW_MS, type Rag, RagDot, RelevanceDot, type RenderMarkdown, type SearchChunk, SemanticSearch, type SemanticSearchProps, type StatusBadgeComponent, type StatusBadgeProps, StatusPill, type StatusPillProps, type StatusVariant, TAG_TYPE_ICONS, TAG_TYPE_LABELS, TagEntity, type TagEntityProps, type TagLike, type ThreadAccessors, type ThreadItem, Toaster, type ToolResponses, TxtIcon, TypingIndicator, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, annotateThread, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, dayKey, describeActivity, formatRelativeTime, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, isWorkspaceNotificationType, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useFacts, useHealth, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { useArbi, ArbiProvider } from './chunk-J4MX2W4H.js';
2
- export { ArbiProvider, useArbi } from './chunk-J4MX2W4H.js';
3
1
  import { cn, Avatar, AvatarFallback, AvatarImage, Tooltip, TooltipTrigger, TooltipContent, Popover, PopoverTrigger, PopoverContent, AiMarkdown, Card, Button, Badge, MarkdownRenderer, Input, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, ScrollArea, Textarea, Slider, Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuItem, Checkbox } from './chunk-VTX77MYP.js';
4
2
  export { AiMarkdown, Avatar, AvatarFallback, AvatarImage, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCard, HoverCardContent, HoverCardTrigger, Input, Label, MarkdownRenderer, MarkdownStreamingContext, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, markdownBaseComponents, splitMarkdownBlocks, toggleVariants } from './chunk-VTX77MYP.js';
3
+ import { useArbi, ArbiProvider } from './chunk-J4MX2W4H.js';
4
+ export { ArbiProvider, useArbi } from './chunk-J4MX2W4H.js';
5
5
  import React2, { memo, useState, createContext, forwardRef, useMemo, useCallback, useId, useRef, useContext, useEffect, Fragment as Fragment$1 } from 'react';
6
6
  import { useQuery, useMutation, useQueries, QueryClient, QueryClientProvider, useQueryClient } from '@tanstack/react-query';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -4397,6 +4397,13 @@ var presencePositionClasses = {
4397
4397
  md: "-right-1.5 -bottom-0.5",
4398
4398
  lg: "-right-1.5 -bottom-0.5"
4399
4399
  };
4400
+ var PRESENCE_LABELS = {
4401
+ connected: "Online",
4402
+ connecting: "Connecting",
4403
+ disconnected: "Offline",
4404
+ error: "Connection problem",
4405
+ hidden: "Status hidden"
4406
+ };
4400
4407
  var presenceColorClasses = {
4401
4408
  connected: "bg-status-online",
4402
4409
  connecting: "bg-status-connecting",
@@ -4417,6 +4424,7 @@ var UserEntity = memo(function UserEntity2({
4417
4424
  colorClass = "",
4418
4425
  isAgent = false,
4419
4426
  agentStyle,
4427
+ avatarStyle,
4420
4428
  isMe = false,
4421
4429
  displayStatus,
4422
4430
  onClick,
@@ -4436,6 +4444,7 @@ var UserEntity = memo(function UserEntity2({
4436
4444
  const agentBadge = isAgent ? /* @__PURE__ */ jsx(ArbiBotHeadIcon, { className: "w-3.5 h-3.5 text-muted-foreground" }) : void 0;
4437
4445
  const canMessage = interactive && !isMe && !isAgent;
4438
4446
  const showUnread = hasUnreadMessages && !isMe && !isAgent;
4447
+ const surfaceStyle = avatarStyle ?? agentStyle;
4439
4448
  const avatarCore = /* @__PURE__ */ jsxs(
4440
4449
  Avatar,
4441
4450
  {
@@ -4443,7 +4452,7 @@ var UserEntity = memo(function UserEntity2({
4443
4452
  sizeClasses[size],
4444
4453
  isAgent ? "rounded-full border-2 border-dashed" : "border border-white"
4445
4454
  ),
4446
- style: agentStyle,
4455
+ style: surfaceStyle,
4447
4456
  "data-testid": "user-entity",
4448
4457
  children: [
4449
4458
  picture && /* @__PURE__ */ jsx(AvatarImage, { src: picture, alt: initials }),
@@ -4455,7 +4464,7 @@ var UserEntity = memo(function UserEntity2({
4455
4464
  "font-semibold leading-none",
4456
4465
  isAgent ? "rounded-full bg-transparent" : `text-white ${colorClass}`
4457
4466
  ),
4458
- style: agentStyle,
4467
+ style: surfaceStyle,
4459
4468
  children: initials
4460
4469
  }
4461
4470
  )
@@ -4472,7 +4481,10 @@ var UserEntity = memo(function UserEntity2({
4472
4481
  !showUnread && displayStatus ? presenceColorClasses[displayStatus] : ""
4473
4482
  ),
4474
4483
  style: showUnread ? { backgroundColor: "#00adef" } : void 0,
4475
- "data-testid": "user-entity-presence"
4484
+ "data-testid": "user-entity-presence",
4485
+ role: "img",
4486
+ "aria-label": showUnread ? "Unread messages" : PRESENCE_LABELS[displayStatus],
4487
+ title: showUnread ? "Unread messages" : PRESENCE_LABELS[displayStatus]
4476
4488
  }
4477
4489
  ) : null;
4478
4490
  const avatarElement = statusDot ? /* @__PURE__ */ jsxs(
@@ -4549,6 +4561,59 @@ var UserEntity = memo(function UserEntity2({
4549
4561
  }
4550
4562
  return avatarElement;
4551
4563
  });
4564
+ function AgentBadge({ className }) {
4565
+ return /* @__PURE__ */ jsxs(
4566
+ "span",
4567
+ {
4568
+ "data-testid": "agent-badge",
4569
+ className: cn(
4570
+ "inline-flex shrink-0 items-center gap-1 rounded-full border border-ai-accent/50",
4571
+ "bg-ai-accent-soft px-2 py-0.5 text-[11px] font-bold uppercase tracking-wider text-ai-accent",
4572
+ className
4573
+ ),
4574
+ children: [
4575
+ /* @__PURE__ */ jsx(ArbiBotHeadIcon, { size: 14, className: "text-ai-accent" }),
4576
+ "Agent"
4577
+ ]
4578
+ }
4579
+ );
4580
+ }
4581
+ var PRESENCE_WORDS = {
4582
+ connected: "Online",
4583
+ connecting: "Connecting",
4584
+ disconnected: "Offline",
4585
+ error: "Connection problem",
4586
+ hidden: null
4587
+ };
4588
+ function PresenceLabel({
4589
+ status,
4590
+ className
4591
+ }) {
4592
+ if (!status) return null;
4593
+ const word = PRESENCE_WORDS[status];
4594
+ if (!word) return null;
4595
+ const online = status === "connected";
4596
+ return /* @__PURE__ */ jsxs(
4597
+ "span",
4598
+ {
4599
+ "data-testid": "presence-label",
4600
+ className: cn("inline-flex shrink-0 items-center gap-1 text-xs", className),
4601
+ children: [
4602
+ /* @__PURE__ */ jsx(
4603
+ "span",
4604
+ {
4605
+ className: cn(
4606
+ "size-1.5 rounded-full",
4607
+ online ? "bg-status-online" : "bg-muted-foreground/50"
4608
+ ),
4609
+ "aria-hidden": "true"
4610
+ }
4611
+ ),
4612
+ /* @__PURE__ */ jsx("span", { className: online ? "font-medium text-status-online" : "text-muted-foreground", children: word })
4613
+ ]
4614
+ }
4615
+ );
4616
+ }
4552
4617
  var PACKAGE_BADGE_VARIANTS = [
4553
4618
  "default",
4554
4619
  "accent",
@@ -5168,6 +5233,9 @@ function userDisplayName(user) {
5168
5233
  const name = [user.given_name, user.family_name].filter(Boolean).join(" ").trim();
5169
5234
  return name || user.email?.split("@")[0] || "Unknown";
5170
5235
  }
5236
+ function isAgentUser(user) {
5237
+ return user.external_id.startsWith("agt-");
5238
+ }
5171
5239
  var RELATIVE = new Intl.RelativeTimeFormat(void 0, { numeric: "auto" });
5172
5240
  var DIVISIONS = [
5173
5241
  { amount: 60, unit: "seconds" },
@@ -5416,13 +5484,25 @@ function useDirectMessages(options) {
5416
5484
  markRead: (messageIds) => markReadMutation.mutateAsync(messageIds)
5417
5485
  };
5418
5486
  }
5419
- function DmAvatar({ user, className }) {
5420
- const name = userDisplayName(user);
5421
- const tint = getEntityColorStyles(user.external_id);
5422
- return /* @__PURE__ */ jsxs(Avatar, { className: cn("size-10", className), children: [
5423
- user.picture ? /* @__PURE__ */ jsx(AvatarImage, { src: user.picture, alt: name }) : null,
5424
- /* @__PURE__ */ jsx(AvatarFallback, { style: tint, className: "text-xs font-semibold", children: userInitials(user) })
5425
- ] });
5487
+ function DmAvatar({ user, className, size = "lg" }) {
5488
+ const presence = useArbiWsStore((s) => s.presence[user.external_id]);
5489
+ const displayStatus = presence === void 0 ? void 0 : presence === "online" ? "connected" : "disconnected";
5490
+ return /* @__PURE__ */ jsx(
5491
+ UserEntity,
5492
+ {
5493
+ variant: "icon",
5494
+ size,
5495
+ className,
5496
+ interactive: false,
5497
+ showTooltip: false,
5498
+ initials: userInitials(user),
5499
+ displayName: userDisplayName(user),
5500
+ picture: user.picture,
5501
+ avatarStyle: getEntityColorStyles(user.external_id),
5502
+ isAgent: isAgentUser(user),
5503
+ displayStatus
5504
+ }
5505
+ );
5426
5506
  }
5427
5507
  function ConversationList({
5428
5508
  conversations,
@@ -5460,16 +5540,19 @@ function ConversationList({
5460
5540
  c.leading ?? /* @__PURE__ */ jsx(DmAvatar, { user: peer }),
5461
5541
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
5462
5542
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
5463
- /* @__PURE__ */ jsx(
5464
- "span",
5465
- {
5466
- className: cn(
5467
- "truncate text-sm text-foreground",
5468
- unread ? "font-bold" : "font-semibold"
5469
- ),
5470
- children: userDisplayName(peer)
5471
- }
5472
- ),
5543
+ /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
5544
+ /* @__PURE__ */ jsx(
5545
+ "span",
5546
+ {
5547
+ className: cn(
5548
+ "truncate text-sm text-foreground",
5549
+ unread ? "font-bold" : "font-semibold"
5550
+ ),
5551
+ children: userDisplayName(peer)
5552
+ }
5553
+ ),
5554
+ c.badge ?? (isAgentUser(peer) ? /* @__PURE__ */ jsx(AgentBadge, {}) : null)
5555
+ ] }),
5473
5556
  c.statusLabel ? /* @__PURE__ */ jsx(
5474
5557
  Badge,
5475
5558
  {
@@ -6928,6 +7011,6 @@ function DocumentGallery({
6928
7011
  );
6929
7012
  }
6930
7013
 
6931
- export { ActivityFeed, AiActionCard, AiAnswer, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, ArbiChatPanel, ArbiIcon, ArbiWebSocketProvider, ArtifactCanvas, AudIcon, BASE_COLORS2 as BASE_COLORS, ChatBubble, CitationRenderer, ClaudeIcon, CommandPalette, CommandPaletteProvider, ConversationList, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, DateSeparator, DirectMessages, DmAvatar, DmComposer, DocIcon, DocQaPanel, DocSearch, DocumentCard, DocumentCardMenu, DocumentEntity, DocumentGallery, DocumentReview, DocumentTable, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HtmlIcon, ImageCropModal, ImageCropper, ImgIcon, LinkedInIcon, MessageArtifactCard, MessageBubble2 as MessageBubble, MessageThread, NEUTRAL_GRAY2 as NEUTRAL_GRAY, NotificationBell, OpenAIIcon, PLACEHOLDER_COLOR, PassageCard, PdfIcon, ProjectEntity, ProviderIcon, RUN_WINDOW_MS, RagDot, RelevanceDot, SemanticSearch, StatusPill, TAG_TYPE_ICONS, TAG_TYPE_LABELS, TagEntity, Toaster, TxtIcon, TypingIndicator, UserEntity, UserMenu, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, annotateThread, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, dayKey, describeActivity, formatRelativeTime, getEntityColor2 as getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, isWorkspaceNotificationType, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useFacts, useHealth, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
7014
+ export { ActivityFeed, AgentBadge, AiActionCard, AiAnswer, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, ArbiChatPanel, ArbiIcon, ArbiWebSocketProvider, ArtifactCanvas, AudIcon, BASE_COLORS2 as BASE_COLORS, ChatBubble, CitationRenderer, ClaudeIcon, CommandPalette, CommandPaletteProvider, ConversationList, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, DateSeparator, DirectMessages, DmAvatar, DmComposer, DocIcon, DocQaPanel, DocSearch, DocumentCard, DocumentCardMenu, DocumentEntity, DocumentGallery, DocumentReview, DocumentTable, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HtmlIcon, ImageCropModal, ImageCropper, ImgIcon, LinkedInIcon, MessageArtifactCard, MessageBubble2 as MessageBubble, MessageThread, NEUTRAL_GRAY2 as NEUTRAL_GRAY, NotificationBell, OpenAIIcon, PLACEHOLDER_COLOR, PassageCard, PdfIcon, PresenceLabel, ProjectEntity, ProviderIcon, RUN_WINDOW_MS, RagDot, RelevanceDot, SemanticSearch, StatusPill, TAG_TYPE_ICONS, TAG_TYPE_LABELS, TagEntity, Toaster, TxtIcon, TypingIndicator, UserEntity, UserMenu, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, annotateThread, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, dayKey, describeActivity, formatRelativeTime, getEntityColor2 as getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, isWorkspaceNotificationType, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useFacts, useHealth, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
6932
7015
  //# sourceMappingURL=index.js.map
6933
7016
  //# sourceMappingURL=index.js.map