@arbidocs/react 0.3.148 → 0.3.150

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
@@ -195,6 +195,19 @@ interface ChatBubbleProps {
195
195
  onDelete?: () => void;
196
196
  /** Last bubble in a same-sender run; shows the timestamp and read receipt. */
197
197
  isLastOfRun?: boolean;
198
+ /**
199
+ * Who sent it. Rendered in the meta row on the last bubble of a run, so a
200
+ * thread that needs attribution (a group, or a rail-less list where the peer
201
+ * isn't in a header) gets it without a row per message.
202
+ */
203
+ senderName?: string;
204
+ /** Per-slot brand overrides, so a consumer pins its accent in one place. */
205
+ classNames?: {
206
+ /** The current user's own bubble. */
207
+ ownBubble?: string;
208
+ /** The peer's bubble. */
209
+ peerBubble?: string;
210
+ };
198
211
  /**
199
212
  * Render the message body. Injected by the host so the light package doesn't
200
213
  * depend on the app's markdown renderer. Defaults to plain text.
@@ -205,6 +218,8 @@ interface ChatBubbleProps {
205
218
  * raw string.
206
219
  */
207
220
  formatTimestamp?: (timestamp: string) => string;
221
+ /** Marks the message row, including the deleted tombstone. */
222
+ 'data-testid'?: string;
208
223
  }
209
224
  declare const ChatBubble: React$1.NamedExoticComponent<ChatBubbleProps>;
210
225
 
@@ -1692,6 +1707,13 @@ interface UserEntityProps {
1692
1707
  isAgent?: boolean;
1693
1708
  /** Inline border/text colour for agent avatars (from the app's agentAvatarColors). */
1694
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;
1695
1717
  /** Whether this pill represents the current user — hides the chat icon and drives
1696
1718
  * which action `onClick` performs. */
1697
1719
  isMe?: boolean;
@@ -1706,6 +1728,32 @@ interface UserEntityProps {
1706
1728
  }
1707
1729
  declare const UserEntity: React__default.NamedExoticComponent<UserEntityProps>;
1708
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
+
1709
1757
  /** A status variant is an opaque string — its valid values are defined by the
1710
1758
  * injected Badge (or the default Badge's variants). */
1711
1759
  type StatusVariant = string;
@@ -2297,6 +2345,32 @@ interface DmConversation {
2297
2345
  * existing thread — i.e. a colleague ready to message but with no history yet.
2298
2346
  */
2299
2347
  isContactOnly?: boolean;
2348
+ /**
2349
+ * Shown in place of the unread count for a row that is not a live
2350
+ * conversation — an invitation still pending, or one that has expired. The
2351
+ * caller supplies the wording; the kit has no notion of invite states.
2352
+ */
2353
+ statusLabel?: string;
2354
+ /** Not selectable: there is no thread behind it yet. */
2355
+ disabled?: boolean;
2356
+ /** Replaces the message preview — e.g. an email, where there is no message. */
2357
+ subtitle?: string;
2358
+ /** Replaces the avatar, for a row that stands for someone with no account. */
2359
+ leading?: React.ReactNode;
2360
+ /** Controls pinned to the row's end, for rows that aren't openable. */
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;
2368
+ /**
2369
+ * Groups the row under a heading. The heading renders once, above the first
2370
+ * row that carries it, so a list can hold more than one kind of thing without
2371
+ * them interleaving.
2372
+ */
2373
+ sectionLabel?: string;
2300
2374
  }
2301
2375
 
2302
2376
  interface DirectMessagesProps {
@@ -2318,39 +2392,80 @@ interface ConversationListProps {
2318
2392
  classNames?: Pick<DmClassNames, 'unreadBadge'>;
2319
2393
  /** Rendered when there are no conversations. */
2320
2394
  emptyState?: React.ReactNode;
2395
+ /**
2396
+ * Replaces the default "Conversations / N colleagues" heading — e.g. with a
2397
+ * call to action. Pass `null` for no heading at all.
2398
+ */
2399
+ header?: React.ReactNode;
2400
+ /**
2401
+ * Overrides the rail's own sizing. The default is a fixed-width column beside
2402
+ * a thread; a consumer showing the list on its own needs it to fill instead,
2403
+ * and cannot get there by wrapping (a narrower wrapper clips rather than
2404
+ * shrinks).
2405
+ */
2406
+ className?: string;
2321
2407
  }
2322
- declare function ConversationList({ conversations, selectedPeerId, onSelect, classNames, emptyState, }: ConversationListProps): React$1.JSX.Element;
2408
+ declare function ConversationList({ conversations, selectedPeerId, onSelect, classNames, emptyState, header, className, }: ConversationListProps): React$1.JSX.Element;
2323
2409
 
2324
2410
  interface MessageThreadProps {
2325
2411
  conversation: DmConversation | null;
2326
2412
  classNames?: Pick<DmClassNames, 'ownBubble' | 'peerBubble'>;
2327
2413
  emptyState?: React.ReactNode;
2414
+ /**
2415
+ * Label for a day divider. Omit to leave the thread undivided — the kit does
2416
+ * not format dates itself (see DateSeparator).
2417
+ */
2418
+ formatDay?: (iso: string) => string;
2419
+ /** Deletes a message. Omit to hide the affordance. */
2420
+ onDeleteMessage?: (message: DmMessage) => void;
2421
+ /** External ids of messages already deleted, rendered as tombstones. */
2422
+ deletedIds?: ReadonlySet<string>;
2328
2423
  }
2329
- declare function MessageThread({ conversation, classNames, emptyState }: MessageThreadProps): React$1.JSX.Element;
2424
+ declare function MessageThread({ conversation, classNames, emptyState, formatDay, onDeleteMessage, deletedIds, }: MessageThreadProps): React$1.JSX.Element;
2330
2425
 
2331
2426
  interface MessageBubbleProps {
2332
2427
  message: DmMessage;
2333
2428
  classNames?: Pick<DmClassNames, 'ownBubble' | 'peerBubble'>;
2429
+ /**
2430
+ * False when the next message is from the same sender in the same run, which
2431
+ * suppresses the meta row so a burst reads as one block. Defaults to true —
2432
+ * every message carries its own sender, time and receipt.
2433
+ */
2434
+ isLastOfRun?: boolean;
2435
+ /** Deletes this message. Omit to hide the affordance. */
2436
+ onDelete?: () => void;
2437
+ /** Renders the tombstone in place of the body. */
2438
+ deleted?: boolean;
2334
2439
  }
2335
- declare function MessageBubble({ message, classNames }: MessageBubbleProps): React$1.JSX.Element;
2440
+ declare function MessageBubble({ message, classNames, isLastOfRun, onDelete, deleted, }: MessageBubbleProps): React$1.JSX.Element;
2336
2441
 
2337
2442
  interface DmComposerProps {
2338
2443
  /** Placeholder, e.g. "Message Eleanor…". */
2339
2444
  placeholder?: string;
2340
2445
  disabled?: boolean;
2446
+ /**
2447
+ * A send is in flight: swaps the icon for a spinner and blocks a second
2448
+ * submit, so a slow encrypt-and-post can't be fired twice by an impatient
2449
+ * Enter.
2450
+ */
2451
+ busy?: boolean;
2341
2452
  /** Called with the trimmed text when the user sends. May reject if the send fails. */
2342
2453
  onSend: (text: string) => void | Promise<void>;
2343
2454
  /** Shown under the box when the last send failed. */
2344
2455
  error?: string | null;
2456
+ /** Extra content between the box and the border (e.g. a peer-specific action). */
2457
+ children?: React.ReactNode;
2345
2458
  classNames?: Pick<DmClassNames, 'sendButton'>;
2346
2459
  }
2347
- declare function DmComposer({ placeholder, disabled, onSend, error, classNames }: DmComposerProps): React$1.JSX.Element;
2460
+ declare function DmComposer({ placeholder, disabled, busy, onSend, error, children, classNames, }: DmComposerProps): React$1.JSX.Element;
2348
2461
 
2349
2462
  interface DmAvatarProps {
2350
2463
  user: DmUser;
2351
2464
  className?: string;
2465
+ /** Defaults to the 40px row avatar this component has always drawn. */
2466
+ size?: 'xs' | 'sm' | 'md' | 'lg';
2352
2467
  }
2353
- declare function DmAvatar({ user, className }: DmAvatarProps): React$1.JSX.Element;
2468
+ declare function DmAvatar({ user, className, size }: DmAvatarProps): React$1.JSX.Element;
2354
2469
 
2355
2470
  /**
2356
2471
  * useDirectMessages — the data layer for the DM block kit.
@@ -2396,6 +2511,48 @@ declare function userDisplayName(user: Pick<DmUser, 'given_name' | 'family_name'
2396
2511
  /** Compact relative time, e.g. "2 hours ago", "just now". */
2397
2512
  declare function formatRelativeTime(iso: string): string;
2398
2513
 
2514
+ interface DateSeparatorProps {
2515
+ children: ReactNode;
2516
+ }
2517
+ declare function DateSeparator({ children }: DateSeparatorProps): React$1.JSX.Element;
2518
+
2519
+ /**
2520
+ * Thread grouping: the two annotations a readable message list needs.
2521
+ *
2522
+ * A run is a burst from one sender close together in time; only its last
2523
+ * message carries the meta row (sender, time, receipt), so ten rapid messages
2524
+ * read as one block instead of ten stamped rows. A day boundary gets a
2525
+ * separator so a thread spanning weeks stays navigable.
2526
+ *
2527
+ * Generic over the message shape because the two consumers hold different ones —
2528
+ * the block's `DmMessage` and the ARBI app's decrypted notification rows — and
2529
+ * duplicating this logic is exactly how they drifted apart before.
2530
+ */
2531
+ /** Two messages belong to the same run when same sender and within this gap. */
2532
+ declare const RUN_WINDOW_MS: number;
2533
+ interface ThreadItem<T> {
2534
+ message: T;
2535
+ /** Last of a same-sender run: render the meta row here. */
2536
+ isLastOfRun: boolean;
2537
+ /** First message on its calendar day: render a date separator above it. */
2538
+ isFirstOfDay: boolean;
2539
+ }
2540
+ interface ThreadAccessors<T> {
2541
+ senderId: (message: T) => string;
2542
+ createdAt: (message: T) => string;
2543
+ }
2544
+ /**
2545
+ * Local calendar day for a timestamp.
2546
+ *
2547
+ * Deliberately local rather than UTC: a message sent at 23:30 in the reader's
2548
+ * zone belongs under that day's separator, not tomorrow's. Falls back to the
2549
+ * raw string for an unparseable timestamp so such a message still buckets
2550
+ * consistently with itself rather than joining an arbitrary day.
2551
+ */
2552
+ declare function dayKey(iso: string): string;
2553
+ /** Annotate messages (ascending time order) with run and day boundaries. */
2554
+ declare function annotateThread<T>(messages: T[], accessors: ThreadAccessors<T>, runWindowMs?: number): ThreadItem<T>[];
2555
+
2399
2556
  /**
2400
2557
  * Crop a region of an image to a canvas and export it — the shared engine
2401
2558
  * behind every "frame this image" surface (avatars, builder image fields, …).
@@ -2767,4 +2924,4 @@ interface ArbiUiState {
2767
2924
  }
2768
2925
  declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState>>;
2769
2926
 
2770
- 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, 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, 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, Toaster, type ToolResponses, TxtIcon, TypingIndicator, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, 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
@@ -195,6 +195,19 @@ interface ChatBubbleProps {
195
195
  onDelete?: () => void;
196
196
  /** Last bubble in a same-sender run; shows the timestamp and read receipt. */
197
197
  isLastOfRun?: boolean;
198
+ /**
199
+ * Who sent it. Rendered in the meta row on the last bubble of a run, so a
200
+ * thread that needs attribution (a group, or a rail-less list where the peer
201
+ * isn't in a header) gets it without a row per message.
202
+ */
203
+ senderName?: string;
204
+ /** Per-slot brand overrides, so a consumer pins its accent in one place. */
205
+ classNames?: {
206
+ /** The current user's own bubble. */
207
+ ownBubble?: string;
208
+ /** The peer's bubble. */
209
+ peerBubble?: string;
210
+ };
198
211
  /**
199
212
  * Render the message body. Injected by the host so the light package doesn't
200
213
  * depend on the app's markdown renderer. Defaults to plain text.
@@ -205,6 +218,8 @@ interface ChatBubbleProps {
205
218
  * raw string.
206
219
  */
207
220
  formatTimestamp?: (timestamp: string) => string;
221
+ /** Marks the message row, including the deleted tombstone. */
222
+ 'data-testid'?: string;
208
223
  }
209
224
  declare const ChatBubble: React$1.NamedExoticComponent<ChatBubbleProps>;
210
225
 
@@ -1692,6 +1707,13 @@ interface UserEntityProps {
1692
1707
  isAgent?: boolean;
1693
1708
  /** Inline border/text colour for agent avatars (from the app's agentAvatarColors). */
1694
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;
1695
1717
  /** Whether this pill represents the current user — hides the chat icon and drives
1696
1718
  * which action `onClick` performs. */
1697
1719
  isMe?: boolean;
@@ -1706,6 +1728,32 @@ interface UserEntityProps {
1706
1728
  }
1707
1729
  declare const UserEntity: React__default.NamedExoticComponent<UserEntityProps>;
1708
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
+
1709
1757
  /** A status variant is an opaque string — its valid values are defined by the
1710
1758
  * injected Badge (or the default Badge's variants). */
1711
1759
  type StatusVariant = string;
@@ -2297,6 +2345,32 @@ interface DmConversation {
2297
2345
  * existing thread — i.e. a colleague ready to message but with no history yet.
2298
2346
  */
2299
2347
  isContactOnly?: boolean;
2348
+ /**
2349
+ * Shown in place of the unread count for a row that is not a live
2350
+ * conversation — an invitation still pending, or one that has expired. The
2351
+ * caller supplies the wording; the kit has no notion of invite states.
2352
+ */
2353
+ statusLabel?: string;
2354
+ /** Not selectable: there is no thread behind it yet. */
2355
+ disabled?: boolean;
2356
+ /** Replaces the message preview — e.g. an email, where there is no message. */
2357
+ subtitle?: string;
2358
+ /** Replaces the avatar, for a row that stands for someone with no account. */
2359
+ leading?: React.ReactNode;
2360
+ /** Controls pinned to the row's end, for rows that aren't openable. */
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;
2368
+ /**
2369
+ * Groups the row under a heading. The heading renders once, above the first
2370
+ * row that carries it, so a list can hold more than one kind of thing without
2371
+ * them interleaving.
2372
+ */
2373
+ sectionLabel?: string;
2300
2374
  }
2301
2375
 
2302
2376
  interface DirectMessagesProps {
@@ -2318,39 +2392,80 @@ interface ConversationListProps {
2318
2392
  classNames?: Pick<DmClassNames, 'unreadBadge'>;
2319
2393
  /** Rendered when there are no conversations. */
2320
2394
  emptyState?: React.ReactNode;
2395
+ /**
2396
+ * Replaces the default "Conversations / N colleagues" heading — e.g. with a
2397
+ * call to action. Pass `null` for no heading at all.
2398
+ */
2399
+ header?: React.ReactNode;
2400
+ /**
2401
+ * Overrides the rail's own sizing. The default is a fixed-width column beside
2402
+ * a thread; a consumer showing the list on its own needs it to fill instead,
2403
+ * and cannot get there by wrapping (a narrower wrapper clips rather than
2404
+ * shrinks).
2405
+ */
2406
+ className?: string;
2321
2407
  }
2322
- declare function ConversationList({ conversations, selectedPeerId, onSelect, classNames, emptyState, }: ConversationListProps): React$1.JSX.Element;
2408
+ declare function ConversationList({ conversations, selectedPeerId, onSelect, classNames, emptyState, header, className, }: ConversationListProps): React$1.JSX.Element;
2323
2409
 
2324
2410
  interface MessageThreadProps {
2325
2411
  conversation: DmConversation | null;
2326
2412
  classNames?: Pick<DmClassNames, 'ownBubble' | 'peerBubble'>;
2327
2413
  emptyState?: React.ReactNode;
2414
+ /**
2415
+ * Label for a day divider. Omit to leave the thread undivided — the kit does
2416
+ * not format dates itself (see DateSeparator).
2417
+ */
2418
+ formatDay?: (iso: string) => string;
2419
+ /** Deletes a message. Omit to hide the affordance. */
2420
+ onDeleteMessage?: (message: DmMessage) => void;
2421
+ /** External ids of messages already deleted, rendered as tombstones. */
2422
+ deletedIds?: ReadonlySet<string>;
2328
2423
  }
2329
- declare function MessageThread({ conversation, classNames, emptyState }: MessageThreadProps): React$1.JSX.Element;
2424
+ declare function MessageThread({ conversation, classNames, emptyState, formatDay, onDeleteMessage, deletedIds, }: MessageThreadProps): React$1.JSX.Element;
2330
2425
 
2331
2426
  interface MessageBubbleProps {
2332
2427
  message: DmMessage;
2333
2428
  classNames?: Pick<DmClassNames, 'ownBubble' | 'peerBubble'>;
2429
+ /**
2430
+ * False when the next message is from the same sender in the same run, which
2431
+ * suppresses the meta row so a burst reads as one block. Defaults to true —
2432
+ * every message carries its own sender, time and receipt.
2433
+ */
2434
+ isLastOfRun?: boolean;
2435
+ /** Deletes this message. Omit to hide the affordance. */
2436
+ onDelete?: () => void;
2437
+ /** Renders the tombstone in place of the body. */
2438
+ deleted?: boolean;
2334
2439
  }
2335
- declare function MessageBubble({ message, classNames }: MessageBubbleProps): React$1.JSX.Element;
2440
+ declare function MessageBubble({ message, classNames, isLastOfRun, onDelete, deleted, }: MessageBubbleProps): React$1.JSX.Element;
2336
2441
 
2337
2442
  interface DmComposerProps {
2338
2443
  /** Placeholder, e.g. "Message Eleanor…". */
2339
2444
  placeholder?: string;
2340
2445
  disabled?: boolean;
2446
+ /**
2447
+ * A send is in flight: swaps the icon for a spinner and blocks a second
2448
+ * submit, so a slow encrypt-and-post can't be fired twice by an impatient
2449
+ * Enter.
2450
+ */
2451
+ busy?: boolean;
2341
2452
  /** Called with the trimmed text when the user sends. May reject if the send fails. */
2342
2453
  onSend: (text: string) => void | Promise<void>;
2343
2454
  /** Shown under the box when the last send failed. */
2344
2455
  error?: string | null;
2456
+ /** Extra content between the box and the border (e.g. a peer-specific action). */
2457
+ children?: React.ReactNode;
2345
2458
  classNames?: Pick<DmClassNames, 'sendButton'>;
2346
2459
  }
2347
- declare function DmComposer({ placeholder, disabled, onSend, error, classNames }: DmComposerProps): React$1.JSX.Element;
2460
+ declare function DmComposer({ placeholder, disabled, busy, onSend, error, children, classNames, }: DmComposerProps): React$1.JSX.Element;
2348
2461
 
2349
2462
  interface DmAvatarProps {
2350
2463
  user: DmUser;
2351
2464
  className?: string;
2465
+ /** Defaults to the 40px row avatar this component has always drawn. */
2466
+ size?: 'xs' | 'sm' | 'md' | 'lg';
2352
2467
  }
2353
- declare function DmAvatar({ user, className }: DmAvatarProps): React$1.JSX.Element;
2468
+ declare function DmAvatar({ user, className, size }: DmAvatarProps): React$1.JSX.Element;
2354
2469
 
2355
2470
  /**
2356
2471
  * useDirectMessages — the data layer for the DM block kit.
@@ -2396,6 +2511,48 @@ declare function userDisplayName(user: Pick<DmUser, 'given_name' | 'family_name'
2396
2511
  /** Compact relative time, e.g. "2 hours ago", "just now". */
2397
2512
  declare function formatRelativeTime(iso: string): string;
2398
2513
 
2514
+ interface DateSeparatorProps {
2515
+ children: ReactNode;
2516
+ }
2517
+ declare function DateSeparator({ children }: DateSeparatorProps): React$1.JSX.Element;
2518
+
2519
+ /**
2520
+ * Thread grouping: the two annotations a readable message list needs.
2521
+ *
2522
+ * A run is a burst from one sender close together in time; only its last
2523
+ * message carries the meta row (sender, time, receipt), so ten rapid messages
2524
+ * read as one block instead of ten stamped rows. A day boundary gets a
2525
+ * separator so a thread spanning weeks stays navigable.
2526
+ *
2527
+ * Generic over the message shape because the two consumers hold different ones —
2528
+ * the block's `DmMessage` and the ARBI app's decrypted notification rows — and
2529
+ * duplicating this logic is exactly how they drifted apart before.
2530
+ */
2531
+ /** Two messages belong to the same run when same sender and within this gap. */
2532
+ declare const RUN_WINDOW_MS: number;
2533
+ interface ThreadItem<T> {
2534
+ message: T;
2535
+ /** Last of a same-sender run: render the meta row here. */
2536
+ isLastOfRun: boolean;
2537
+ /** First message on its calendar day: render a date separator above it. */
2538
+ isFirstOfDay: boolean;
2539
+ }
2540
+ interface ThreadAccessors<T> {
2541
+ senderId: (message: T) => string;
2542
+ createdAt: (message: T) => string;
2543
+ }
2544
+ /**
2545
+ * Local calendar day for a timestamp.
2546
+ *
2547
+ * Deliberately local rather than UTC: a message sent at 23:30 in the reader's
2548
+ * zone belongs under that day's separator, not tomorrow's. Falls back to the
2549
+ * raw string for an unparseable timestamp so such a message still buckets
2550
+ * consistently with itself rather than joining an arbitrary day.
2551
+ */
2552
+ declare function dayKey(iso: string): string;
2553
+ /** Annotate messages (ascending time order) with run and day boundaries. */
2554
+ declare function annotateThread<T>(messages: T[], accessors: ThreadAccessors<T>, runWindowMs?: number): ThreadItem<T>[];
2555
+
2399
2556
  /**
2400
2557
  * Crop a region of an image to a canvas and export it — the shared engine
2401
2558
  * behind every "frame this image" surface (avatars, builder image fields, …).
@@ -2767,4 +2924,4 @@ interface ArbiUiState {
2767
2924
  }
2768
2925
  declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState>>;
2769
2926
 
2770
- 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, 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, 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, Toaster, type ToolResponses, TxtIcon, TypingIndicator, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, 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 };