@arbidocs/react 0.3.117 → 0.3.119

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
@@ -30,6 +30,8 @@ import * as SelectPrimitive from '@radix-ui/react-select';
30
30
  import { Components } from 'react-markdown';
31
31
  import * as lucide_react from 'lucide-react';
32
32
  import { LucideIcon, StickyNote } from 'lucide-react';
33
+ import { ToasterProps } from 'sonner';
34
+ export { ToasterProps, toast } from 'sonner';
33
35
  import { ClassValue } from 'clsx';
34
36
 
35
37
  interface ArbiProviderProps extends ArbiOptions {
@@ -1911,6 +1913,45 @@ interface UserEntityProps {
1911
1913
  }
1912
1914
  declare const UserEntity: React__default.NamedExoticComponent<UserEntityProps>;
1913
1915
 
1916
+ /** A status variant is an opaque string — its valid values are defined by the
1917
+ * injected Badge (or the default Badge's variants). */
1918
+ type StatusVariant = string;
1919
+ /** The shape a consumer's Badge must satisfy to be injected as the pill skin. */
1920
+ interface StatusBadgeProps {
1921
+ variant?: StatusVariant;
1922
+ className?: string;
1923
+ children?: ReactNode;
1924
+ 'data-testid'?: string;
1925
+ }
1926
+ type StatusBadgeComponent = ComponentType<StatusBadgeProps>;
1927
+ /** Register a firm's status→variant vocabulary (merged in place), and optionally
1928
+ * its fallback variant + its own Badge skin. Mirrors `configureEntityRegistry`. */
1929
+ declare function configureStatusRegistry(map: Record<string, StatusVariant>, opts?: {
1930
+ fallback?: StatusVariant;
1931
+ Badge?: StatusBadgeComponent;
1932
+ }): void;
1933
+ /** Resolve a status string to its variant (falls back to the registered default). */
1934
+ declare function getStatusVariant(status: string): StatusVariant;
1935
+ interface StatusPillProps {
1936
+ status: string;
1937
+ label?: string;
1938
+ /** Escape hatch: force a variant, skipping the registry. */
1939
+ variant?: StatusVariant;
1940
+ className?: string;
1941
+ testId?: string;
1942
+ }
1943
+ /** A status chip whose look comes from the injected Badge + registered vocabulary. */
1944
+ declare function StatusPill({ status, label, variant, className, testId }: StatusPillProps): React$1.JSX.Element;
1945
+ type Rag = 'red' | 'amber' | 'green';
1946
+ /** Override the RAG label copy (defaults are seeded so consumers stay identical). */
1947
+ declare function configureRagLabels(labels: Partial<Record<Rag, string>>): void;
1948
+ /** A small RAG dot + optional label for dense tables. Semantic tokens only. */
1949
+ declare function RagDot({ rag, withLabel, className, }: {
1950
+ rag: Rag;
1951
+ withLabel?: boolean;
1952
+ className?: string;
1953
+ }): React$1.JSX.Element;
1954
+
1914
1955
  /** An icon component usable in the registry (lucide icons + custom SVG wrappers). */
1915
1956
  type EntityIconComponent = React__default.ComponentType<React__default.SVGAttributes<SVGElement> & {
1916
1957
  size?: number | string;
@@ -2338,14 +2379,6 @@ interface ActivityFeedProps {
2338
2379
  declare function ActivityFeed({ limit, className, emptyLabel, enabled, 'data-testid': testId, }: ActivityFeedProps): React$1.JSX.Element;
2339
2380
 
2340
2381
  type NotifyVariant = 'success' | 'error' | 'info' | 'warning';
2341
- interface Toast {
2342
- id: string;
2343
- title: string;
2344
- description?: string;
2345
- variant: NotifyVariant;
2346
- /** ms before auto-dismiss; 0 keeps it until closed. */
2347
- duration: number;
2348
- }
2349
2382
  interface AppNotification {
2350
2383
  id: string;
2351
2384
  title: string;
@@ -2363,18 +2396,24 @@ interface NotifyOptions {
2363
2396
  record?: boolean;
2364
2397
  href?: string;
2365
2398
  duration?: number;
2399
+ /** A toast action button (sonner). */
2400
+ action?: {
2401
+ label: ReactNode;
2402
+ onClick: () => void;
2403
+ };
2404
+ /** Override the toast glyph (sonner). */
2405
+ icon?: ReactNode;
2366
2406
  }
2367
2407
  interface NotifyState {
2368
- toasts: Toast[];
2369
2408
  notifications: AppNotification[];
2370
- push: (variant: NotifyVariant, title: string, opts?: NotifyOptions) => string;
2371
- dismiss: (id: string) => void;
2372
2409
  markRead: (id: string) => void;
2373
2410
  markAllRead: () => void;
2374
2411
  removeNotification: (id: string) => void;
2375
2412
  clearNotifications: () => void;
2376
2413
  /** Replace the centre's history (e.g. seed a demo/initial set). */
2377
2414
  seed: (items: AppNotification[]) => void;
2415
+ /** Record a centre entry (used by `notify.*`; sonner renders the toast). */
2416
+ record: (note: AppNotification) => void;
2378
2417
  }
2379
2418
  declare const useNotify: zustand.UseBoundStore<zustand.StoreApi<NotifyState>>;
2380
2419
  declare const notify: {
@@ -2400,14 +2439,7 @@ interface NotificationBellProps {
2400
2439
  }
2401
2440
  declare function NotificationBell({ onNavigate, toneClassNames, emptyText, testId, }: NotificationBellProps): React$1.JSX.Element;
2402
2441
 
2403
- interface ToasterProps {
2404
- /** Container classes (position/offset). Default fixes it bottom-right. */
2405
- className?: string;
2406
- /** Override per-variant glyph colours (e.g. brand emerald for success). */
2407
- toneClassNames?: Partial<Record<NotifyVariant, string>>;
2408
- testId?: string;
2409
- }
2410
- declare function Toaster({ className, toneClassNames, testId }: ToasterProps): React$1.JSX.Element;
2442
+ declare function Toaster({ toastOptions, ...props }: ToasterProps): React$1.JSX.Element;
2411
2443
 
2412
2444
  /**
2413
2445
  * Direct-message view types.
@@ -2847,4 +2879,4 @@ declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState
2847
2879
 
2848
2880
  declare function cn(...inputs: ClassValue[]): string;
2849
2881
 
2850
- export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, AiMarkdown, 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, Avatar, AvatarFallback, AvatarImage, BASE_COLORS, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, ChatBubble, type ChatBubbleProps, Checkbox, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandPalette, type CommandPaletteClassNames, type CommandPaletteProps, CommandPaletteProvider, type CommandPaletteProviderProps, type CommandPaletteValue, CommandSeparator, CommandShortcut, ConversationList, type ConversationListProps, type CropArea, type CropOutput, type CropResult, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmNotification, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentEntity, type DocumentEntityProps, DocumentGallery, type DocumentGalleryProps, type DocumentLike, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENTITY_MAPPINGS, EmlIcon, EntityIcon, type EntityIconComponent, EntityPill, type EntityRegistryOverride, type EntityType, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, Input, Label, 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, PdfIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type PresenceDisplayStatus, Progress, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, RadioGroup, RadioGroupItem, type RenderMarkdown, ScrollArea, ScrollBar, type SearchChunk, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, type TagEntityProps, type TagLike, Textarea, type Toast, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToolResponses, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TxtIcon, TypingIndicator, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, arbiQueryKeys, badgeVariants, buttonVariants, cardVariants, cn, configureEntityRegistry, cropImage, describeActivity, formatRelativeTime, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, isWorkspaceNotificationType, markdownBaseComponents, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, toggleVariants, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useHealth, useMemories, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceChronology, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
2882
+ export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, AiMarkdown, 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, Avatar, AvatarFallback, AvatarImage, BASE_COLORS, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, ChatBubble, type ChatBubbleProps, Checkbox, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandPalette, type CommandPaletteClassNames, type CommandPaletteProps, CommandPaletteProvider, type CommandPaletteProviderProps, type CommandPaletteValue, CommandSeparator, CommandShortcut, ConversationList, type ConversationListProps, type CropArea, type CropOutput, type CropResult, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmNotification, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentEntity, type DocumentEntityProps, DocumentGallery, type DocumentGalleryProps, type DocumentLike, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENTITY_MAPPINGS, EmlIcon, EntityIcon, type EntityIconComponent, EntityPill, type EntityRegistryOverride, type EntityType, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, Input, Label, 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, PdfIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type PresenceDisplayStatus, Progress, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, RadioGroup, RadioGroupItem, type Rag, RagDot, type RenderMarkdown, ScrollArea, ScrollBar, type SearchChunk, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, type StatusBadgeComponent, type StatusBadgeProps, StatusPill, type StatusPillProps, type StatusVariant, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, type TagEntityProps, type TagLike, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, type ToolResponses, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TxtIcon, TypingIndicator, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, arbiQueryKeys, badgeVariants, buttonVariants, cardVariants, cn, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, describeActivity, formatRelativeTime, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, isWorkspaceNotificationType, markdownBaseComponents, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, toggleVariants, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useHealth, useMemories, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceChronology, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
package/dist/index.d.ts CHANGED
@@ -30,6 +30,8 @@ import * as SelectPrimitive from '@radix-ui/react-select';
30
30
  import { Components } from 'react-markdown';
31
31
  import * as lucide_react from 'lucide-react';
32
32
  import { LucideIcon, StickyNote } from 'lucide-react';
33
+ import { ToasterProps } from 'sonner';
34
+ export { ToasterProps, toast } from 'sonner';
33
35
  import { ClassValue } from 'clsx';
34
36
 
35
37
  interface ArbiProviderProps extends ArbiOptions {
@@ -1911,6 +1913,45 @@ interface UserEntityProps {
1911
1913
  }
1912
1914
  declare const UserEntity: React__default.NamedExoticComponent<UserEntityProps>;
1913
1915
 
1916
+ /** A status variant is an opaque string — its valid values are defined by the
1917
+ * injected Badge (or the default Badge's variants). */
1918
+ type StatusVariant = string;
1919
+ /** The shape a consumer's Badge must satisfy to be injected as the pill skin. */
1920
+ interface StatusBadgeProps {
1921
+ variant?: StatusVariant;
1922
+ className?: string;
1923
+ children?: ReactNode;
1924
+ 'data-testid'?: string;
1925
+ }
1926
+ type StatusBadgeComponent = ComponentType<StatusBadgeProps>;
1927
+ /** Register a firm's status→variant vocabulary (merged in place), and optionally
1928
+ * its fallback variant + its own Badge skin. Mirrors `configureEntityRegistry`. */
1929
+ declare function configureStatusRegistry(map: Record<string, StatusVariant>, opts?: {
1930
+ fallback?: StatusVariant;
1931
+ Badge?: StatusBadgeComponent;
1932
+ }): void;
1933
+ /** Resolve a status string to its variant (falls back to the registered default). */
1934
+ declare function getStatusVariant(status: string): StatusVariant;
1935
+ interface StatusPillProps {
1936
+ status: string;
1937
+ label?: string;
1938
+ /** Escape hatch: force a variant, skipping the registry. */
1939
+ variant?: StatusVariant;
1940
+ className?: string;
1941
+ testId?: string;
1942
+ }
1943
+ /** A status chip whose look comes from the injected Badge + registered vocabulary. */
1944
+ declare function StatusPill({ status, label, variant, className, testId }: StatusPillProps): React$1.JSX.Element;
1945
+ type Rag = 'red' | 'amber' | 'green';
1946
+ /** Override the RAG label copy (defaults are seeded so consumers stay identical). */
1947
+ declare function configureRagLabels(labels: Partial<Record<Rag, string>>): void;
1948
+ /** A small RAG dot + optional label for dense tables. Semantic tokens only. */
1949
+ declare function RagDot({ rag, withLabel, className, }: {
1950
+ rag: Rag;
1951
+ withLabel?: boolean;
1952
+ className?: string;
1953
+ }): React$1.JSX.Element;
1954
+
1914
1955
  /** An icon component usable in the registry (lucide icons + custom SVG wrappers). */
1915
1956
  type EntityIconComponent = React__default.ComponentType<React__default.SVGAttributes<SVGElement> & {
1916
1957
  size?: number | string;
@@ -2338,14 +2379,6 @@ interface ActivityFeedProps {
2338
2379
  declare function ActivityFeed({ limit, className, emptyLabel, enabled, 'data-testid': testId, }: ActivityFeedProps): React$1.JSX.Element;
2339
2380
 
2340
2381
  type NotifyVariant = 'success' | 'error' | 'info' | 'warning';
2341
- interface Toast {
2342
- id: string;
2343
- title: string;
2344
- description?: string;
2345
- variant: NotifyVariant;
2346
- /** ms before auto-dismiss; 0 keeps it until closed. */
2347
- duration: number;
2348
- }
2349
2382
  interface AppNotification {
2350
2383
  id: string;
2351
2384
  title: string;
@@ -2363,18 +2396,24 @@ interface NotifyOptions {
2363
2396
  record?: boolean;
2364
2397
  href?: string;
2365
2398
  duration?: number;
2399
+ /** A toast action button (sonner). */
2400
+ action?: {
2401
+ label: ReactNode;
2402
+ onClick: () => void;
2403
+ };
2404
+ /** Override the toast glyph (sonner). */
2405
+ icon?: ReactNode;
2366
2406
  }
2367
2407
  interface NotifyState {
2368
- toasts: Toast[];
2369
2408
  notifications: AppNotification[];
2370
- push: (variant: NotifyVariant, title: string, opts?: NotifyOptions) => string;
2371
- dismiss: (id: string) => void;
2372
2409
  markRead: (id: string) => void;
2373
2410
  markAllRead: () => void;
2374
2411
  removeNotification: (id: string) => void;
2375
2412
  clearNotifications: () => void;
2376
2413
  /** Replace the centre's history (e.g. seed a demo/initial set). */
2377
2414
  seed: (items: AppNotification[]) => void;
2415
+ /** Record a centre entry (used by `notify.*`; sonner renders the toast). */
2416
+ record: (note: AppNotification) => void;
2378
2417
  }
2379
2418
  declare const useNotify: zustand.UseBoundStore<zustand.StoreApi<NotifyState>>;
2380
2419
  declare const notify: {
@@ -2400,14 +2439,7 @@ interface NotificationBellProps {
2400
2439
  }
2401
2440
  declare function NotificationBell({ onNavigate, toneClassNames, emptyText, testId, }: NotificationBellProps): React$1.JSX.Element;
2402
2441
 
2403
- interface ToasterProps {
2404
- /** Container classes (position/offset). Default fixes it bottom-right. */
2405
- className?: string;
2406
- /** Override per-variant glyph colours (e.g. brand emerald for success). */
2407
- toneClassNames?: Partial<Record<NotifyVariant, string>>;
2408
- testId?: string;
2409
- }
2410
- declare function Toaster({ className, toneClassNames, testId }: ToasterProps): React$1.JSX.Element;
2442
+ declare function Toaster({ toastOptions, ...props }: ToasterProps): React$1.JSX.Element;
2411
2443
 
2412
2444
  /**
2413
2445
  * Direct-message view types.
@@ -2847,4 +2879,4 @@ declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState
2847
2879
 
2848
2880
  declare function cn(...inputs: ClassValue[]): string;
2849
2881
 
2850
- export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, AiMarkdown, 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, Avatar, AvatarFallback, AvatarImage, BASE_COLORS, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, ChatBubble, type ChatBubbleProps, Checkbox, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandPalette, type CommandPaletteClassNames, type CommandPaletteProps, CommandPaletteProvider, type CommandPaletteProviderProps, type CommandPaletteValue, CommandSeparator, CommandShortcut, ConversationList, type ConversationListProps, type CropArea, type CropOutput, type CropResult, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmNotification, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentEntity, type DocumentEntityProps, DocumentGallery, type DocumentGalleryProps, type DocumentLike, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENTITY_MAPPINGS, EmlIcon, EntityIcon, type EntityIconComponent, EntityPill, type EntityRegistryOverride, type EntityType, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, Input, Label, 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, PdfIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type PresenceDisplayStatus, Progress, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, RadioGroup, RadioGroupItem, type RenderMarkdown, ScrollArea, ScrollBar, type SearchChunk, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, type TagEntityProps, type TagLike, Textarea, type Toast, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToolResponses, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TxtIcon, TypingIndicator, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, arbiQueryKeys, badgeVariants, buttonVariants, cardVariants, cn, configureEntityRegistry, cropImage, describeActivity, formatRelativeTime, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, isWorkspaceNotificationType, markdownBaseComponents, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, toggleVariants, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useHealth, useMemories, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceChronology, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
2882
+ export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, AiMarkdown, 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, Avatar, AvatarFallback, AvatarImage, BASE_COLORS, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, ChatBubble, type ChatBubbleProps, Checkbox, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandPalette, type CommandPaletteClassNames, type CommandPaletteProps, CommandPaletteProvider, type CommandPaletteProviderProps, type CommandPaletteValue, CommandSeparator, CommandShortcut, ConversationList, type ConversationListProps, type CropArea, type CropOutput, type CropResult, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmNotification, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentEntity, type DocumentEntityProps, DocumentGallery, type DocumentGalleryProps, type DocumentLike, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENTITY_MAPPINGS, EmlIcon, EntityIcon, type EntityIconComponent, EntityPill, type EntityRegistryOverride, type EntityType, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, Input, Label, 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, PdfIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type PresenceDisplayStatus, Progress, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, RadioGroup, RadioGroupItem, type Rag, RagDot, type RenderMarkdown, ScrollArea, ScrollBar, type SearchChunk, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, type StatusBadgeComponent, type StatusBadgeProps, StatusPill, type StatusPillProps, type StatusVariant, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, type TagEntityProps, type TagLike, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, type ToolResponses, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TxtIcon, TypingIndicator, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, arbiQueryKeys, badgeVariants, buttonVariants, cardVariants, cn, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, describeActivity, formatRelativeTime, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, isWorkspaceNotificationType, markdownBaseComponents, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, toggleVariants, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useHealth, useMemories, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceChronology, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { Arbi, connectWithReconnect, resolveCitations, summarizeCitations } from
4
4
  export { Arbi, ArbiError } from '@arbidocs/sdk/browser';
5
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
6
  import { useQuery, useMutation, useQueries, QueryClient, QueryClientProvider, useQueryClient } from '@tanstack/react-query';
7
- import { Trash2, CheckCheck, Check, Circle, X, ChevronRight, ChevronDown, ChevronUp, Search, MoreVertical, MessageCircleMore, MessageSquareLock, Info, FileQuestion, BookOpen, Upload, LogOut, LayoutGrid, Bell, MessageSquare, CircleUserRound, Wrench, Package, ClipboardList, UserPlus, Contact, Settings2, Users, User, StickyNote, FolderPlus, Hash, EyeOff, Eye, CaptionsOff, FolderOpen, MessageSquareMore, MessageSquarePlus, MessageSquareText, MessageSquareOff, MessagesSquare, Columns3Cog, SquarePlus, SquareM, ChevronsDown, Bot, Calendar, Folder, List, SquareCheckBig, Loader2, AlertTriangle, ShieldCheck, Copy, Sparkles, FileText, GitCompareArrows, Download, Image as Image$1, CornerDownLeft, Send, Tags, Crown, Activity, Gauge, Gift, PartyPopper, UserCheck, FileX2, FileCheck2, Pencil, SquareArrowOutUpRight, XCircle, CheckCircle2, ArrowRight } from 'lucide-react';
7
+ import { Trash2, CheckCheck, Check, Circle, X, ChevronRight, ChevronDown, ChevronUp, Search, MessageCircleMore, MoreVertical, MessageSquareLock, Info, FileQuestion, BookOpen, Upload, LogOut, LayoutGrid, Bell, MessageSquare, CircleUserRound, Wrench, Package, ClipboardList, UserPlus, Contact, Settings2, Users, User, StickyNote, FolderPlus, Hash, EyeOff, Eye, CaptionsOff, FolderOpen, MessageSquareMore, MessageSquarePlus, MessageSquareText, MessageSquareOff, MessagesSquare, Columns3Cog, SquarePlus, SquareM, ChevronsDown, Bot, Calendar, Folder, List, SquareCheckBig, Loader2, AlertTriangle, ShieldCheck, Copy, Sparkles, FileText, GitCompareArrows, Download, Image as Image$1, CornerDownLeft, Send, Tags, Crown, Activity, Gauge, Gift, PartyPopper, UserCheck, FileX2, FileCheck2, Pencil, SquareArrowOutUpRight, XCircle, CheckCircle2, ArrowRight } from 'lucide-react';
8
8
  import { clsx } from 'clsx';
9
9
  import { twMerge } from 'tailwind-merge';
10
10
  import { isMessageType } from '@arbidocs/client';
@@ -36,6 +36,8 @@ import ReactMarkdown from 'react-markdown';
36
36
  import remarkGfm from 'remark-gfm';
37
37
  import rehypeRaw from 'rehype-raw';
38
38
  import { AnimatePresence, motion } from 'framer-motion';
39
+ import { Toaster as Toaster$1, toast } from 'sonner';
40
+ export { toast } from 'sonner';
39
41
  import Cropper from 'react-easy-crop';
40
42
  import { AgGridReact } from 'ag-grid-react';
41
43
  import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
@@ -5151,10 +5153,8 @@ var UserEntity = memo(function UserEntity2({
5151
5153
  );
5152
5154
  }
5153
5155
  const agentBadge = isAgent ? /* @__PURE__ */ jsx(ArbiBotHeadIcon, { className: "w-3.5 h-3.5 text-muted-foreground" }) : void 0;
5154
- const chatIcon = interactive && !isMe && !isAgent ? /* @__PURE__ */ jsxs("div", { className: "relative flex-shrink-0 ml-0.5", children: [
5155
- /* @__PURE__ */ jsx(MessageCircleMore, { className: "w-3.5 h-3.5 text-muted-foreground" }),
5156
- hasUnreadMessages && /* @__PURE__ */ jsx("div", { className: "absolute -top-1 -right-1.5 w-2 h-2 aspect-square rounded-full bg-secondary border border-background" })
5157
- ] }) : void 0;
5156
+ const canMessage = interactive && !isMe && !isAgent;
5157
+ const showUnread = hasUnreadMessages && !isMe && !isAgent;
5158
5158
  const avatarCore = /* @__PURE__ */ jsxs(
5159
5159
  Avatar,
5160
5160
  {
@@ -5181,19 +5181,20 @@ var UserEntity = memo(function UserEntity2({
5181
5181
  ]
5182
5182
  }
5183
5183
  );
5184
- const presenceDot = displayStatus && /* @__PURE__ */ jsx(
5185
- "div",
5184
+ const statusDot = showUnread || displayStatus ? /* @__PURE__ */ jsx(
5185
+ "span",
5186
5186
  {
5187
5187
  className: cn(
5188
5188
  "absolute rounded-full border-white",
5189
5189
  presenceDotClasses[size],
5190
5190
  presencePositionClasses[size],
5191
- presenceColorClasses[displayStatus]
5191
+ !showUnread && displayStatus ? presenceColorClasses[displayStatus] : ""
5192
5192
  ),
5193
+ style: showUnread ? { backgroundColor: "#00adef" } : void 0,
5193
5194
  "data-testid": "user-entity-presence"
5194
5195
  }
5195
- );
5196
- const avatarElement = displayStatus ? /* @__PURE__ */ jsxs(
5196
+ ) : null;
5197
+ const avatarElement = statusDot ? /* @__PURE__ */ jsxs(
5197
5198
  "div",
5198
5199
  {
5199
5200
  className: cn(
@@ -5203,39 +5204,61 @@ var UserEntity = memo(function UserEntity2({
5203
5204
  ),
5204
5205
  children: [
5205
5206
  avatarCore,
5206
- presenceDot
5207
+ statusDot
5207
5208
  ]
5208
5209
  }
5209
5210
  ) : /* @__PURE__ */ jsx("div", { className: cn("inline-block", variant === "pill" ? "" : className), children: avatarCore });
5211
+ const pillAvatar = /* @__PURE__ */ jsxs("span", { className: cn("relative inline-block", sizeClasses[size]), children: [
5212
+ /* @__PURE__ */ jsx("span", { className: cn("block transition-opacity", canMessage && "group-hover/pill:opacity-0"), children: avatarCore }),
5213
+ canMessage && /* @__PURE__ */ jsx(
5214
+ "span",
5215
+ {
5216
+ "aria-hidden": true,
5217
+ className: "absolute inset-0 flex items-center justify-center rounded-full bg-muted text-foreground opacity-0 transition-opacity group-hover/pill:opacity-100",
5218
+ children: /* @__PURE__ */ jsx(MessageCircleMore, { className: size === "xs" ? "h-3 w-3" : "h-4 w-4" })
5219
+ }
5220
+ ),
5221
+ statusDot
5222
+ ] });
5210
5223
  const resolvedTooltip = showTooltip ? tooltipContent : void 0;
5211
5224
  if (variant === "pill") {
5212
- if (!interactive) {
5225
+ const row = /* @__PURE__ */ jsxs(Fragment, { children: [
5226
+ pillAvatar,
5227
+ displayName && /* @__PURE__ */ jsx("span", { className: "min-w-0 max-w-[320px] truncate text-sm leading-tight", children: displayName }),
5228
+ agentBadge
5229
+ ] });
5230
+ const rowClass = "group/pill inline-flex min-w-0 items-center gap-2";
5231
+ const clickable = interactive && !!onClick;
5232
+ const clickableClass = "cursor-pointer rounded-md px-1 py-0.5 -mx-1 transition-colors hover:bg-muted/60";
5233
+ if (resolvedTooltip) {
5234
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
5235
+ /* @__PURE__ */ jsx(
5236
+ TooltipTrigger,
5237
+ {
5238
+ type: "button",
5239
+ onClick: clickable ? onClick : void 0,
5240
+ onFocusCapture: (e) => e.stopPropagation(),
5241
+ className: cn(rowClass, clickable && clickableClass, className),
5242
+ "data-testid": "user-entity-pill",
5243
+ children: row
5244
+ }
5245
+ ),
5246
+ /* @__PURE__ */ jsx(TooltipContent, { className: "p-2", children: resolvedTooltip })
5247
+ ] });
5248
+ }
5249
+ if (clickable) {
5213
5250
  return /* @__PURE__ */ jsx(
5214
- EntityPill,
5251
+ "button",
5215
5252
  {
5216
- icon: avatarElement,
5217
- label: displayName,
5218
- secondaryText: agentBadge,
5219
- shape: "pill",
5220
- tooltipContent: resolvedTooltip,
5221
- className,
5222
- "data-testid": "user-entity-pill"
5253
+ type: "button",
5254
+ onClick,
5255
+ className: cn(rowClass, clickableClass, className),
5256
+ "data-testid": "user-entity-pill",
5257
+ children: row
5223
5258
  }
5224
5259
  );
5225
5260
  }
5226
- return /* @__PURE__ */ jsx(
5227
- EntityPill,
5228
- {
5229
- icon: avatarElement,
5230
- label: displayName,
5231
- secondaryText: chatIcon || agentBadge,
5232
- shape: "pill",
5233
- onClick,
5234
- tooltipContent: resolvedTooltip,
5235
- className,
5236
- "data-testid": "user-entity-pill"
5237
- }
5238
- );
5261
+ return /* @__PURE__ */ jsx("span", { className: cn(rowClass, className), "data-testid": "user-entity-pill", children: row });
5239
5262
  }
5240
5263
  if (showTooltip) {
5241
5264
  return /* @__PURE__ */ jsxs(Tooltip, { children: [
@@ -5245,6 +5268,51 @@ var UserEntity = memo(function UserEntity2({
5245
5268
  }
5246
5269
  return avatarElement;
5247
5270
  });
5271
+ var PACKAGE_BADGE_VARIANTS = [
5272
+ "default",
5273
+ "accent",
5274
+ "secondary",
5275
+ "destructive",
5276
+ "outline"
5277
+ ];
5278
+ function isPackageBadgeVariant(v) {
5279
+ return PACKAGE_BADGE_VARIANTS.some((known) => known === v);
5280
+ }
5281
+ function PackageStatusBadge({ variant, ...rest }) {
5282
+ return /* @__PURE__ */ jsx(Badge, { variant: isPackageBadgeVariant(variant) ? variant : "outline", ...rest });
5283
+ }
5284
+ var registry = {
5285
+ variants: {},
5286
+ fallback: "outline",
5287
+ Badge: PackageStatusBadge
5288
+ };
5289
+ function configureStatusRegistry(map, opts) {
5290
+ Object.assign(registry.variants, map);
5291
+ if (opts?.fallback) registry.fallback = opts.fallback;
5292
+ if (opts?.Badge) registry.Badge = opts.Badge;
5293
+ }
5294
+ function getStatusVariant(status) {
5295
+ return registry.variants[status] ?? registry.fallback;
5296
+ }
5297
+ function StatusPill({ status, label, variant, className, testId }) {
5298
+ const Badge2 = registry.Badge;
5299
+ return /* @__PURE__ */ jsx(Badge2, { variant: variant ?? getStatusVariant(status), className, "data-testid": testId, children: label ?? status });
5300
+ }
5301
+ var RAG_LABELS = { red: "At risk", amber: "Attention", green: "On track" };
5302
+ function configureRagLabels(labels) {
5303
+ RAG_LABELS = { ...RAG_LABELS, ...labels };
5304
+ }
5305
+ function RagDot({
5306
+ rag,
5307
+ withLabel,
5308
+ className
5309
+ }) {
5310
+ const color = rag === "red" ? "bg-destructive" : rag === "amber" ? "bg-warning" : "bg-success";
5311
+ return /* @__PURE__ */ jsxs("span", { className: cn("inline-flex items-center gap-1.5", className), "data-testid": `rag-${rag}`, children: [
5312
+ /* @__PURE__ */ jsx("span", { className: cn("size-2 rounded-full", color) }),
5313
+ withLabel && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: RAG_LABELS[rag] })
5314
+ ] });
5315
+ }
5248
5316
  var ENTITY_MAPPINGS = {
5249
5317
  PRODUCT: {
5250
5318
  NAMES: {
@@ -5742,41 +5810,38 @@ function ActivityFeed({
5742
5810
  var seq = 0;
5743
5811
  var uid = () => `n${Date.now().toString(36)}${(seq++).toString(36)}`;
5744
5812
  var useNotify = create((set) => ({
5745
- toasts: [],
5746
5813
  notifications: [],
5747
- push: (variant, title, opts = {}) => {
5748
- const id = uid();
5749
- const duration = opts.duration ?? (variant === "error" ? 7e3 : 4500);
5750
- set((s) => {
5751
- const toast = { id, title, description: opts.description, variant, duration };
5752
- const next = { toasts: [...s.toasts, toast] };
5753
- if (opts.record !== false) {
5754
- const note = {
5755
- id,
5756
- title,
5757
- description: opts.description,
5758
- variant,
5759
- ts: Date.now(),
5760
- read: false,
5761
- href: opts.href
5762
- };
5763
- next.notifications = [note, ...s.notifications].slice(0, 50);
5764
- }
5765
- return next;
5766
- });
5767
- return id;
5768
- },
5769
- dismiss: (id) => set((s) => ({ toasts: s.toasts.filter((t) => t.id !== id) })),
5770
5814
  markRead: (id) => set((s) => ({
5771
5815
  notifications: s.notifications.map((n) => n.id === id ? { ...n, read: true } : n)
5772
5816
  })),
5773
5817
  markAllRead: () => set((s) => ({ notifications: s.notifications.map((n) => ({ ...n, read: true })) })),
5774
5818
  removeNotification: (id) => set((s) => ({ notifications: s.notifications.filter((n) => n.id !== id) })),
5775
5819
  clearNotifications: () => set({ notifications: [] }),
5776
- seed: (items) => set({ notifications: items })
5820
+ seed: (items) => set({ notifications: items }),
5821
+ record: (note) => set((s) => ({ notifications: [note, ...s.notifications].slice(0, 50) }))
5777
5822
  }));
5778
5823
  function make(variant) {
5779
- return (title, opts) => useNotify.getState().push(variant, title, opts);
5824
+ return (title, opts = {}) => {
5825
+ toast[variant](title, {
5826
+ description: opts.description,
5827
+ duration: opts.duration,
5828
+ action: opts.action,
5829
+ icon: opts.icon
5830
+ });
5831
+ const id = uid();
5832
+ if (opts.record !== false) {
5833
+ useNotify.getState().record({
5834
+ id,
5835
+ title,
5836
+ description: opts.description,
5837
+ variant,
5838
+ ts: Date.now(),
5839
+ read: false,
5840
+ href: opts.href
5841
+ });
5842
+ }
5843
+ return id;
5844
+ };
5780
5845
  }
5781
5846
  var notify = {
5782
5847
  success: make("success"),
@@ -5913,69 +5978,21 @@ function NotificationBell({
5913
5978
  ] })
5914
5979
  ] });
5915
5980
  }
5916
- var GLYPH2 = {
5917
- success: CheckCircle2,
5918
- error: XCircle,
5919
- warning: AlertTriangle,
5920
- info: Info
5981
+ var DEFAULT_TOAST_OPTIONS = {
5982
+ classNames: {
5983
+ toast: "group toast group-[.toaster]:bg-card group-[.toaster]:text-foreground group-[.toaster]:border group-[.toaster]:border-border group-[.toaster]:shadow-lg group-[.toaster]:rounded-lg",
5984
+ description: "group-[.toast]:text-muted-foreground",
5985
+ actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
5986
+ cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
5987
+ }
5921
5988
  };
5922
- function Toaster({ className, toneClassNames, testId = "toaster" }) {
5923
- const toasts = useNotify((s) => s.toasts);
5989
+ function Toaster({ toastOptions, ...props }) {
5924
5990
  return /* @__PURE__ */ jsx(
5925
- "div",
5991
+ Toaster$1,
5926
5992
  {
5927
- className: cn(
5928
- "pointer-events-none fixed bottom-4 right-4 z-[100] flex w-[min(92vw,380px)] flex-col gap-2.5",
5929
- className
5930
- ),
5931
- "data-testid": testId,
5932
- "aria-live": "polite",
5933
- "aria-atomic": "false",
5934
- children: /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: toasts.map((t) => /* @__PURE__ */ jsx(ToastCard, { toast: t, toneClassNames }, t.id)) })
5935
- }
5936
- );
5937
- }
5938
- function ToastCard({
5939
- toast,
5940
- toneClassNames
5941
- }) {
5942
- const dismiss = useNotify((s) => s.dismiss);
5943
- const Glyph = GLYPH2[toast.variant];
5944
- const tone = toneClassNames?.[toast.variant] ?? DEFAULT_NOTIFY_TONE[toast.variant];
5945
- useEffect(() => {
5946
- if (!toast.duration) return;
5947
- const timer = setTimeout(() => dismiss(toast.id), toast.duration);
5948
- return () => clearTimeout(timer);
5949
- }, [toast.id, toast.duration, dismiss]);
5950
- return /* @__PURE__ */ jsxs(
5951
- motion.div,
5952
- {
5953
- layout: true,
5954
- initial: { opacity: 0, y: 16, scale: 0.97 },
5955
- animate: { opacity: 1, y: 0, scale: 1 },
5956
- exit: { opacity: 0, x: 24, scale: 0.97, transition: { duration: 0.18 } },
5957
- transition: { type: "spring", stiffness: 380, damping: 30 },
5958
- className: "pointer-events-auto flex items-start gap-3 rounded-lg border border-border bg-card p-3.5 shadow-lg",
5959
- "data-testid": `toast-${toast.variant}`,
5960
- "data-toast": "",
5961
- role: toast.variant === "error" ? "alert" : "status",
5962
- children: [
5963
- /* @__PURE__ */ jsx(Glyph, { className: cn("mt-0.5 size-[18px] shrink-0", tone) }),
5964
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
5965
- /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold leading-snug text-foreground", children: toast.title }),
5966
- toast.description && /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs leading-relaxed text-muted-foreground", children: toast.description })
5967
- ] }),
5968
- /* @__PURE__ */ jsx(
5969
- "button",
5970
- {
5971
- onClick: () => dismiss(toast.id),
5972
- className: "shrink-0 rounded p-0.5 text-muted-foreground/70 transition-colors hover:bg-accent hover:text-foreground",
5973
- "aria-label": "Dismiss",
5974
- "data-testid": "toast-dismiss",
5975
- children: /* @__PURE__ */ jsx(X, { className: "size-4" })
5976
- }
5977
- )
5978
- ]
5993
+ className: "toaster group",
5994
+ toastOptions: toastOptions ?? DEFAULT_TOAST_OPTIONS,
5995
+ ...props
5979
5996
  }
5980
5997
  );
5981
5998
  }
@@ -7314,6 +7331,6 @@ function DocumentReview({
7314
7331
  );
7315
7332
  }
7316
7333
 
7317
- export { ActivityFeed, AiActionCard, AiAnswer, AiMarkdown, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, ArbiChatPanel, ArbiIcon, ArbiProvider, ArbiWebSocketProvider, ArtifactCanvas, AudIcon, Avatar, AvatarFallback, AvatarImage, BASE_COLORS2 as BASE_COLORS, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatBubble, Checkbox, CitationRenderer, ClaudeIcon, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandPalette, CommandPaletteProvider, CommandSeparator, CommandShortcut, ConversationList, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectMessages, DmAvatar, DmComposer, DocIcon, DocQaPanel, DocSearch, DocumentEntity, DocumentGallery, DocumentReview, DocumentTable, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, ImageCropModal, ImageCropper, ImgIcon, Input, Label, LinkedInIcon, MessageArtifactCard, MessageBubble2 as MessageBubble, MessageThread, NEUTRAL_GRAY2 as NEUTRAL_GRAY, NotificationBell, OpenAIIcon, PLACEHOLDER_COLOR, PdfIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ProjectEntity, ProviderIcon, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TxtIcon, TypingIndicator, UserEntity, UserMenu, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, arbiQueryKeys, badgeVariants, buttonVariants, cardVariants, cn, configureEntityRegistry, cropImage, describeActivity, formatRelativeTime, getEntityColor2 as getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, isWorkspaceNotificationType, markdownBaseComponents, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, toggleVariants, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useHealth, useMemories, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceChronology, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
7334
+ export { ActivityFeed, AiActionCard, AiAnswer, AiMarkdown, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, ArbiChatPanel, ArbiIcon, ArbiProvider, ArbiWebSocketProvider, ArtifactCanvas, AudIcon, Avatar, AvatarFallback, AvatarImage, BASE_COLORS2 as BASE_COLORS, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatBubble, Checkbox, CitationRenderer, ClaudeIcon, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandPalette, CommandPaletteProvider, CommandSeparator, CommandShortcut, ConversationList, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectMessages, DmAvatar, DmComposer, DocIcon, DocQaPanel, DocSearch, DocumentEntity, DocumentGallery, DocumentReview, DocumentTable, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, ImageCropModal, ImageCropper, ImgIcon, Input, Label, LinkedInIcon, MessageArtifactCard, MessageBubble2 as MessageBubble, MessageThread, NEUTRAL_GRAY2 as NEUTRAL_GRAY, NotificationBell, OpenAIIcon, PLACEHOLDER_COLOR, PdfIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ProjectEntity, ProviderIcon, RadioGroup, RadioGroupItem, RagDot, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, StatusPill, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TxtIcon, TypingIndicator, UserEntity, UserMenu, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, arbiQueryKeys, badgeVariants, buttonVariants, cardVariants, cn, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, describeActivity, formatRelativeTime, getEntityColor2 as getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, isWorkspaceNotificationType, markdownBaseComponents, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, toggleVariants, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useHealth, useMemories, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceChronology, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
7318
7335
  //# sourceMappingURL=index.js.map
7319
7336
  //# sourceMappingURL=index.js.map