@arbidocs/react 0.3.184 → 0.4.0

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.
Files changed (41) hide show
  1. package/dist/chunk-3CLGHHME.js +3882 -0
  2. package/dist/chunk-3CLGHHME.js.map +1 -0
  3. package/dist/chunk-6ALMBER7.js +176 -0
  4. package/dist/chunk-6ALMBER7.js.map +1 -0
  5. package/dist/chunk-BXP6S34V.cjs +284 -0
  6. package/dist/chunk-BXP6S34V.cjs.map +1 -0
  7. package/dist/chunk-EJ2BMHYK.js +272 -0
  8. package/dist/chunk-EJ2BMHYK.js.map +1 -0
  9. package/dist/chunk-OU2QLIKS.cjs +4060 -0
  10. package/dist/chunk-OU2QLIKS.cjs.map +1 -0
  11. package/dist/chunk-RZQACYNQ.cjs +218 -0
  12. package/dist/chunk-RZQACYNQ.cjs.map +1 -0
  13. package/dist/index-CcbVSNSP.d.cts +116 -0
  14. package/dist/index-CcbVSNSP.d.ts +116 -0
  15. package/dist/index.cjs +955 -2796
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +13 -901
  18. package/dist/index.d.ts +13 -901
  19. package/dist/index.js +312 -2303
  20. package/dist/index.js.map +1 -1
  21. package/dist/shell/index.cjs +29 -0
  22. package/dist/shell/index.cjs.map +1 -0
  23. package/dist/shell/index.d.cts +4 -0
  24. package/dist/shell/index.d.ts +4 -0
  25. package/dist/shell/index.js +4 -0
  26. package/dist/shell/index.js.map +1 -0
  27. package/dist/ui/index.cjs +288 -147
  28. package/dist/ui/index.d.cts +878 -3
  29. package/dist/ui/index.d.ts +878 -3
  30. package/dist/ui/index.js +2 -1
  31. package/dist/viewers/index.cjs +327 -76
  32. package/dist/viewers/index.cjs.map +1 -1
  33. package/dist/viewers/index.d.cts +90 -4
  34. package/dist/viewers/index.d.ts +90 -4
  35. package/dist/viewers/index.js +316 -78
  36. package/dist/viewers/index.js.map +1 -1
  37. package/package.json +12 -3
  38. package/dist/chunk-FIPS3VPH.cjs +0 -1975
  39. package/dist/chunk-FIPS3VPH.cjs.map +0 -1
  40. package/dist/chunk-I256BUCX.js +0 -1819
  41. package/dist/chunk-I256BUCX.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -7,13 +7,13 @@ import { WebSocketServerMessage, WsTaskUpdateMessage, WsPresenceUpdateMessage, c
7
7
  export { WebSocketServerMessage, WsBatchCompleteMessage, WsNotificationResponse, WsPresenceUpdateMessage, WsResponseCompleteMessage, WsTaskUpdateMessage, isMessageType } from '@arbidocs/client';
8
8
  import * as zustand from 'zustand';
9
9
  import * as _tanstack_react_query from '@tanstack/react-query';
10
- export { AiMarkdown, Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardProps, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DictateContextValue, DictateProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCard, HoverCardContent, HoverCardTrigger, IconToggle, IconToggleProps, Input, InputProps, Label, MarkdownRenderer, MarkdownRendererProps, MarkdownStreamingContext, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TextareaProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, markdownBaseComponents, splitMarkdownBlocks, toggleVariants } from './ui/index.js';
11
- import * as lucide_react from 'lucide-react';
12
- import { LucideIcon, StickyNote } from 'lucide-react';
10
+ import { EntityIconComponent } from './ui/index.js';
11
+ export { AgentBadge, AiMarkdown, Avatar, AvatarFallback, AvatarImage, BASE_COLORS, Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardProps, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogPresentation, DialogTitle, DialogTrigger, DictateContextValue, DictateProvider, DocumentCard, DocumentCardProps, DocumentEntity, DocumentEntityProps, DocumentLike, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENTITY_MAPPINGS, EntityIcon, EntityPill, EntityRegistryOverride, EntityType, HoverCard, HoverCardContent, HoverCardTrigger, IconToggle, IconToggleProps, Input, InputProps, Label, MarkMenu, MarkMenuItem, MarkMenuProps, MarkdownRenderer, MarkdownRendererProps, MarkdownStreamingContext, NEUTRAL_GRAY, PLACEHOLDER_COLOR, PassageCard, PassageCardProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PresenceDisplayStatus, PresenceLabel, Progress, ProjectEntity, ProjectEntityProps, ProjectRelation, RadioGroup, RadioGroupItem, Rag, RagDot, RelevanceDot, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, StatusBadgeComponent, StatusBadgeProps, StatusPill, StatusPillProps, StatusVariant, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, TagEntityProps, TagLike, Textarea, TextareaProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserEntity, UserEntityProps, UserMenu, UserMenuItem, UserMenuProps, UserMenuStatus, VISIBILITY_ICONS, VisibilityIcon, badgeVariants, buttonVariants, cardVariants, cn, configureEntityRegistry, configureRagLabels, configureStatusRegistry, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceColor, markdownBaseComponents, splitMarkdownBlocks, toggleVariants } from './ui/index.js';
12
+ import { LucideIcon } from 'lucide-react';
13
13
  import { Components } from 'react-markdown';
14
- import { ToasterProps } from 'sonner';
15
- export { ToasterProps, toast } from 'sonner';
14
+ export { A as AppNotification, D as DEFAULT_NOTIFY_TONE, N as NotificationBell, a as NotificationBellProps, b as NotificationBellTriggerState, c as NotifyOptions, d as NotifyVariant, T as Toaster, n as notify, s as seedNotifications, e as selectUnread, u as useNotify } from './index-CcbVSNSP.js';
16
15
  import { ColDef } from 'ag-grid-community';
16
+ export { ToasterProps, toast } from 'sonner';
17
17
  import 'clsx';
18
18
  import '@radix-ui/react-avatar';
19
19
  import 'class-variance-authority/types';
@@ -1145,52 +1145,6 @@ interface SemanticSearchProps {
1145
1145
  }
1146
1146
  declare function SemanticSearch({ docIds, workspaceId, searchMode, placeholder, className, 'data-testid': testId, }: SemanticSearchProps): React$1.JSX.Element;
1147
1147
 
1148
- /**
1149
- * PassageCard — the card ("bubble") a single retrieved passage is rendered as.
1150
- *
1151
- * One presentation shared by every surface that lists retrieval hits: the
1152
- * <SemanticSearch> block here and the ARBI-frontend monolith's SmartSearch
1153
- * results. Those had drifted into two different looks for the same object; this
1154
- * is the single one.
1155
- *
1156
- * The card owns the chrome only — the rounded border, the AI-accent hover /
1157
- * focus / selected states, the header row and the relevance dot. What goes in
1158
- * the header and how the snippet itself is rendered stays with the caller,
1159
- * because those genuinely differ: the block shows a plain-text excerpt in a
1160
- * narrow sidebar, the monolith renders markdown with a show-more toggle.
1161
- *
1162
- * Theming is semantic tokens only (shadcn + the AI-accent contract).
1163
- */
1164
-
1165
- /**
1166
- * A dot conveying relevance — green (high) / amber (mid) / muted (low).
1167
- *
1168
- * The band is shown, the raw number is not: scores are not on a normalized 0-1
1169
- * scale across search modes (BM25 keyword scores can exceed 1), so a printed
1170
- * figure invites a comparison it cannot support. The value is kept in the
1171
- * tooltip for anyone debugging a ranking.
1172
- */
1173
- declare function RelevanceDot({ score }: {
1174
- score?: number | null;
1175
- }): React__default.JSX.Element | null;
1176
- interface PassageCardProps {
1177
- /** Left of the header row — the source affordance (document pill, page label). */
1178
- header: React__default.ReactNode;
1179
- /** Relevance score for the dot. Omit to hide it. */
1180
- score?: number | null;
1181
- /** Extra affordance pinned right of the dot (e.g. a hover-revealed open icon). */
1182
- headerRight?: React__default.ReactNode;
1183
- /** Marks the card as the currently open passage. */
1184
- active?: boolean;
1185
- onClick?: (e: React__default.MouseEvent) => void;
1186
- /** Rendered under the snippet, outside the click target's typography. */
1187
- footer?: React__default.ReactNode;
1188
- className?: string;
1189
- children: React__default.ReactNode;
1190
- 'data-testid'?: string;
1191
- }
1192
- declare function PassageCard({ header, score, headerRight, active, onClick, footer, className, children, 'data-testid': testId, }: PassageCardProps): React__default.JSX.Element;
1193
-
1194
1148
  /**
1195
1149
  * Ask questions grounded in a SINGLE document (docId scoped to one file), plus a
1196
1150
  * one-click "suggest tags" action. Drop it in a document viewer.
@@ -1238,6 +1192,8 @@ interface CitationRendererProps {
1238
1192
  useCitationState: () => CitationState;
1239
1193
  onCloseCitation: () => void;
1240
1194
  onDismissCitation: () => void;
1195
+ /** Tells the user a citation was copied (or could not be). Optional: copying is silent without it. */
1196
+ notify?: (message: string, kind?: 'success' | 'error' | 'info') => void;
1241
1197
  }
1242
1198
  declare const CitationRenderer: React__default.NamedExoticComponent<CitationRendererProps>;
1243
1199
 
@@ -1472,679 +1428,6 @@ interface ArbiBotIconProps {
1472
1428
  }
1473
1429
  declare const ArbiBotIcon: React__default.FC<ArbiBotIconProps>;
1474
1430
 
1475
- /**
1476
- * EntityPill Component
1477
- *
1478
- * Base component for pill-style entity displays. Provides consistent styling and
1479
- * interaction patterns. Promoted verbatim from the ARBI app (import paths only
1480
- * changed to resolve within the SDK).
1481
- *
1482
- * Pattern: [Icon] [Label] [Optional: secondary text] [MoreVertical when interactive]
1483
- */
1484
-
1485
- interface EntityPillProps {
1486
- /** The icon element (Avatar, ShieldIcon, FileIcon, etc.) */
1487
- icon: React__default.ReactNode;
1488
- /** Primary label text */
1489
- label: string;
1490
- /** Optional secondary text (e.g., page notation "p.1") */
1491
- secondaryText?: React__default.ReactNode;
1492
- /** Size variant: 'sm' for compact, 'base' for tab headers */
1493
- size?: 'sm' | 'base';
1494
- /** Shape variant: 'pill' for rounded-full, 'rounded' for rounded-md */
1495
- shape?: 'pill' | 'rounded';
1496
- /** Additional CSS classes */
1497
- className?: string;
1498
- /** Max width for label truncation */
1499
- labelMaxWidth?: string;
1500
- /** Extra classes on the label text (e.g. a heavier weight on a card face). */
1501
- labelClassName?: string;
1502
- /** When true, the pill fills its container width (`flex w-full`) and the main
1503
- * area flexes + truncates so the trailing control (⋯ menu) pins to the right
1504
- * edge — used by the documents table's Document column. Default: shrink-to-fit. */
1505
- fullWidth?: boolean;
1506
- /** When true, render the pill with the active/"viewing" highlight — a solid
1507
- * dark-navy background with light text, applied LAST so it wins over both the
1508
- * default background and the interactive hover. */
1509
- highlight?: boolean;
1510
- /** Click handler for main area (icon + label) - primary action */
1511
- onClick?: (e: React__default.MouseEvent) => void;
1512
- /** Click handler for icon only — when set, only the icon is clickable (not the label) */
1513
- onIconClick?: (e: React__default.MouseEvent) => void;
1514
- /** Click handler for MoreVertical - opens popover/menu. When provided, shows MoreVertical icon */
1515
- onMoreClick?: (e: React__default.MouseEvent) => void;
1516
- /** Custom trailing element (e.g. a ⋯ dropdown menu). Rendered in the same
1517
- * trailing zone as MoreVertical, but as-is — so it stays outside the pill's
1518
- * primary click area. Takes precedence over `onMoreClick`. */
1519
- moreContent?: React__default.ReactNode;
1520
- /** Link URL - makes the main area an anchor tag */
1521
- href?: string;
1522
- /** Whether the pill is disabled */
1523
- disabled?: boolean;
1524
- /** Tooltip for main area (describes primary action, e.g., "View document") */
1525
- tooltipContent?: React__default.ReactNode;
1526
- /** Tooltip side placement */
1527
- tooltipSide?: 'top' | 'bottom' | 'left' | 'right';
1528
- /** Test ID for testing */
1529
- 'data-testid'?: string;
1530
- }
1531
- declare const EntityPill: React__default.ForwardRefExoticComponent<EntityPillProps & React__default.RefAttributes<HTMLElement>>;
1532
-
1533
- /**
1534
- * DocumentEntity Component
1535
- *
1536
- * Displays a document as a compact entity pill with file-type icon and name.
1537
- * Promoted from the ARBI app and DECOUPLED from the app store/API: it renders
1538
- * purely from the `doc` prop and optional `onClick`/`onIconClick` callbacks.
1539
- */
1540
-
1541
- /** Minimal, decoupled document shape the pill needs. Structurally compatible
1542
- * with the SDK's `DocResponse` (from `useDocuments`), but no dependency on it —
1543
- * a consumer can pass any object with these fields. */
1544
- interface DocumentLike {
1545
- file_name?: string | null;
1546
- folder?: string | null;
1547
- doc_metadata?: {
1548
- title?: string | null;
1549
- } | null;
1550
- }
1551
- /**
1552
- * The file-type glyph for a document, by extension.
1553
- *
1554
- * Exported because a document is recognisable by its icon before its name — any
1555
- * surface that lists documents (the entity pill here, the workspace home's
1556
- * Documents card) has to draw the same PDF/image/audio/video/email glyph, or
1557
- * the same file looks like two different things in two places.
1558
- */
1559
- declare function getDocIcon(fileName?: string | null, iconSize?: number): React__default.ReactNode;
1560
- interface DocumentEntityProps {
1561
- doc: DocumentLike;
1562
- /** Override the default file-type icon */
1563
- icon?: React__default.ReactNode;
1564
- /** Size variant — 'sm' (default) for inline/compact contexts, 'base' for a
1565
- * larger pill (e.g. the documents grid's primary name column). */
1566
- size?: 'sm' | 'base';
1567
- /** Override default label max width */
1568
- labelMaxWidth?: string;
1569
- /** Extra classes on the label text (e.g. a heavier weight on a card face). */
1570
- labelClassName?: string;
1571
- /** Click handler for the whole pill */
1572
- onClick?: (e: React__default.MouseEvent) => void;
1573
- /** Click handler for the icon only */
1574
- onIconClick?: (e: React__default.MouseEvent) => void;
1575
- /** When true, the file-type icon is replaced by a pinned Eye — marks the
1576
- * document that is currently open/being viewed. */
1577
- viewing?: boolean;
1578
- /** Small overlay pinned to the icon's corner (e.g. an "available offline" pip). */
1579
- iconBadge?: React__default.ReactNode;
1580
- /** Trailing control rendered outside the click area (e.g. a ⋯ actions menu). */
1581
- actions?: React__default.ReactNode;
1582
- /** When true, the pill fills the available width and the name truncates via
1583
- * CSS so the trailing ⋯ menu pins to the right edge. */
1584
- fullWidth?: boolean;
1585
- /** Render the WHOLE title (skip the 30-char `clampLabel` string cut) while
1586
- * keeping the normal content-width layout — for callers that want the full
1587
- * name to show/wrap (via a `labelClassName`) without `fullWidth`'s w-full.
1588
- * `fullWidth` already implies this. */
1589
- noClamp?: boolean;
1590
- /** Override the default folder/title hover tooltip. */
1591
- tooltipContent?: React__default.ReactNode;
1592
- className?: string;
1593
- }
1594
- declare function DocumentEntity({ doc, icon, size, labelMaxWidth, labelClassName, onClick, onIconClick, viewing, iconBadge, actions, tooltipContent, className, fullWidth, noClamp, }: DocumentEntityProps): React__default.JSX.Element;
1595
-
1596
- /**
1597
- * TagEntity Component
1598
- *
1599
- * Single source of truth for tag visual appearance, promoted from the ARBI app
1600
- * and DECOUPLED from the app store/API. It renders purely from the `tag` prop —
1601
- * the app-only bits (creator/updater lookup, visibility toggle, live doctag
1602
- * count from the query cache) are dropped; pass `doctagCount`/`shared` if you
1603
- * want them shown in the built-in tooltip, or inject a fully custom `tooltipContent`.
1604
- */
1605
-
1606
- /** Minimal, decoupled tag shape the pill needs. */
1607
- interface TagLike {
1608
- external_id: string;
1609
- name: string;
1610
- /** Tag type discriminator — drives the icon and the tooltip's "Type" line. */
1611
- tag_type?: {
1612
- type: string;
1613
- } | null;
1614
- /** Optional explicit color; when omitted it's derived from `external_id`. */
1615
- color?: string;
1616
- /** Optional document count shown in the tooltip. */
1617
- doctag_count?: number | null;
1618
- /** Optional shared/private flag shown in the tooltip. */
1619
- shared?: boolean | null;
1620
- }
1621
- interface TagEntityProps {
1622
- tag: TagLike;
1623
- size?: 'sm' | 'md' | 'lg';
1624
- className?: string;
1625
- onClick?: (e: React__default.MouseEvent) => void;
1626
- /** Whether to show a tooltip (default: true) */
1627
- showTooltip?: boolean;
1628
- /** Injected tooltip override. When provided (and `showTooltip` is not false) it
1629
- * replaces the built-in tooltip — used by the monolith to render its rich,
1630
- * store-coupled tooltip (fresh count, creator/updater, visibility toggle). */
1631
- tooltipContent?: React__default.ReactNode;
1632
- }
1633
- declare function TagEntity({ tag, size, className, onClick, showTooltip, tooltipContent, }: TagEntityProps): React__default.JSX.Element;
1634
-
1635
- /**
1636
- * Tag-type presentation primitives — the brand-neutral icon and label maps that
1637
- * back the shared `TagEntity` pill. Kept in their own module (not the component
1638
- * file) so app-side wrappers can import them to build their own store-coupled
1639
- * tooltip content without pulling in a component, and so the component file stays
1640
- * fast-refresh friendly.
1641
- */
1642
-
1643
- /** Human-readable tag type names. */
1644
- declare const TAG_TYPE_LABELS: Record<string, string>;
1645
- /** Icon mapping for tag types. */
1646
- declare const TAG_TYPE_ICONS: Record<string, typeof StickyNote>;
1647
- /** Resolve the icon component for a tag type, with the `text` (NotebookPen) fallback.
1648
- * Annotations share the NotebookPen mark used by the AI Annotate bulk action, so
1649
- * the table column and the batch bar name the same thing the same way. */
1650
- declare function getTagTypeIcon(type?: string | null): typeof StickyNote;
1651
- /** Resolve the human-readable label for a tag type, falling back to the raw type. */
1652
- declare function getTagTypeLabel(type?: string | null): string;
1653
-
1654
- /**
1655
- * ProjectEntity Component
1656
- *
1657
- * Fully-rounded pill for a "project" (a.k.a. a "matter" in some consumer apps).
1658
- * The viewer's relationship to the project drives a TINTED (soft-fill) colour
1659
- * so the kinds read at a glance without shouting:
1660
- * - your paid project → primary tint
1661
- * - someone else's → secondary tint
1662
- * - your free project → grey tint
1663
- * "Common" keeps the neutral muted pill.
1664
- *
1665
- * Promoted from the ARBI app and DECOUPLED: no store/stripe deps. The icon
1666
- * defaults to the `CreditCard` glyph and can be overridden via `icon`, and
1667
- * the display text via `label` (falls back to `name`) so consumers can relabel
1668
- * a "project" as a "matter", "case", etc.
1669
- */
1670
-
1671
- type ProjectRelation = 'mine' | 'other' | 'common';
1672
- interface ProjectEntityProps {
1673
- name: string;
1674
- /** Display text override (defaults to `name`) — lets a consumer relabel. */
1675
- label?: string;
1676
- /** Icon override (defaults to the CreditCard glyph). */
1677
- icon?: React__default.ReactNode;
1678
- subscription?: string;
1679
- hasCollaborators?: boolean;
1680
- size?: 'sm' | 'base';
1681
- className?: string;
1682
- onClick?: (e: React__default.MouseEvent) => void;
1683
- /** Viewer's relationship to the project — drives the inverted pill colour. */
1684
- relation?: ProjectRelation;
1685
- /** Whether the given `subscription` should be treated as paid. When omitted,
1686
- * it's inferred from the `subscription` value ('active' | 'past_due' | 'dev'). */
1687
- isPaid?: boolean;
1688
- /** Hover tooltip. */
1689
- tooltipContent?: React__default.ReactNode;
1690
- }
1691
- declare function ProjectEntity({ name, label, icon, subscription, hasCollaborators, size, className, onClick, relation, isPaid, tooltipContent, }: ProjectEntityProps): React__default.JSX.Element;
1692
-
1693
- /**
1694
- * UserEntity Component
1695
- *
1696
- * Single source of truth for the user pill/avatar visual, promoted from the ARBI
1697
- * app and DECOUPLED from the app store/API. It renders purely from injected,
1698
- * already-resolved props — the app-coupled bits (current user, WebSocket presence
1699
- * status, shared-workspace / agent-owner lookups) are resolved by the app adapter
1700
- * and passed in as `isMe` / `displayStatus` / `tooltipContent` / `onClick`.
1701
- *
1702
- * Variants:
1703
- * - pill: Avatar + name in a rounded container (default)
1704
- * - icon: Avatar circle with hover tooltip
1705
- *
1706
- * Status-dot colours use the semantic `--color-status-*` token contract (see the
1707
- * consuming app's @theme); they are seeded to the app's prior palette so the dots
1708
- * stay pixel-identical.
1709
- */
1710
-
1711
- /** Presence display status - WebSocket states plus 'hidden' for when status is intentionally not shown */
1712
- type PresenceDisplayStatus = 'connected' | 'connecting' | 'disconnected' | 'error' | 'hidden';
1713
- interface UserEntityProps {
1714
- size?: 'xs' | 'sm' | 'md' | 'lg';
1715
- variant?: 'icon' | 'pill';
1716
- className?: string;
1717
- /** When true (default), shows tooltip on hover */
1718
- showTooltip?: boolean;
1719
- /** When true (default), clicking triggers the injected action. Set false to disable interaction. */
1720
- interactive?: boolean;
1721
- /** When true, shows a blue unread indicator on the chat icon */
1722
- hasUnreadMessages?: boolean;
1723
- /** Two-letter initials shown in the avatar fallback (resolved by the app). */
1724
- initials?: string;
1725
- /** Display label — "You" for the current user, else the real name. */
1726
- displayName?: string;
1727
- /** Avatar image URL, if any. */
1728
- picture?: string | null;
1729
- /** Avatar background colour class for non-agents (e.g. 'bg-blue-500'). */
1730
- colorClass?: string;
1731
- /** Whether this user is an agent — drives the dashed ring + bot badge. */
1732
- isAgent?: boolean;
1733
- /** Inline border/text colour for agent avatars (from the app's agentAvatarColors). */
1734
- agentStyle?: React__default.CSSProperties;
1735
- /**
1736
- * Inline avatar colours for ANY user, not only agents — e.g. the deterministic
1737
- * tint the DM rows derive from the user id. Takes precedence over
1738
- * `agentStyle`, which predates it and is the same mechanism under a narrower
1739
- * name.
1740
- */
1741
- avatarStyle?: React__default.CSSProperties;
1742
- /** Whether this pill represents the current user — hides the chat icon and drives
1743
- * which action `onClick` performs. */
1744
- isMe?: boolean;
1745
- /** Resolved presence dot state; undefined hides the dot. */
1746
- displayStatus?: PresenceDisplayStatus;
1747
- /** Resolved click handler (open settings for me, DM for others). */
1748
- onClick?: (e: React__default.MouseEvent) => void;
1749
- /** Injected rich tooltip content (built by the app adapter). */
1750
- tooltipContent?: React__default.ReactNode;
1751
- /** Render the empty "no user" avatar. */
1752
- empty?: boolean;
1753
- }
1754
- declare const UserEntity: React__default.NamedExoticComponent<UserEntityProps>;
1755
-
1756
- /**
1757
- * "AGENT" stamp for an `agt-` peer.
1758
- *
1759
- * `UserEntity` already marks agents with a dashed ring and a bot icon, but that
1760
- * is a detail you have to know to read. An agent is a different KIND of
1761
- * correspondent — it acts on someone's behalf, and what you send it may be
1762
- * acted on rather than read — so it also gets a label you cannot miss.
1763
- */
1764
- declare function AgentBadge({ className }: {
1765
- className?: string;
1766
- }): React$1.JSX.Element;
1767
- /**
1768
- * Presence in words rather than a coloured dot alone.
1769
- *
1770
- * `status` is *resolved* by the app, exactly as {@link UserEntity} expects it,
1771
- * and `undefined` renders nothing at all. That default matters: a consumer that
1772
- * has not wired a WebSocket provider has no presence information, and labelling
1773
- * every one of its contacts "Offline" would be stating something we do not
1774
- * know. Whether absence of a signal means offline is a claim only the app can
1775
- * make, so the app makes it by resolving to `disconnected`.
1776
- */
1777
- declare function PresenceLabel({ status, className, }: {
1778
- status?: PresenceDisplayStatus;
1779
- className?: string;
1780
- }): React$1.JSX.Element | null;
1781
-
1782
- /** A status variant is an opaque string — its valid values are defined by the
1783
- * injected Badge (or the default Badge's variants). */
1784
- type StatusVariant = string;
1785
- /** The shape a consumer's Badge must satisfy to be injected as the pill skin. */
1786
- interface StatusBadgeProps {
1787
- variant?: StatusVariant;
1788
- className?: string;
1789
- children?: ReactNode;
1790
- 'data-testid'?: string;
1791
- }
1792
- type StatusBadgeComponent = ComponentType<StatusBadgeProps>;
1793
- /** Register a firm's status→variant vocabulary (merged in place), and optionally
1794
- * its fallback variant + its own Badge skin. Mirrors `configureEntityRegistry`. */
1795
- declare function configureStatusRegistry(map: Record<string, StatusVariant>, opts?: {
1796
- fallback?: StatusVariant;
1797
- Badge?: StatusBadgeComponent;
1798
- }): void;
1799
- /** Resolve a status string to its variant (falls back to the registered default). */
1800
- declare function getStatusVariant(status: string): StatusVariant;
1801
- interface StatusPillProps {
1802
- status: string;
1803
- label?: string;
1804
- /** Escape hatch: force a variant, skipping the registry. */
1805
- variant?: StatusVariant;
1806
- className?: string;
1807
- testId?: string;
1808
- }
1809
- /** A status chip whose look comes from the injected Badge + registered vocabulary. */
1810
- declare function StatusPill({ status, label, variant, className, testId }: StatusPillProps): React$1.JSX.Element;
1811
- type Rag = 'red' | 'amber' | 'green';
1812
- /** Override the RAG label copy (defaults are seeded so consumers stay identical). */
1813
- declare function configureRagLabels(labels: Partial<Record<Rag, string>>): void;
1814
- /** A small RAG dot + optional label for dense tables. Semantic tokens only. */
1815
- declare function RagDot({ rag, withLabel, className, }: {
1816
- rag: Rag;
1817
- withLabel?: boolean;
1818
- className?: string;
1819
- }): React$1.JSX.Element;
1820
-
1821
- /** An icon component usable in the registry (lucide icons + custom SVG wrappers). */
1822
- type EntityIconComponent = React__default.ComponentType<React__default.SVGAttributes<SVGElement> & {
1823
- size?: number | string;
1824
- className?: string;
1825
- }>;
1826
- /**
1827
- * Entity Mappings — naming conventions + icons for every entity in the app.
1828
- *
1829
- * `WORKSPACE.ICONS.DEFAULT` is the generic `SquareM` here; the monolith injects a
1830
- * rotated variant via {@link configureEntityRegistry}. The object is mutated in
1831
- * place by that helper, so existing `ENTITY_MAPPINGS` references stay live.
1832
- */
1833
- declare const ENTITY_MAPPINGS: {
1834
- PRODUCT: {
1835
- NAMES: {
1836
- SINGULAR: string;
1837
- };
1838
- ICONS: {
1839
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1840
- };
1841
- };
1842
- SECTION: {
1843
- NAMES: {
1844
- SINGULAR: string;
1845
- };
1846
- ICONS: {
1847
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1848
- };
1849
- };
1850
- WORKSPACE: {
1851
- NAMES: {
1852
- SINGULAR: string;
1853
- PLURAL: string;
1854
- };
1855
- ICONS: {
1856
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1857
- NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1858
- LIST: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1859
- SETTINGS: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1860
- };
1861
- };
1862
- CONVERSATION: {
1863
- NAMES: {
1864
- SINGULAR: string;
1865
- PLURAL: string;
1866
- NEW: string;
1867
- };
1868
- ICONS: {
1869
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1870
- OFF: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1871
- ACTIVE: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1872
- NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1873
- LIST: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1874
- };
1875
- };
1876
- DOCUMENT: {
1877
- NAMES: {
1878
- SINGULAR: string;
1879
- PLURAL: string;
1880
- };
1881
- ICONS: {
1882
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1883
- OFF: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1884
- };
1885
- };
1886
- VIEWER: {
1887
- NAMES: {
1888
- SINGULAR: string;
1889
- PLURAL: string;
1890
- };
1891
- ICONS: {
1892
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1893
- OFF: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1894
- };
1895
- };
1896
- TAG: {
1897
- NAMES: {
1898
- SINGULAR: string;
1899
- PLURAL: string;
1900
- };
1901
- ICONS: {
1902
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1903
- NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1904
- };
1905
- };
1906
- ANNOTATION: {
1907
- NAMES: {
1908
- SINGULAR: string;
1909
- PLURAL: string;
1910
- };
1911
- ICONS: {
1912
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1913
- NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1914
- };
1915
- };
1916
- NOTE: {
1917
- NAMES: {
1918
- SINGULAR: string;
1919
- PLURAL: string;
1920
- };
1921
- ICONS: {
1922
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1923
- NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1924
- };
1925
- };
1926
- USER: {
1927
- NAMES: {
1928
- SINGULAR: string;
1929
- PLURAL: string;
1930
- };
1931
- ICONS: {
1932
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1933
- NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1934
- SETTINGS: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1935
- };
1936
- };
1937
- WORKSPACEUSER: {
1938
- NAMES: {
1939
- SINGULAR: string;
1940
- PLURAL: string;
1941
- };
1942
- ICONS: {
1943
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1944
- PLURAL: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1945
- NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1946
- SETTINGS: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1947
- };
1948
- };
1949
- CONTACT: {
1950
- NAMES: {
1951
- SINGULAR: string;
1952
- PLURAL: string;
1953
- };
1954
- ICONS: {
1955
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1956
- NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1957
- };
1958
- };
1959
- TASK: {
1960
- NAMES: {
1961
- SINGULAR: string;
1962
- PLURAL: string;
1963
- };
1964
- ICONS: {
1965
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1966
- };
1967
- };
1968
- PROJECT: {
1969
- NAMES: {
1970
- SINGULAR: string;
1971
- PLURAL: string;
1972
- };
1973
- ICONS: {
1974
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1975
- };
1976
- };
1977
- SKILL: {
1978
- NAMES: {
1979
- SINGULAR: string;
1980
- PLURAL: string;
1981
- };
1982
- ICONS: {
1983
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1984
- };
1985
- };
1986
- ACCOUNT: {
1987
- NAMES: {
1988
- SINGULAR: string;
1989
- };
1990
- ICONS: {
1991
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1992
- };
1993
- };
1994
- NOTIFICATIONS: {
1995
- NAMES: {
1996
- SINGULAR: string;
1997
- PLURAL: string;
1998
- };
1999
- ICONS: {
2000
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2001
- };
2002
- };
2003
- MESSAGE: {
2004
- NAMES: {
2005
- SINGULAR: string;
2006
- PLURAL: string;
2007
- };
2008
- ICONS: {
2009
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2010
- };
2011
- };
2012
- NOTIFICATION: {
2013
- NAMES: {
2014
- SINGULAR: string;
2015
- PLURAL: string;
2016
- };
2017
- ICONS: {
2018
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2019
- };
2020
- };
2021
- APP: {
2022
- NAMES: {
2023
- SINGULAR: string;
2024
- PLURAL: string;
2025
- };
2026
- ICONS: {
2027
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2028
- HOME: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2029
- LOGOUT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2030
- UPLOAD: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2031
- };
2032
- };
2033
- HELP: {
2034
- NAMES: {
2035
- SINGULAR: string;
2036
- PLURAL: string;
2037
- };
2038
- ICONS: {
2039
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2040
- DOCS: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2041
- FAQ: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2042
- ABOUT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2043
- };
2044
- };
2045
- USERSHIELD: {
2046
- NAMES: {
2047
- SINGULAR: string;
2048
- PLURAL: string;
2049
- };
2050
- ICONS: {
2051
- DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2052
- };
2053
- };
2054
- };
2055
- /** The set of registered entity types. */
2056
- type EntityType = keyof typeof ENTITY_MAPPINGS;
2057
- /** Deployment override for a single entity: extra/replacement names and icons. */
2058
- interface EntityRegistryOverride {
2059
- NAMES?: Record<string, string>;
2060
- ICONS?: Record<string, EntityIconComponent>;
2061
- }
2062
- /**
2063
- * Layer deployment-specific names/icons onto the canonical registry — call once
2064
- * at app startup. Merges in place (so live `ENTITY_MAPPINGS` refs pick it up) and
2065
- * only touches the keys you pass, e.g.:
2066
- *
2067
- * ```ts
2068
- * configureEntityRegistry({
2069
- * WORKSPACE: { NAMES: { SINGULAR: 'MatterSpace' }, ICONS: { DEFAULT: RotatedSquareM } },
2070
- * })
2071
- * ```
2072
- */
2073
- declare function configureEntityRegistry(overrides: Partial<Record<EntityType, EntityRegistryOverride>>): void;
2074
- /**
2075
- * Resolve the icon component for an entity type + variant, falling back to the
2076
- * type's DEFAULT icon for unknown variants.
2077
- */
2078
- declare const getEntityIcon: (entityType: EntityType, variant?: string) => EntityIconComponent | undefined;
2079
- /**
2080
- * Display label for an entity type. `SINGULAR` (default); `PLURAL`/`SHORT`/`NEW`
2081
- * fall back to derivations of the singular when not explicitly configured.
2082
- */
2083
- declare const getEntityLabel: (entityType: EntityType, form?: "SINGULAR" | "PLURAL" | "SHORT" | "NEW") => string;
2084
- type EntityIconProps = {
2085
- entityType: EntityType;
2086
- variant?: string;
2087
- className?: string;
2088
- size?: number;
2089
- color?: string;
2090
- 'data-testid'?: string;
2091
- onClick?: () => void;
2092
- } & React__default.SVGAttributes<SVGElement>;
2093
- /**
2094
- * Render an entity's icon — the recommended way to show entity glyphs so all
2095
- * icon choices stay centralised.
2096
- */
2097
- declare const EntityIcon: ({ entityType, variant, ...props }: EntityIconProps) => React__default.ReactElement<React__default.SVGAttributes<SVGElement> & {
2098
- size?: number | string;
2099
- className?: string;
2100
- }, string | React__default.JSXElementConstructor<any>> | null;
2101
- /** Centralised icons for private/shared visibility states. */
2102
- declare const VISIBILITY_ICONS: {
2103
- PRIVATE: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2104
- SHARED: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2105
- };
2106
- /** Render the private/shared visibility glyph. */
2107
- declare const VisibilityIcon: ({ isShared, ...props }: {
2108
- isShared: boolean;
2109
- className?: string;
2110
- size?: number;
2111
- color?: string;
2112
- "data-testid"?: string;
2113
- onClick?: () => void;
2114
- } & React__default.SVGAttributes<SVGElement>) => React__default.FunctionComponentElement<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2115
-
2116
- /**
2117
- * Entity colour system — the single source of truth for deriving a stable colour
2118
- * from an entity id (workspace/tag/doc badges) shared across every app.
2119
- *
2120
- * ONE base palette (16 colours, indexed by the hex char at position 5 of an
2121
- * entity id) + three opacity constants that shift every variant globally. Pure,
2122
- * framework-free: no React, no store, no app `@/` imports.
2123
- */
2124
- /** Semantic placeholder colour for empty/pending states (gray-400). */
2125
- declare const PLACEHOLDER_COLOR = "#9ca3af";
2126
- /** Neutral gray for generic/unknown file types (slate-500). */
2127
- declare const NEUTRAL_GRAY = "#64748b";
2128
- /** Base palette — source of truth for all entity colours (hex char 0–f). */
2129
- declare const BASE_COLORS: Record<string, string>;
2130
- /**
2131
- * Deterministic colour for an entity id. The 5th char (index 4) of the id selects
2132
- * a base colour; the variant picks the opacity treatment.
2133
- */
2134
- declare function getEntityColor(entityId: string, variant?: 'light' | 'medium' | 'text'): string;
2135
- /** Full badge colour set for an entity id: light background + solid text + border. */
2136
- declare function getEntityColorStyles(entityId: string): {
2137
- backgroundColor: string;
2138
- color: string;
2139
- borderColor: string;
2140
- };
2141
- /**
2142
- * Colour for a workspace id — the MEDIUM (solid) variant, for white text on top.
2143
- * Returns the `--primary` token when colours are disabled or the id is invalid,
2144
- * so callers always get a paintable value.
2145
- */
2146
- declare const getWorkspaceColor: (workspaceId: string | undefined | null, useWorkspaceColors?: boolean) => string;
2147
-
2148
1431
  /**
2149
1432
  * Notification-type presentation primitives — the brand-neutral icon, colour and
2150
1433
  * label maps for every `NotificationType`, plus the workspace-membership phrasing
@@ -2254,100 +1537,6 @@ interface ActivityFeedProps {
2254
1537
  */
2255
1538
  declare function ActivityFeed({ limit, className, emptyLabel, enabled, 'data-testid': testId, }: ActivityFeedProps): React$1.JSX.Element;
2256
1539
 
2257
- type NotifyVariant = 'success' | 'error' | 'info' | 'warning';
2258
- interface AppNotification {
2259
- id: string;
2260
- title: string;
2261
- description?: string;
2262
- variant: NotifyVariant;
2263
- /** Epoch ms the entry was recorded. */
2264
- ts: number;
2265
- read: boolean;
2266
- /** Optional in-app link the entry deep-links to (passed to the bell's onNavigate). */
2267
- href?: string;
2268
- /** Optional click action — wins over `href` when both are present. Session
2269
- * history only; entries are never serialized, so a closure is safe here. */
2270
- onSelect?: () => void;
2271
- /** Routine session activity ("Opening workspace…", "Saved") — kept for the
2272
- * log but not something that demands attention: excluded from the unread
2273
- * badge and from the bell's default list (shown under "All activity"). */
2274
- ambient?: boolean;
2275
- /** Where the entry comes from. Session entries (`record`) have none; a
2276
- * backend bridge stamps its own (e.g. 'server') so {@link syncSource} can
2277
- * replace exactly its slice on every refetch without touching the rest. */
2278
- source?: string;
2279
- }
2280
- interface NotifyOptions {
2281
- description?: string;
2282
- /** Also record a persistent notification-centre entry (default true). */
2283
- record?: boolean;
2284
- href?: string;
2285
- duration?: number;
2286
- /** A toast action button (sonner). */
2287
- action?: {
2288
- label: ReactNode;
2289
- onClick: () => void;
2290
- };
2291
- /** Override the toast glyph (sonner). */
2292
- icon?: ReactNode;
2293
- /** Record as routine session activity (see {@link AppNotification.ambient}). */
2294
- ambient?: boolean;
2295
- }
2296
- interface NotifyState {
2297
- notifications: AppNotification[];
2298
- markRead: (id: string) => void;
2299
- markAllRead: () => void;
2300
- removeNotification: (id: string) => void;
2301
- clearNotifications: () => void;
2302
- /** Replace the centre's history (e.g. seed a demo/initial set). */
2303
- seed: (items: AppNotification[]) => void;
2304
- /** Record a centre entry (used by `notify.*`; sonner renders the toast). */
2305
- record: (note: AppNotification) => void;
2306
- /** Reconcile one source's slice with fresh truth (e.g. a backend list on
2307
- * every refetch): entries stamped with `source` are replaced wholesale —
2308
- * including their read state, which the source owns — while entries from
2309
- * other sources (session activity) stay untouched. Newest first. */
2310
- syncSource: (source: string, items: AppNotification[]) => void;
2311
- }
2312
- declare const useNotify: zustand.UseBoundStore<zustand.StoreApi<NotifyState>>;
2313
- declare const notify: {
2314
- success: (title: string, opts?: NotifyOptions) => string;
2315
- error: (title: string, opts?: NotifyOptions) => string;
2316
- info: (title: string, opts?: NotifyOptions) => string;
2317
- warning: (title: string, opts?: NotifyOptions) => string;
2318
- };
2319
- /** Replace the notification centre's history — inject a seed/initial set. */
2320
- declare function seedNotifications(items: AppNotification[]): void;
2321
- /** Unread count selector for the topbar bell — ambient session activity never
2322
- * demands attention, so it never counts. */
2323
- declare const selectUnread: (s: NotifyState) => number;
2324
- /** Default glyph colour per variant (raw palette, override via `toneClassNames`). */
2325
- declare const DEFAULT_NOTIFY_TONE: Record<NotifyVariant, string>;
2326
-
2327
- interface NotificationBellProps {
2328
- /** Called with an entry's `href` when it's clicked (e.g. router navigate). */
2329
- onNavigate?: (href: string) => void;
2330
- /** Called after an entry is locally marked read — the hook for a backend
2331
- * bridge to propagate read state upstream (filter by the ids it owns). */
2332
- onMarkRead?: (id: string) => void;
2333
- /** Called after "Mark all read" — same upstream-propagation hook. */
2334
- onMarkAllRead?: () => void;
2335
- /** Toast muting — the bell is where notification behaviour is controlled, so
2336
- * the mute switch lives in its header. Omit `onToggleMute` to hide it. */
2337
- muted?: boolean;
2338
- onToggleMute?: () => void;
2339
- /** Override per-variant glyph colours (e.g. brand emerald for success). */
2340
- toneClassNames?: Partial<Record<NotifyVariant, string>>;
2341
- emptyText?: string;
2342
- /** Footer link to the app's full notification surface. Omit to hide. */
2343
- onViewAll?: () => void;
2344
- viewAllLabel?: string;
2345
- testId?: string;
2346
- }
2347
- declare function NotificationBell({ onNavigate, onMarkRead, onMarkAllRead, muted, onToggleMute, toneClassNames, emptyText, onViewAll, viewAllLabel, testId, }: NotificationBellProps): React$1.JSX.Element;
2348
-
2349
- declare function Toaster({ toastOptions, ...props }: ToasterProps): React$1.JSX.Element;
2350
-
2351
1540
  /**
2352
1541
  * Direct-message view types.
2353
1542
  *
@@ -2558,14 +1747,17 @@ declare function useDirectMessages(options?: {
2558
1747
  enabled?: boolean;
2559
1748
  }): UseDirectMessagesResult;
2560
1749
 
1750
+ /** Relative-time formatting shared by the notification bell and the DM kit (no type imports, so the
1751
+ * SDK-free `/shell` entry can use it). */
1752
+ /** Compact relative time, e.g. "2 hours ago", "just now". */
1753
+ declare function formatRelativeTime(iso: string): string;
1754
+
2561
1755
  /** Small presentation helpers for the DM kit. */
2562
1756
 
2563
1757
  /** Initials from a user's name (falls back to the email local-part). */
2564
1758
  declare function userInitials(user: Pick<DmUser, 'given_name' | 'family_name' | 'email'>): string;
2565
1759
  /** Full display name (falls back to the email local-part). */
2566
1760
  declare function userDisplayName(user: Pick<DmUser, 'given_name' | 'family_name' | 'email'>): string;
2567
- /** Compact relative time, e.g. "2 hours ago", "just now". */
2568
- declare function formatRelativeTime(iso: string): string;
2569
1761
 
2570
1762
  interface DateSeparatorProps {
2571
1763
  children: ReactNode;
@@ -2764,46 +1956,6 @@ interface CommandPaletteValue {
2764
1956
  */
2765
1957
  declare function useCommandPalette(): CommandPaletteValue;
2766
1958
 
2767
- interface UserMenuItem {
2768
- label: string;
2769
- icon?: ComponentType<{
2770
- className?: string;
2771
- }>;
2772
- onSelect: () => void;
2773
- testId?: string;
2774
- }
2775
- /** Connection/presence state shown as a dot on the avatar and a line under the
2776
- * email — the account menu is where "am I connected" belongs. */
2777
- interface UserMenuStatus {
2778
- /** Short state word — "Connected", "Working offline". */
2779
- label: string;
2780
- tone: 'online' | 'busy' | 'offline';
2781
- /** Fine print under the label (e.g. the server domain). */
2782
- detail?: string;
2783
- testId?: string;
2784
- }
2785
- interface UserMenuProps {
2786
- user: {
2787
- name: string;
2788
- email?: string | null;
2789
- picture?: string | null;
2790
- };
2791
- /** Optional connection status: avatar dot + a line in the dropdown header. */
2792
- status?: UserMenuStatus;
2793
- /** Account actions above the sign-out divider (e.g. Settings). */
2794
- items?: UserMenuItem[];
2795
- onLogout: () => void;
2796
- logoutLabel?: string;
2797
- align?: 'start' | 'center' | 'end';
2798
- classNames?: {
2799
- trigger?: string;
2800
- fallback?: string;
2801
- };
2802
- testId?: string;
2803
- logoutTestId?: string;
2804
- }
2805
- declare function UserMenu({ user, status, items, onLogout, logoutLabel, align, classNames, testId, logoutTestId, }: UserMenuProps): React$1.JSX.Element;
2806
-
2807
1959
  /**
2808
1960
  * DocumentTable — a reusable AG Grid (community) block that renders a
2809
1961
  * workspace's documents using the promoted entity pills.
@@ -2849,46 +2001,6 @@ interface DocumentTableProps {
2849
2001
  }
2850
2002
  declare function DocumentTable({ workspaceId, documents, onOpenDocument, openOnRowClick, selectedIds, onSelectionChange, height, extraColumns, className, }: DocumentTableProps): React__default.JSX.Element;
2851
2003
 
2852
- /**
2853
- * DocumentCard — the canonical document thumbnail tile.
2854
- *
2855
- * One tile, shared by every app: a full-bleed first-page thumbnail (falling back
2856
- * to the file-type icon) with the selection checkbox, the actions menu, the
2857
- * processing state and the document's name pill layered on top of it, rather
2858
- * than a thumbnail box with a separate meta strip beneath.
2859
- *
2860
- * Presentational only — it takes a thumbnail, a status and callbacks, and knows
2861
- * nothing about how documents are fetched. `DocumentGallery` binds it to data.
2862
- */
2863
-
2864
- interface DocumentCardProps {
2865
- /** The document — anything with a file name and optional metadata title. */
2866
- doc: DocumentLike;
2867
- /** First-page thumbnail (data URI or URL). Falls back to the file-type icon. */
2868
- thumbnailUrl?: string | null;
2869
- /** Processing status, e.g. `parsing` (overlay) or `completed` (corner marker). */
2870
- status?: string | null;
2871
- /** Renders the selection checkbox. Omit `onToggleSelect` to hide it entirely. */
2872
- selected?: boolean;
2873
- onToggleSelect?: () => void;
2874
- /** Pins the "eye" on the name pill — this is the document open in the viewer. */
2875
- viewing?: boolean;
2876
- onOpen?: () => void;
2877
- /** Actions menu, pinned to the tile's top-right corner. */
2878
- actions?: React__default.ReactNode;
2879
- /** Swaps the name pill for an inline rename field. */
2880
- renaming?: boolean;
2881
- onCommitRename?: (name: string) => void;
2882
- onCancelRename?: () => void;
2883
- /** Replaces the pill's default hover tooltip (e.g. an AI summary + labels). */
2884
- tooltipContent?: React__default.ReactNode;
2885
- /** Bottom-left marker slot (e.g. an "available offline" glyph). */
2886
- marker?: React__default.ReactNode;
2887
- testId?: string;
2888
- className?: string;
2889
- }
2890
- declare function DocumentCard({ doc, thumbnailUrl, status, selected, onToggleSelect, viewing, onOpen, actions, renaming, onCommitRename, onCancelRename, tooltipContent, marker, testId, className, }: DocumentCardProps): React__default.JSX.Element;
2891
-
2892
2004
  /**
2893
2005
  * The ⋯ actions menu that sits in a document tile's top-right corner.
2894
2006
  *
@@ -3335,4 +2447,4 @@ interface ArbiUiState {
3335
2447
  }
3336
2448
  declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState>>;
3337
2449
 
3338
- 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, type AudioRecorderState, 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, DraftTitleControls, type DraftTitleControlsProps, 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, InlineMicButton, type InlineMicButtonProps, LinkedInIcon, type MessageArtifact, MessageArtifactCard, MessageBubble, type MessageBubbleProps, MessageThread, type MessageThreadProps, MicRecordingOverlay, type MicRecordingOverlayProps, MicWaveformIndicator, type MicWaveformIndicatorProps, 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, PhotoCapture, type PhotoCaptureProps, 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 UseAudioRecorderResult, type UseCameraStreamResult, type UseDirectMessagesResult, type UseVideoRecorderResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuStatus, VISIBILITY_ICONS, VidIcon, VideoCapture, type VideoCaptureProps, type VideoRecorderState, VisibilityIcon, VoiceNoteRecorder, type VoiceNoteRecorderProps, XlsIcon, annotateThread, arbiQueryKeys, captureFrameAsBlob, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, dayKey, describeActivity, formatElapsed, formatRelativeTime, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, hasVideoTrack, isWorkspaceNotificationType, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useAudioRecorder, useCameraStream, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useFacts, useHealth, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useVideoRecorder, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
2450
+ export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, type AiRunOptions, type AiTaskStatus, 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, type AudioRecorderState, 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, 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, DocumentCardMenu, type DocumentCardMenuProps, DocumentGallery, type DocumentGalleryProps, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, DraftTitleControls, type DraftTitleControlsProps, EmlIcon, EntityIconComponent, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HtmlIcon, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, InlineMicButton, type InlineMicButtonProps, LinkedInIcon, type MessageArtifact, MessageArtifactCard, MessageBubble, type MessageBubbleProps, MessageThread, type MessageThreadProps, MicRecordingOverlay, type MicRecordingOverlayProps, MicWaveformIndicator, type MicWaveformIndicatorProps, type NotificationTypeMeta, OpenAIIcon, type PaletteNavItem, type ParsedChunk, type ParsedChunkMetadata, type ParsedDocument, type ParsedDocumentMetadata, PdfIcon, PhotoCapture, type PhotoCaptureProps, type ProjectsUsageAggregate, ProviderIcon, RUN_WINDOW_MS, type RenderMarkdown, type SearchChunk, SemanticSearch, type SemanticSearchProps, type ThreadAccessors, type ThreadItem, type ToolResponses, TxtIcon, TypingIndicator, type UseAudioRecorderResult, type UseCameraStreamResult, type UseDirectMessagesResult, type UseVideoRecorderResult, VidIcon, VideoCapture, type VideoCaptureProps, type VideoRecorderState, VoiceNoteRecorder, type VoiceNoteRecorderProps, XlsIcon, annotateThread, arbiQueryKeys, captureFrameAsBlob, cropImage, dayKey, describeActivity, formatElapsed, formatRelativeTime, getNotificationTypeMeta, getWorkspaceActionText, getWorkspaceSentPhrase, hasVideoTrack, isWorkspaceNotificationType, parseActivityContent, redlineStats, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useAudioRecorder, useCameraStream, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useFacts, useHealth, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useVideoRecorder, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };