@arbidocs/react 0.3.148 → 0.3.149

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
 
@@ -2297,6 +2312,26 @@ interface DmConversation {
2297
2312
  * existing thread — i.e. a colleague ready to message but with no history yet.
2298
2313
  */
2299
2314
  isContactOnly?: boolean;
2315
+ /**
2316
+ * Shown in place of the unread count for a row that is not a live
2317
+ * conversation — an invitation still pending, or one that has expired. The
2318
+ * caller supplies the wording; the kit has no notion of invite states.
2319
+ */
2320
+ statusLabel?: string;
2321
+ /** Not selectable: there is no thread behind it yet. */
2322
+ disabled?: boolean;
2323
+ /** Replaces the message preview — e.g. an email, where there is no message. */
2324
+ subtitle?: string;
2325
+ /** Replaces the avatar, for a row that stands for someone with no account. */
2326
+ leading?: React.ReactNode;
2327
+ /** Controls pinned to the row's end, for rows that aren't openable. */
2328
+ trailing?: React.ReactNode;
2329
+ /**
2330
+ * Groups the row under a heading. The heading renders once, above the first
2331
+ * row that carries it, so a list can hold more than one kind of thing without
2332
+ * them interleaving.
2333
+ */
2334
+ sectionLabel?: string;
2300
2335
  }
2301
2336
 
2302
2337
  interface DirectMessagesProps {
@@ -2318,33 +2353,72 @@ interface ConversationListProps {
2318
2353
  classNames?: Pick<DmClassNames, 'unreadBadge'>;
2319
2354
  /** Rendered when there are no conversations. */
2320
2355
  emptyState?: React.ReactNode;
2356
+ /**
2357
+ * Replaces the default "Conversations / N colleagues" heading — e.g. with a
2358
+ * call to action. Pass `null` for no heading at all.
2359
+ */
2360
+ header?: React.ReactNode;
2361
+ /**
2362
+ * Overrides the rail's own sizing. The default is a fixed-width column beside
2363
+ * a thread; a consumer showing the list on its own needs it to fill instead,
2364
+ * and cannot get there by wrapping (a narrower wrapper clips rather than
2365
+ * shrinks).
2366
+ */
2367
+ className?: string;
2321
2368
  }
2322
- declare function ConversationList({ conversations, selectedPeerId, onSelect, classNames, emptyState, }: ConversationListProps): React$1.JSX.Element;
2369
+ declare function ConversationList({ conversations, selectedPeerId, onSelect, classNames, emptyState, header, className, }: ConversationListProps): React$1.JSX.Element;
2323
2370
 
2324
2371
  interface MessageThreadProps {
2325
2372
  conversation: DmConversation | null;
2326
2373
  classNames?: Pick<DmClassNames, 'ownBubble' | 'peerBubble'>;
2327
2374
  emptyState?: React.ReactNode;
2375
+ /**
2376
+ * Label for a day divider. Omit to leave the thread undivided — the kit does
2377
+ * not format dates itself (see DateSeparator).
2378
+ */
2379
+ formatDay?: (iso: string) => string;
2380
+ /** Deletes a message. Omit to hide the affordance. */
2381
+ onDeleteMessage?: (message: DmMessage) => void;
2382
+ /** External ids of messages already deleted, rendered as tombstones. */
2383
+ deletedIds?: ReadonlySet<string>;
2328
2384
  }
2329
- declare function MessageThread({ conversation, classNames, emptyState }: MessageThreadProps): React$1.JSX.Element;
2385
+ declare function MessageThread({ conversation, classNames, emptyState, formatDay, onDeleteMessage, deletedIds, }: MessageThreadProps): React$1.JSX.Element;
2330
2386
 
2331
2387
  interface MessageBubbleProps {
2332
2388
  message: DmMessage;
2333
2389
  classNames?: Pick<DmClassNames, 'ownBubble' | 'peerBubble'>;
2390
+ /**
2391
+ * False when the next message is from the same sender in the same run, which
2392
+ * suppresses the meta row so a burst reads as one block. Defaults to true —
2393
+ * every message carries its own sender, time and receipt.
2394
+ */
2395
+ isLastOfRun?: boolean;
2396
+ /** Deletes this message. Omit to hide the affordance. */
2397
+ onDelete?: () => void;
2398
+ /** Renders the tombstone in place of the body. */
2399
+ deleted?: boolean;
2334
2400
  }
2335
- declare function MessageBubble({ message, classNames }: MessageBubbleProps): React$1.JSX.Element;
2401
+ declare function MessageBubble({ message, classNames, isLastOfRun, onDelete, deleted, }: MessageBubbleProps): React$1.JSX.Element;
2336
2402
 
2337
2403
  interface DmComposerProps {
2338
2404
  /** Placeholder, e.g. "Message Eleanor…". */
2339
2405
  placeholder?: string;
2340
2406
  disabled?: boolean;
2407
+ /**
2408
+ * A send is in flight: swaps the icon for a spinner and blocks a second
2409
+ * submit, so a slow encrypt-and-post can't be fired twice by an impatient
2410
+ * Enter.
2411
+ */
2412
+ busy?: boolean;
2341
2413
  /** Called with the trimmed text when the user sends. May reject if the send fails. */
2342
2414
  onSend: (text: string) => void | Promise<void>;
2343
2415
  /** Shown under the box when the last send failed. */
2344
2416
  error?: string | null;
2417
+ /** Extra content between the box and the border (e.g. a peer-specific action). */
2418
+ children?: React.ReactNode;
2345
2419
  classNames?: Pick<DmClassNames, 'sendButton'>;
2346
2420
  }
2347
- declare function DmComposer({ placeholder, disabled, onSend, error, classNames }: DmComposerProps): React$1.JSX.Element;
2421
+ declare function DmComposer({ placeholder, disabled, busy, onSend, error, children, classNames, }: DmComposerProps): React$1.JSX.Element;
2348
2422
 
2349
2423
  interface DmAvatarProps {
2350
2424
  user: DmUser;
@@ -2396,6 +2470,48 @@ declare function userDisplayName(user: Pick<DmUser, 'given_name' | 'family_name'
2396
2470
  /** Compact relative time, e.g. "2 hours ago", "just now". */
2397
2471
  declare function formatRelativeTime(iso: string): string;
2398
2472
 
2473
+ interface DateSeparatorProps {
2474
+ children: ReactNode;
2475
+ }
2476
+ declare function DateSeparator({ children }: DateSeparatorProps): React$1.JSX.Element;
2477
+
2478
+ /**
2479
+ * Thread grouping: the two annotations a readable message list needs.
2480
+ *
2481
+ * A run is a burst from one sender close together in time; only its last
2482
+ * message carries the meta row (sender, time, receipt), so ten rapid messages
2483
+ * read as one block instead of ten stamped rows. A day boundary gets a
2484
+ * separator so a thread spanning weeks stays navigable.
2485
+ *
2486
+ * Generic over the message shape because the two consumers hold different ones —
2487
+ * the block's `DmMessage` and the ARBI app's decrypted notification rows — and
2488
+ * duplicating this logic is exactly how they drifted apart before.
2489
+ */
2490
+ /** Two messages belong to the same run when same sender and within this gap. */
2491
+ declare const RUN_WINDOW_MS: number;
2492
+ interface ThreadItem<T> {
2493
+ message: T;
2494
+ /** Last of a same-sender run: render the meta row here. */
2495
+ isLastOfRun: boolean;
2496
+ /** First message on its calendar day: render a date separator above it. */
2497
+ isFirstOfDay: boolean;
2498
+ }
2499
+ interface ThreadAccessors<T> {
2500
+ senderId: (message: T) => string;
2501
+ createdAt: (message: T) => string;
2502
+ }
2503
+ /**
2504
+ * Local calendar day for a timestamp.
2505
+ *
2506
+ * Deliberately local rather than UTC: a message sent at 23:30 in the reader's
2507
+ * zone belongs under that day's separator, not tomorrow's. Falls back to the
2508
+ * raw string for an unparseable timestamp so such a message still buckets
2509
+ * consistently with itself rather than joining an arbitrary day.
2510
+ */
2511
+ declare function dayKey(iso: string): string;
2512
+ /** Annotate messages (ascending time order) with run and day boundaries. */
2513
+ declare function annotateThread<T>(messages: T[], accessors: ThreadAccessors<T>, runWindowMs?: number): ThreadItem<T>[];
2514
+
2399
2515
  /**
2400
2516
  * Crop a region of an image to a canvas and export it — the shared engine
2401
2517
  * behind every "frame this image" surface (avatars, builder image fields, …).
@@ -2767,4 +2883,4 @@ interface ArbiUiState {
2767
2883
  }
2768
2884
  declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState>>;
2769
2885
 
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 };
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 };
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
 
@@ -2297,6 +2312,26 @@ interface DmConversation {
2297
2312
  * existing thread — i.e. a colleague ready to message but with no history yet.
2298
2313
  */
2299
2314
  isContactOnly?: boolean;
2315
+ /**
2316
+ * Shown in place of the unread count for a row that is not a live
2317
+ * conversation — an invitation still pending, or one that has expired. The
2318
+ * caller supplies the wording; the kit has no notion of invite states.
2319
+ */
2320
+ statusLabel?: string;
2321
+ /** Not selectable: there is no thread behind it yet. */
2322
+ disabled?: boolean;
2323
+ /** Replaces the message preview — e.g. an email, where there is no message. */
2324
+ subtitle?: string;
2325
+ /** Replaces the avatar, for a row that stands for someone with no account. */
2326
+ leading?: React.ReactNode;
2327
+ /** Controls pinned to the row's end, for rows that aren't openable. */
2328
+ trailing?: React.ReactNode;
2329
+ /**
2330
+ * Groups the row under a heading. The heading renders once, above the first
2331
+ * row that carries it, so a list can hold more than one kind of thing without
2332
+ * them interleaving.
2333
+ */
2334
+ sectionLabel?: string;
2300
2335
  }
2301
2336
 
2302
2337
  interface DirectMessagesProps {
@@ -2318,33 +2353,72 @@ interface ConversationListProps {
2318
2353
  classNames?: Pick<DmClassNames, 'unreadBadge'>;
2319
2354
  /** Rendered when there are no conversations. */
2320
2355
  emptyState?: React.ReactNode;
2356
+ /**
2357
+ * Replaces the default "Conversations / N colleagues" heading — e.g. with a
2358
+ * call to action. Pass `null` for no heading at all.
2359
+ */
2360
+ header?: React.ReactNode;
2361
+ /**
2362
+ * Overrides the rail's own sizing. The default is a fixed-width column beside
2363
+ * a thread; a consumer showing the list on its own needs it to fill instead,
2364
+ * and cannot get there by wrapping (a narrower wrapper clips rather than
2365
+ * shrinks).
2366
+ */
2367
+ className?: string;
2321
2368
  }
2322
- declare function ConversationList({ conversations, selectedPeerId, onSelect, classNames, emptyState, }: ConversationListProps): React$1.JSX.Element;
2369
+ declare function ConversationList({ conversations, selectedPeerId, onSelect, classNames, emptyState, header, className, }: ConversationListProps): React$1.JSX.Element;
2323
2370
 
2324
2371
  interface MessageThreadProps {
2325
2372
  conversation: DmConversation | null;
2326
2373
  classNames?: Pick<DmClassNames, 'ownBubble' | 'peerBubble'>;
2327
2374
  emptyState?: React.ReactNode;
2375
+ /**
2376
+ * Label for a day divider. Omit to leave the thread undivided — the kit does
2377
+ * not format dates itself (see DateSeparator).
2378
+ */
2379
+ formatDay?: (iso: string) => string;
2380
+ /** Deletes a message. Omit to hide the affordance. */
2381
+ onDeleteMessage?: (message: DmMessage) => void;
2382
+ /** External ids of messages already deleted, rendered as tombstones. */
2383
+ deletedIds?: ReadonlySet<string>;
2328
2384
  }
2329
- declare function MessageThread({ conversation, classNames, emptyState }: MessageThreadProps): React$1.JSX.Element;
2385
+ declare function MessageThread({ conversation, classNames, emptyState, formatDay, onDeleteMessage, deletedIds, }: MessageThreadProps): React$1.JSX.Element;
2330
2386
 
2331
2387
  interface MessageBubbleProps {
2332
2388
  message: DmMessage;
2333
2389
  classNames?: Pick<DmClassNames, 'ownBubble' | 'peerBubble'>;
2390
+ /**
2391
+ * False when the next message is from the same sender in the same run, which
2392
+ * suppresses the meta row so a burst reads as one block. Defaults to true —
2393
+ * every message carries its own sender, time and receipt.
2394
+ */
2395
+ isLastOfRun?: boolean;
2396
+ /** Deletes this message. Omit to hide the affordance. */
2397
+ onDelete?: () => void;
2398
+ /** Renders the tombstone in place of the body. */
2399
+ deleted?: boolean;
2334
2400
  }
2335
- declare function MessageBubble({ message, classNames }: MessageBubbleProps): React$1.JSX.Element;
2401
+ declare function MessageBubble({ message, classNames, isLastOfRun, onDelete, deleted, }: MessageBubbleProps): React$1.JSX.Element;
2336
2402
 
2337
2403
  interface DmComposerProps {
2338
2404
  /** Placeholder, e.g. "Message Eleanor…". */
2339
2405
  placeholder?: string;
2340
2406
  disabled?: boolean;
2407
+ /**
2408
+ * A send is in flight: swaps the icon for a spinner and blocks a second
2409
+ * submit, so a slow encrypt-and-post can't be fired twice by an impatient
2410
+ * Enter.
2411
+ */
2412
+ busy?: boolean;
2341
2413
  /** Called with the trimmed text when the user sends. May reject if the send fails. */
2342
2414
  onSend: (text: string) => void | Promise<void>;
2343
2415
  /** Shown under the box when the last send failed. */
2344
2416
  error?: string | null;
2417
+ /** Extra content between the box and the border (e.g. a peer-specific action). */
2418
+ children?: React.ReactNode;
2345
2419
  classNames?: Pick<DmClassNames, 'sendButton'>;
2346
2420
  }
2347
- declare function DmComposer({ placeholder, disabled, onSend, error, classNames }: DmComposerProps): React$1.JSX.Element;
2421
+ declare function DmComposer({ placeholder, disabled, busy, onSend, error, children, classNames, }: DmComposerProps): React$1.JSX.Element;
2348
2422
 
2349
2423
  interface DmAvatarProps {
2350
2424
  user: DmUser;
@@ -2396,6 +2470,48 @@ declare function userDisplayName(user: Pick<DmUser, 'given_name' | 'family_name'
2396
2470
  /** Compact relative time, e.g. "2 hours ago", "just now". */
2397
2471
  declare function formatRelativeTime(iso: string): string;
2398
2472
 
2473
+ interface DateSeparatorProps {
2474
+ children: ReactNode;
2475
+ }
2476
+ declare function DateSeparator({ children }: DateSeparatorProps): React$1.JSX.Element;
2477
+
2478
+ /**
2479
+ * Thread grouping: the two annotations a readable message list needs.
2480
+ *
2481
+ * A run is a burst from one sender close together in time; only its last
2482
+ * message carries the meta row (sender, time, receipt), so ten rapid messages
2483
+ * read as one block instead of ten stamped rows. A day boundary gets a
2484
+ * separator so a thread spanning weeks stays navigable.
2485
+ *
2486
+ * Generic over the message shape because the two consumers hold different ones —
2487
+ * the block's `DmMessage` and the ARBI app's decrypted notification rows — and
2488
+ * duplicating this logic is exactly how they drifted apart before.
2489
+ */
2490
+ /** Two messages belong to the same run when same sender and within this gap. */
2491
+ declare const RUN_WINDOW_MS: number;
2492
+ interface ThreadItem<T> {
2493
+ message: T;
2494
+ /** Last of a same-sender run: render the meta row here. */
2495
+ isLastOfRun: boolean;
2496
+ /** First message on its calendar day: render a date separator above it. */
2497
+ isFirstOfDay: boolean;
2498
+ }
2499
+ interface ThreadAccessors<T> {
2500
+ senderId: (message: T) => string;
2501
+ createdAt: (message: T) => string;
2502
+ }
2503
+ /**
2504
+ * Local calendar day for a timestamp.
2505
+ *
2506
+ * Deliberately local rather than UTC: a message sent at 23:30 in the reader's
2507
+ * zone belongs under that day's separator, not tomorrow's. Falls back to the
2508
+ * raw string for an unparseable timestamp so such a message still buckets
2509
+ * consistently with itself rather than joining an arbitrary day.
2510
+ */
2511
+ declare function dayKey(iso: string): string;
2512
+ /** Annotate messages (ascending time order) with run and day boundaries. */
2513
+ declare function annotateThread<T>(messages: T[], accessors: ThreadAccessors<T>, runWindowMs?: number): ThreadItem<T>[];
2514
+
2399
2515
  /**
2400
2516
  * Crop a region of an image to a canvas and export it — the shared engine
2401
2517
  * behind every "frame this image" surface (avatars, builder image fields, …).
@@ -2767,4 +2883,4 @@ interface ArbiUiState {
2767
2883
  }
2768
2884
  declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState>>;
2769
2885
 
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 };
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 };