@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.
- package/dist/chunk-3CLGHHME.js +3882 -0
- package/dist/chunk-3CLGHHME.js.map +1 -0
- package/dist/chunk-6ALMBER7.js +176 -0
- package/dist/chunk-6ALMBER7.js.map +1 -0
- package/dist/chunk-BXP6S34V.cjs +284 -0
- package/dist/chunk-BXP6S34V.cjs.map +1 -0
- package/dist/chunk-EJ2BMHYK.js +272 -0
- package/dist/chunk-EJ2BMHYK.js.map +1 -0
- package/dist/chunk-OU2QLIKS.cjs +4060 -0
- package/dist/chunk-OU2QLIKS.cjs.map +1 -0
- package/dist/chunk-RZQACYNQ.cjs +218 -0
- package/dist/chunk-RZQACYNQ.cjs.map +1 -0
- package/dist/index-CcbVSNSP.d.cts +116 -0
- package/dist/index-CcbVSNSP.d.ts +116 -0
- package/dist/index.cjs +955 -2796
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -901
- package/dist/index.d.ts +13 -901
- package/dist/index.js +312 -2303
- package/dist/index.js.map +1 -1
- package/dist/shell/index.cjs +29 -0
- package/dist/shell/index.cjs.map +1 -0
- package/dist/shell/index.d.cts +4 -0
- package/dist/shell/index.d.ts +4 -0
- package/dist/shell/index.js +4 -0
- package/dist/shell/index.js.map +1 -0
- package/dist/ui/index.cjs +288 -147
- package/dist/ui/index.d.cts +878 -3
- package/dist/ui/index.d.ts +878 -3
- package/dist/ui/index.js +2 -1
- package/dist/viewers/index.cjs +327 -76
- package/dist/viewers/index.cjs.map +1 -1
- package/dist/viewers/index.d.cts +90 -4
- package/dist/viewers/index.d.ts +90 -4
- package/dist/viewers/index.js +316 -78
- package/dist/viewers/index.js.map +1 -1
- package/package.json +12 -3
- package/dist/chunk-FIPS3VPH.cjs +0 -1975
- package/dist/chunk-FIPS3VPH.cjs.map +0 -1
- package/dist/chunk-I256BUCX.js +0 -1819
- package/dist/chunk-I256BUCX.js.map +0 -1
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default from 'react';
|
|
3
|
+
import React__default, { HTMLAttributes, ReactNode, Ref, ComponentType } from 'react';
|
|
4
4
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
7
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
8
|
-
import
|
|
8
|
+
import * as lucide_react from 'lucide-react';
|
|
9
|
+
import { LucideIcon, StickyNote } from 'lucide-react';
|
|
9
10
|
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
10
11
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
11
12
|
import { DialogProps } from '@radix-ui/react-dialog';
|
|
@@ -59,6 +60,8 @@ declare function TooltipTrigger({ asChild, children, ...props }: TooltipTriggerP
|
|
|
59
60
|
interface TooltipContentProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
60
61
|
side?: Side;
|
|
61
62
|
sideOffset?: number;
|
|
63
|
+
/** Minimum gap, in px, kept between the tip and the viewport edges. Default 8. */
|
|
64
|
+
collisionPadding?: number;
|
|
62
65
|
}
|
|
63
66
|
declare const TooltipContent: React$1.ForwardRefExoticComponent<TooltipContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
64
67
|
|
|
@@ -247,8 +250,17 @@ declare const DialogTrigger: React$1.ForwardRefExoticComponent<DialogPrimitive.D
|
|
|
247
250
|
declare const DialogPortal: React$1.FC<DialogPrimitive.DialogPortalProps>;
|
|
248
251
|
declare const DialogClose: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
249
252
|
declare const DialogOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
253
|
+
/**
|
|
254
|
+
* Where the dialog sits on a PHONE (< 640px). Wider screens always get a centred dialog.
|
|
255
|
+
* - `center`: centred box with a 1rem margin (small prompts and confirmations).
|
|
256
|
+
* - `sheet`: bottom sheet, full width, rounded top corners (forms and pickers).
|
|
257
|
+
* - `full`: full-height sheet that stops below the status bar (large editors, wizards).
|
|
258
|
+
*/
|
|
259
|
+
type DialogPresentation = 'center' | 'sheet' | 'full';
|
|
250
260
|
declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
251
261
|
hideCloseButton?: boolean;
|
|
262
|
+
/** Phone presentation (see {@link DialogPresentation}). Defaults to `center`. */
|
|
263
|
+
presentation?: DialogPresentation;
|
|
252
264
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
253
265
|
declare const DialogHeader: {
|
|
254
266
|
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
@@ -268,6 +280,51 @@ declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrim
|
|
|
268
280
|
container?: HTMLElement | null;
|
|
269
281
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
270
282
|
|
|
283
|
+
/** One row of a mark's menu. Give it `onSelect`, or an `href` for a real link row. */
|
|
284
|
+
interface MarkMenuItem {
|
|
285
|
+
id: string;
|
|
286
|
+
label: string;
|
|
287
|
+
/** Runs when the row is chosen; the menu closes afterwards. */
|
|
288
|
+
onSelect?: () => void;
|
|
289
|
+
/** Renders the row as a link (no `onSelect` needed). */
|
|
290
|
+
href?: string;
|
|
291
|
+
/** The headline action: listed first, set a little larger, and run by a plain mouse click. */
|
|
292
|
+
primary?: boolean;
|
|
293
|
+
destructive?: boolean;
|
|
294
|
+
testId?: string;
|
|
295
|
+
}
|
|
296
|
+
interface MarkMenuProps extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'onClick'> {
|
|
297
|
+
/** The element the mark itself is: a real link or an inline span. */
|
|
298
|
+
as?: 'a' | 'span';
|
|
299
|
+
href?: string;
|
|
300
|
+
/** Rows of the menu. The `primary` one (else the first) is the mark's default action. */
|
|
301
|
+
items: MarkMenuItem[];
|
|
302
|
+
/** Optional read-only content above the rows (a quoted passage, a note, a label name). */
|
|
303
|
+
preview?: ReactNode;
|
|
304
|
+
/** Accessible name of the menu. */
|
|
305
|
+
menuLabel: string;
|
|
306
|
+
/** A plain mouse click runs the primary row (default). Touch and keyboard always open the menu. */
|
|
307
|
+
shouldClickRunPrimary?: boolean;
|
|
308
|
+
/** Hover delay before the menu opens (ms). */
|
|
309
|
+
openDelay?: number;
|
|
310
|
+
closeDelay?: number;
|
|
311
|
+
testId?: string;
|
|
312
|
+
menuTestId?: string;
|
|
313
|
+
/** The mark element, for hosts that move focus back to it. */
|
|
314
|
+
triggerRef?: Ref<HTMLElement>;
|
|
315
|
+
children: ReactNode;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* The ONE contextual menu of every inline mark (link, bookmark, citation, label, note).
|
|
319
|
+
*
|
|
320
|
+
* The mark stays quiet text. A compact popover opens on hover (short delay) and on keyboard focus;
|
|
321
|
+
* on touch a tap opens it instead of acting, so the primary row is one deliberate tap away. A
|
|
322
|
+
* plain mouse click runs the primary action, so existing click behaviour is unchanged.
|
|
323
|
+
* Keyboard: Enter/Space/ArrowDown open it and move into it, arrows move, Escape closes and
|
|
324
|
+
* returns focus to the mark. Rows are 44px high on coarse pointers.
|
|
325
|
+
*/
|
|
326
|
+
declare function MarkMenu({ as, href, items, preview, menuLabel, shouldClickRunPrimary, openDelay, closeDelay, testId, menuTestId, triggerRef: externalRef, className, children, onPointerDown, onPointerEnter, onPointerLeave, onFocus, onBlur, onKeyDown, ...rest }: MarkMenuProps): React$1.JSX.Element;
|
|
327
|
+
|
|
271
328
|
declare const DropdownMenu: React$1.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
272
329
|
declare const DropdownMenuTrigger: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
273
330
|
declare const DropdownMenuGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -438,6 +495,824 @@ declare function AiMarkdown({ children, className, isStreaming, }: {
|
|
|
438
495
|
*/
|
|
439
496
|
declare const markdownBaseComponents: Partial<Components>;
|
|
440
497
|
|
|
498
|
+
/**
|
|
499
|
+
* PassageCard — the card ("bubble") a single retrieved passage is rendered as.
|
|
500
|
+
*
|
|
501
|
+
* One presentation shared by every surface that lists retrieval hits: the
|
|
502
|
+
* <SemanticSearch> block here and the ARBI-frontend monolith's SmartSearch
|
|
503
|
+
* results. Those had drifted into two different looks for the same object; this
|
|
504
|
+
* is the single one.
|
|
505
|
+
*
|
|
506
|
+
* The card owns the chrome only — the rounded border, the AI-accent hover /
|
|
507
|
+
* focus / selected states, the header row and the relevance dot. What goes in
|
|
508
|
+
* the header and how the snippet itself is rendered stays with the caller,
|
|
509
|
+
* because those genuinely differ: the block shows a plain-text excerpt in a
|
|
510
|
+
* narrow sidebar, the monolith renders markdown with a show-more toggle.
|
|
511
|
+
*
|
|
512
|
+
* Theming is semantic tokens only (shadcn + the AI-accent contract).
|
|
513
|
+
*/
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* A dot conveying relevance — green (high) / amber (mid) / muted (low).
|
|
517
|
+
*
|
|
518
|
+
* The band is shown, the raw number is not: scores are not on a normalized 0-1
|
|
519
|
+
* scale across search modes (BM25 keyword scores can exceed 1), so a printed
|
|
520
|
+
* figure invites a comparison it cannot support. The value is kept in the
|
|
521
|
+
* tooltip for anyone debugging a ranking.
|
|
522
|
+
*/
|
|
523
|
+
declare function RelevanceDot({ score }: {
|
|
524
|
+
score?: number | null;
|
|
525
|
+
}): React__default.JSX.Element | null;
|
|
526
|
+
interface PassageCardProps {
|
|
527
|
+
/** Left of the header row — the source affordance (document pill, page label). */
|
|
528
|
+
header: React__default.ReactNode;
|
|
529
|
+
/** Relevance score for the dot. Omit to hide it. */
|
|
530
|
+
score?: number | null;
|
|
531
|
+
/** Extra affordance pinned right of the dot (e.g. a hover-revealed open icon). */
|
|
532
|
+
headerRight?: React__default.ReactNode;
|
|
533
|
+
/** Marks the card as the currently open passage. */
|
|
534
|
+
active?: boolean;
|
|
535
|
+
onClick?: (e: React__default.MouseEvent) => void;
|
|
536
|
+
/** Rendered under the snippet, outside the click target's typography. */
|
|
537
|
+
footer?: React__default.ReactNode;
|
|
538
|
+
className?: string;
|
|
539
|
+
children: React__default.ReactNode;
|
|
540
|
+
'data-testid'?: string;
|
|
541
|
+
}
|
|
542
|
+
declare function PassageCard({ header, score, headerRight, active, onClick, footer, className, children, 'data-testid': testId, }: PassageCardProps): React__default.JSX.Element;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* EntityPill Component
|
|
546
|
+
*
|
|
547
|
+
* Base component for pill-style entity displays. Provides consistent styling and
|
|
548
|
+
* interaction patterns. Promoted verbatim from the ARBI app (import paths only
|
|
549
|
+
* changed to resolve within the SDK).
|
|
550
|
+
*
|
|
551
|
+
* Pattern: [Icon] [Label] [Optional: secondary text] [MoreVertical when interactive]
|
|
552
|
+
*/
|
|
553
|
+
|
|
554
|
+
interface EntityPillProps {
|
|
555
|
+
/** The icon element (Avatar, ShieldIcon, FileIcon, etc.) */
|
|
556
|
+
icon: React__default.ReactNode;
|
|
557
|
+
/** Primary label text */
|
|
558
|
+
label: string;
|
|
559
|
+
/** Optional secondary text (e.g., page notation "p.1") */
|
|
560
|
+
secondaryText?: React__default.ReactNode;
|
|
561
|
+
/** Size variant: 'sm' for compact, 'base' for tab headers */
|
|
562
|
+
size?: 'sm' | 'base';
|
|
563
|
+
/** Shape variant: 'pill' for rounded-full, 'rounded' for rounded-md */
|
|
564
|
+
shape?: 'pill' | 'rounded';
|
|
565
|
+
/** Additional CSS classes */
|
|
566
|
+
className?: string;
|
|
567
|
+
/** Max width for label truncation */
|
|
568
|
+
labelMaxWidth?: string;
|
|
569
|
+
/** Extra classes on the label text (e.g. a heavier weight on a card face). */
|
|
570
|
+
labelClassName?: string;
|
|
571
|
+
/** When true, the pill fills its container width (`flex w-full`) and the main
|
|
572
|
+
* area flexes + truncates so the trailing control (⋯ menu) pins to the right
|
|
573
|
+
* edge — used by the documents table's Document column. Default: shrink-to-fit. */
|
|
574
|
+
fullWidth?: boolean;
|
|
575
|
+
/** When true, render the pill with the active/"viewing" highlight — a solid
|
|
576
|
+
* dark-navy background with light text, applied LAST so it wins over both the
|
|
577
|
+
* default background and the interactive hover. */
|
|
578
|
+
highlight?: boolean;
|
|
579
|
+
/** Click handler for main area (icon + label) - primary action */
|
|
580
|
+
onClick?: (e: React__default.MouseEvent) => void;
|
|
581
|
+
/** Click handler for icon only — when set, only the icon is clickable (not the label) */
|
|
582
|
+
onIconClick?: (e: React__default.MouseEvent) => void;
|
|
583
|
+
/** Click handler for MoreVertical - opens popover/menu. When provided, shows MoreVertical icon */
|
|
584
|
+
onMoreClick?: (e: React__default.MouseEvent) => void;
|
|
585
|
+
/** Custom trailing element (e.g. a ⋯ dropdown menu). Rendered in the same
|
|
586
|
+
* trailing zone as MoreVertical, but as-is — so it stays outside the pill's
|
|
587
|
+
* primary click area. Takes precedence over `onMoreClick`. */
|
|
588
|
+
moreContent?: React__default.ReactNode;
|
|
589
|
+
/** Link URL - makes the main area an anchor tag */
|
|
590
|
+
href?: string;
|
|
591
|
+
/** Whether the pill is disabled */
|
|
592
|
+
disabled?: boolean;
|
|
593
|
+
/** Tooltip for main area (describes primary action, e.g., "View document") */
|
|
594
|
+
tooltipContent?: React__default.ReactNode;
|
|
595
|
+
/** Tooltip side placement */
|
|
596
|
+
tooltipSide?: 'top' | 'bottom' | 'left' | 'right';
|
|
597
|
+
/** Test ID for testing */
|
|
598
|
+
'data-testid'?: string;
|
|
599
|
+
}
|
|
600
|
+
declare const EntityPill: React__default.ForwardRefExoticComponent<EntityPillProps & React__default.RefAttributes<HTMLElement>>;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* DocumentEntity Component
|
|
604
|
+
*
|
|
605
|
+
* Displays a document as a compact entity pill with file-type icon and name.
|
|
606
|
+
* Promoted from the ARBI app and DECOUPLED from the app store/API: it renders
|
|
607
|
+
* purely from the `doc` prop and optional `onClick`/`onIconClick` callbacks.
|
|
608
|
+
*/
|
|
609
|
+
|
|
610
|
+
/** Minimal, decoupled document shape the pill needs. Structurally compatible
|
|
611
|
+
* with the SDK's `DocResponse` (from `useDocuments`), but no dependency on it —
|
|
612
|
+
* a consumer can pass any object with these fields. */
|
|
613
|
+
interface DocumentLike {
|
|
614
|
+
file_name?: string | null;
|
|
615
|
+
folder?: string | null;
|
|
616
|
+
doc_metadata?: {
|
|
617
|
+
title?: string | null;
|
|
618
|
+
} | null;
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* The file-type glyph for a document, by extension.
|
|
622
|
+
*
|
|
623
|
+
* Exported because a document is recognisable by its icon before its name — any
|
|
624
|
+
* surface that lists documents (the entity pill here, the workspace home's
|
|
625
|
+
* Documents card) has to draw the same PDF/image/audio/video/email glyph, or
|
|
626
|
+
* the same file looks like two different things in two places.
|
|
627
|
+
*/
|
|
628
|
+
declare function getDocIcon(fileName?: string | null, iconSize?: number): React__default.ReactNode;
|
|
629
|
+
interface DocumentEntityProps {
|
|
630
|
+
doc: DocumentLike;
|
|
631
|
+
/** Override the default file-type icon */
|
|
632
|
+
icon?: React__default.ReactNode;
|
|
633
|
+
/** Size variant — 'sm' (default) for inline/compact contexts, 'base' for a
|
|
634
|
+
* larger pill (e.g. the documents grid's primary name column). */
|
|
635
|
+
size?: 'sm' | 'base';
|
|
636
|
+
/** Override default label max width */
|
|
637
|
+
labelMaxWidth?: string;
|
|
638
|
+
/** Extra classes on the label text (e.g. a heavier weight on a card face). */
|
|
639
|
+
labelClassName?: string;
|
|
640
|
+
/** Click handler for the whole pill */
|
|
641
|
+
onClick?: (e: React__default.MouseEvent) => void;
|
|
642
|
+
/** Click handler for the icon only */
|
|
643
|
+
onIconClick?: (e: React__default.MouseEvent) => void;
|
|
644
|
+
/** When true, the file-type icon is replaced by a pinned Eye — marks the
|
|
645
|
+
* document that is currently open/being viewed. */
|
|
646
|
+
viewing?: boolean;
|
|
647
|
+
/** Small overlay pinned to the icon's corner (e.g. an "available offline" pip). */
|
|
648
|
+
iconBadge?: React__default.ReactNode;
|
|
649
|
+
/** Trailing control rendered outside the click area (e.g. a ⋯ actions menu). */
|
|
650
|
+
actions?: React__default.ReactNode;
|
|
651
|
+
/** When true, the pill fills the available width and the name truncates via
|
|
652
|
+
* CSS so the trailing ⋯ menu pins to the right edge. */
|
|
653
|
+
fullWidth?: boolean;
|
|
654
|
+
/** Render the WHOLE title (skip the 30-char `clampLabel` string cut) while
|
|
655
|
+
* keeping the normal content-width layout — for callers that want the full
|
|
656
|
+
* name to show/wrap (via a `labelClassName`) without `fullWidth`'s w-full.
|
|
657
|
+
* `fullWidth` already implies this. */
|
|
658
|
+
noClamp?: boolean;
|
|
659
|
+
/** Override the default folder/title hover tooltip. */
|
|
660
|
+
tooltipContent?: React__default.ReactNode;
|
|
661
|
+
className?: string;
|
|
662
|
+
/** Forwarded to the pill so a surface can address this document's chip. */
|
|
663
|
+
'data-testid'?: string;
|
|
664
|
+
}
|
|
665
|
+
declare function DocumentEntity({ doc, icon, size, labelMaxWidth, labelClassName, onClick, onIconClick, viewing, iconBadge, actions, tooltipContent, className, fullWidth, noClamp, 'data-testid': testId, }: DocumentEntityProps): React__default.JSX.Element;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* TagEntity Component
|
|
669
|
+
*
|
|
670
|
+
* Single source of truth for tag visual appearance, promoted from the ARBI app
|
|
671
|
+
* and DECOUPLED from the app store/API. It renders purely from the `tag` prop —
|
|
672
|
+
* the app-only bits (creator/updater lookup, visibility toggle, live doctag
|
|
673
|
+
* count from the query cache) are dropped; pass `doctagCount`/`shared` if you
|
|
674
|
+
* want them shown in the built-in tooltip, or inject a fully custom `tooltipContent`.
|
|
675
|
+
*/
|
|
676
|
+
|
|
677
|
+
/** Minimal, decoupled tag shape the pill needs. */
|
|
678
|
+
interface TagLike {
|
|
679
|
+
external_id: string;
|
|
680
|
+
name: string;
|
|
681
|
+
/** Tag type discriminator — drives the icon and the tooltip's "Type" line. */
|
|
682
|
+
tag_type?: {
|
|
683
|
+
type: string;
|
|
684
|
+
} | null;
|
|
685
|
+
/** Optional explicit color; when omitted it's derived from `external_id`. */
|
|
686
|
+
color?: string;
|
|
687
|
+
/** Optional document count shown in the tooltip. */
|
|
688
|
+
doctag_count?: number | null;
|
|
689
|
+
/** Optional shared/private flag shown in the tooltip. */
|
|
690
|
+
shared?: boolean | null;
|
|
691
|
+
}
|
|
692
|
+
interface TagEntityProps {
|
|
693
|
+
tag: TagLike;
|
|
694
|
+
size?: 'sm' | 'md' | 'lg';
|
|
695
|
+
className?: string;
|
|
696
|
+
onClick?: (e: React__default.MouseEvent) => void;
|
|
697
|
+
/** Whether to show a tooltip (default: true) */
|
|
698
|
+
showTooltip?: boolean;
|
|
699
|
+
/** Injected tooltip override. When provided (and `showTooltip` is not false) it
|
|
700
|
+
* replaces the built-in tooltip — used by the monolith to render its rich,
|
|
701
|
+
* store-coupled tooltip (fresh count, creator/updater, visibility toggle). */
|
|
702
|
+
tooltipContent?: React__default.ReactNode;
|
|
703
|
+
}
|
|
704
|
+
declare function TagEntity({ tag, size, className, onClick, showTooltip, tooltipContent, }: TagEntityProps): React__default.JSX.Element;
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* Tag-type presentation primitives — the brand-neutral icon and label maps that
|
|
708
|
+
* back the shared `TagEntity` pill. Kept in their own module (not the component
|
|
709
|
+
* file) so app-side wrappers can import them to build their own store-coupled
|
|
710
|
+
* tooltip content without pulling in a component, and so the component file stays
|
|
711
|
+
* fast-refresh friendly.
|
|
712
|
+
*/
|
|
713
|
+
|
|
714
|
+
/** Human-readable tag type names. */
|
|
715
|
+
declare const TAG_TYPE_LABELS: Record<string, string>;
|
|
716
|
+
/** Icon mapping for tag types. */
|
|
717
|
+
declare const TAG_TYPE_ICONS: Record<string, typeof StickyNote>;
|
|
718
|
+
/** Resolve the icon component for a tag type, with the `text` (NotebookPen) fallback.
|
|
719
|
+
* Annotations share the NotebookPen mark used by the AI Annotate bulk action, so
|
|
720
|
+
* the table column and the batch bar name the same thing the same way. */
|
|
721
|
+
declare function getTagTypeIcon(type?: string | null): typeof StickyNote;
|
|
722
|
+
/** Resolve the human-readable label for a tag type, falling back to the raw type. */
|
|
723
|
+
declare function getTagTypeLabel(type?: string | null): string;
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* ProjectEntity Component
|
|
727
|
+
*
|
|
728
|
+
* Fully-rounded pill for a "project" (a.k.a. a "matter" in some consumer apps).
|
|
729
|
+
* The viewer's relationship to the project drives a TINTED (soft-fill) colour
|
|
730
|
+
* so the kinds read at a glance without shouting:
|
|
731
|
+
* - your paid project → primary tint
|
|
732
|
+
* - someone else's → secondary tint
|
|
733
|
+
* - your free project → grey tint
|
|
734
|
+
* "Common" keeps the neutral muted pill.
|
|
735
|
+
*
|
|
736
|
+
* Promoted from the ARBI app and DECOUPLED: no store/stripe deps. The icon
|
|
737
|
+
* defaults to the `CreditCard` glyph and can be overridden via `icon`, and
|
|
738
|
+
* the display text via `label` (falls back to `name`) so consumers can relabel
|
|
739
|
+
* a "project" as a "matter", "case", etc.
|
|
740
|
+
*/
|
|
741
|
+
|
|
742
|
+
type ProjectRelation = 'mine' | 'other' | 'common';
|
|
743
|
+
interface ProjectEntityProps {
|
|
744
|
+
name: string;
|
|
745
|
+
/** Display text override (defaults to `name`) — lets a consumer relabel. */
|
|
746
|
+
label?: string;
|
|
747
|
+
/** Icon override (defaults to the CreditCard glyph). */
|
|
748
|
+
icon?: React__default.ReactNode;
|
|
749
|
+
subscription?: string;
|
|
750
|
+
hasCollaborators?: boolean;
|
|
751
|
+
size?: 'sm' | 'base';
|
|
752
|
+
className?: string;
|
|
753
|
+
onClick?: (e: React__default.MouseEvent) => void;
|
|
754
|
+
/** Viewer's relationship to the project — drives the inverted pill colour. */
|
|
755
|
+
relation?: ProjectRelation;
|
|
756
|
+
/** Whether the given `subscription` should be treated as paid. When omitted,
|
|
757
|
+
* it's inferred from the `subscription` value ('active' | 'past_due' | 'dev'). */
|
|
758
|
+
isPaid?: boolean;
|
|
759
|
+
/** Hover tooltip. */
|
|
760
|
+
tooltipContent?: React__default.ReactNode;
|
|
761
|
+
}
|
|
762
|
+
declare function ProjectEntity({ name, label, icon, subscription, hasCollaborators, size, className, onClick, relation, isPaid, tooltipContent, }: ProjectEntityProps): React__default.JSX.Element;
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* UserEntity Component
|
|
766
|
+
*
|
|
767
|
+
* Single source of truth for the user pill/avatar visual, promoted from the ARBI
|
|
768
|
+
* app and DECOUPLED from the app store/API. It renders purely from injected,
|
|
769
|
+
* already-resolved props — the app-coupled bits (current user, WebSocket presence
|
|
770
|
+
* status, shared-workspace / agent-owner lookups) are resolved by the app adapter
|
|
771
|
+
* and passed in as `isMe` / `displayStatus` / `tooltipContent` / `onClick`.
|
|
772
|
+
*
|
|
773
|
+
* Variants:
|
|
774
|
+
* - pill: Avatar + name in a rounded container (default)
|
|
775
|
+
* - icon: Avatar circle with hover tooltip
|
|
776
|
+
*
|
|
777
|
+
* Status-dot colours use the semantic `--color-status-*` token contract (see the
|
|
778
|
+
* consuming app's @theme); they are seeded to the app's prior palette so the dots
|
|
779
|
+
* stay pixel-identical.
|
|
780
|
+
*/
|
|
781
|
+
|
|
782
|
+
/** Presence display status - WebSocket states plus 'hidden' for when status is intentionally not shown */
|
|
783
|
+
type PresenceDisplayStatus = 'connected' | 'connecting' | 'disconnected' | 'error' | 'hidden';
|
|
784
|
+
interface UserEntityProps {
|
|
785
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
786
|
+
variant?: 'icon' | 'pill';
|
|
787
|
+
className?: string;
|
|
788
|
+
/** When true (default), shows tooltip on hover */
|
|
789
|
+
showTooltip?: boolean;
|
|
790
|
+
/** When true (default), clicking triggers the injected action. Set false to disable interaction. */
|
|
791
|
+
interactive?: boolean;
|
|
792
|
+
/** When true, shows a blue unread indicator on the chat icon */
|
|
793
|
+
hasUnreadMessages?: boolean;
|
|
794
|
+
/** Two-letter initials shown in the avatar fallback (resolved by the app). */
|
|
795
|
+
initials?: string;
|
|
796
|
+
/** Display label — "You" for the current user, else the real name. */
|
|
797
|
+
displayName?: string;
|
|
798
|
+
/** Avatar image URL, if any. */
|
|
799
|
+
picture?: string | null;
|
|
800
|
+
/** Avatar background colour class for non-agents (e.g. 'bg-blue-500'). */
|
|
801
|
+
colorClass?: string;
|
|
802
|
+
/** Whether this user is an agent — drives the dashed ring + bot badge. */
|
|
803
|
+
isAgent?: boolean;
|
|
804
|
+
/** Inline border/text colour for agent avatars (from the app's agentAvatarColors). */
|
|
805
|
+
agentStyle?: React__default.CSSProperties;
|
|
806
|
+
/**
|
|
807
|
+
* Inline avatar colours for ANY user, not only agents — e.g. the deterministic
|
|
808
|
+
* tint the DM rows derive from the user id. Takes precedence over
|
|
809
|
+
* `agentStyle`, which predates it and is the same mechanism under a narrower
|
|
810
|
+
* name.
|
|
811
|
+
*/
|
|
812
|
+
avatarStyle?: React__default.CSSProperties;
|
|
813
|
+
/** Whether this pill represents the current user — hides the chat icon and drives
|
|
814
|
+
* which action `onClick` performs. */
|
|
815
|
+
isMe?: boolean;
|
|
816
|
+
/** Resolved presence dot state; undefined hides the dot. */
|
|
817
|
+
displayStatus?: PresenceDisplayStatus;
|
|
818
|
+
/** Resolved click handler (open settings for me, DM for others). */
|
|
819
|
+
onClick?: (e: React__default.MouseEvent) => void;
|
|
820
|
+
/** Injected rich tooltip content (built by the app adapter). */
|
|
821
|
+
tooltipContent?: React__default.ReactNode;
|
|
822
|
+
/** Render the empty "no user" avatar. */
|
|
823
|
+
empty?: boolean;
|
|
824
|
+
}
|
|
825
|
+
declare const UserEntity: React__default.NamedExoticComponent<UserEntityProps>;
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* "AGENT" stamp for an `agt-` peer.
|
|
829
|
+
*
|
|
830
|
+
* `UserEntity` already marks agents with a dashed ring and a bot icon, but that
|
|
831
|
+
* is a detail you have to know to read. An agent is a different KIND of
|
|
832
|
+
* correspondent — it acts on someone's behalf, and what you send it may be
|
|
833
|
+
* acted on rather than read — so it also gets a label you cannot miss.
|
|
834
|
+
*/
|
|
835
|
+
declare function AgentBadge({ className }: {
|
|
836
|
+
className?: string;
|
|
837
|
+
}): React$1.JSX.Element;
|
|
838
|
+
/**
|
|
839
|
+
* Presence in words rather than a coloured dot alone.
|
|
840
|
+
*
|
|
841
|
+
* `status` is *resolved* by the app, exactly as {@link UserEntity} expects it,
|
|
842
|
+
* and `undefined` renders nothing at all. That default matters: a consumer that
|
|
843
|
+
* has not wired a WebSocket provider has no presence information, and labelling
|
|
844
|
+
* every one of its contacts "Offline" would be stating something we do not
|
|
845
|
+
* know. Whether absence of a signal means offline is a claim only the app can
|
|
846
|
+
* make, so the app makes it by resolving to `disconnected`.
|
|
847
|
+
*/
|
|
848
|
+
declare function PresenceLabel({ status, className, }: {
|
|
849
|
+
status?: PresenceDisplayStatus;
|
|
850
|
+
className?: string;
|
|
851
|
+
}): React$1.JSX.Element | null;
|
|
852
|
+
|
|
853
|
+
/** A status variant is an opaque string — its valid values are defined by the
|
|
854
|
+
* injected Badge (or the default Badge's variants). */
|
|
855
|
+
type StatusVariant = string;
|
|
856
|
+
/** The shape a consumer's Badge must satisfy to be injected as the pill skin. */
|
|
857
|
+
interface StatusBadgeProps {
|
|
858
|
+
variant?: StatusVariant;
|
|
859
|
+
className?: string;
|
|
860
|
+
children?: ReactNode;
|
|
861
|
+
'data-testid'?: string;
|
|
862
|
+
}
|
|
863
|
+
type StatusBadgeComponent = ComponentType<StatusBadgeProps>;
|
|
864
|
+
/** Register a firm's status→variant vocabulary (merged in place), and optionally
|
|
865
|
+
* its fallback variant + its own Badge skin. Mirrors `configureEntityRegistry`. */
|
|
866
|
+
declare function configureStatusRegistry(map: Record<string, StatusVariant>, opts?: {
|
|
867
|
+
fallback?: StatusVariant;
|
|
868
|
+
Badge?: StatusBadgeComponent;
|
|
869
|
+
}): void;
|
|
870
|
+
/** Resolve a status string to its variant (falls back to the registered default). */
|
|
871
|
+
declare function getStatusVariant(status: string): StatusVariant;
|
|
872
|
+
interface StatusPillProps {
|
|
873
|
+
status: string;
|
|
874
|
+
label?: string;
|
|
875
|
+
/** Escape hatch: force a variant, skipping the registry. */
|
|
876
|
+
variant?: StatusVariant;
|
|
877
|
+
className?: string;
|
|
878
|
+
testId?: string;
|
|
879
|
+
}
|
|
880
|
+
/** A status chip whose look comes from the injected Badge + registered vocabulary. */
|
|
881
|
+
declare function StatusPill({ status, label, variant, className, testId }: StatusPillProps): React$1.JSX.Element;
|
|
882
|
+
type Rag = 'red' | 'amber' | 'green';
|
|
883
|
+
/** Override the RAG label copy (defaults are seeded so consumers stay identical). */
|
|
884
|
+
declare function configureRagLabels(labels: Partial<Record<Rag, string>>): void;
|
|
885
|
+
/** A small RAG dot + optional label for dense tables. Semantic tokens only. */
|
|
886
|
+
declare function RagDot({ rag, withLabel, className, }: {
|
|
887
|
+
rag: Rag;
|
|
888
|
+
withLabel?: boolean;
|
|
889
|
+
className?: string;
|
|
890
|
+
}): React$1.JSX.Element;
|
|
891
|
+
|
|
892
|
+
/** An icon component usable in the registry (lucide icons + custom SVG wrappers). */
|
|
893
|
+
type EntityIconComponent = React__default.ComponentType<React__default.SVGAttributes<SVGElement> & {
|
|
894
|
+
size?: number | string;
|
|
895
|
+
className?: string;
|
|
896
|
+
}>;
|
|
897
|
+
/**
|
|
898
|
+
* Entity Mappings — naming conventions + icons for every entity in the app.
|
|
899
|
+
*
|
|
900
|
+
* `WORKSPACE.ICONS.DEFAULT` is the generic `SquareM` here; the monolith injects a
|
|
901
|
+
* rotated variant via {@link configureEntityRegistry}. The object is mutated in
|
|
902
|
+
* place by that helper, so existing `ENTITY_MAPPINGS` references stay live.
|
|
903
|
+
*/
|
|
904
|
+
declare const ENTITY_MAPPINGS: {
|
|
905
|
+
PRODUCT: {
|
|
906
|
+
NAMES: {
|
|
907
|
+
SINGULAR: string;
|
|
908
|
+
};
|
|
909
|
+
ICONS: {
|
|
910
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
911
|
+
};
|
|
912
|
+
};
|
|
913
|
+
SECTION: {
|
|
914
|
+
NAMES: {
|
|
915
|
+
SINGULAR: string;
|
|
916
|
+
};
|
|
917
|
+
ICONS: {
|
|
918
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
919
|
+
};
|
|
920
|
+
};
|
|
921
|
+
WORKSPACE: {
|
|
922
|
+
NAMES: {
|
|
923
|
+
SINGULAR: string;
|
|
924
|
+
PLURAL: string;
|
|
925
|
+
};
|
|
926
|
+
ICONS: {
|
|
927
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
928
|
+
NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
929
|
+
LIST: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
930
|
+
SETTINGS: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
931
|
+
};
|
|
932
|
+
};
|
|
933
|
+
CONVERSATION: {
|
|
934
|
+
NAMES: {
|
|
935
|
+
SINGULAR: string;
|
|
936
|
+
PLURAL: string;
|
|
937
|
+
NEW: string;
|
|
938
|
+
};
|
|
939
|
+
ICONS: {
|
|
940
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
941
|
+
OFF: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
942
|
+
ACTIVE: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
943
|
+
NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
944
|
+
LIST: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
945
|
+
};
|
|
946
|
+
};
|
|
947
|
+
DOCUMENT: {
|
|
948
|
+
NAMES: {
|
|
949
|
+
SINGULAR: string;
|
|
950
|
+
PLURAL: string;
|
|
951
|
+
};
|
|
952
|
+
ICONS: {
|
|
953
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
954
|
+
OFF: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
955
|
+
};
|
|
956
|
+
};
|
|
957
|
+
VIEWER: {
|
|
958
|
+
NAMES: {
|
|
959
|
+
SINGULAR: string;
|
|
960
|
+
PLURAL: string;
|
|
961
|
+
};
|
|
962
|
+
ICONS: {
|
|
963
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
964
|
+
OFF: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
965
|
+
};
|
|
966
|
+
};
|
|
967
|
+
TAG: {
|
|
968
|
+
NAMES: {
|
|
969
|
+
SINGULAR: string;
|
|
970
|
+
PLURAL: string;
|
|
971
|
+
};
|
|
972
|
+
ICONS: {
|
|
973
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
974
|
+
NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
975
|
+
};
|
|
976
|
+
};
|
|
977
|
+
ANNOTATION: {
|
|
978
|
+
NAMES: {
|
|
979
|
+
SINGULAR: string;
|
|
980
|
+
PLURAL: string;
|
|
981
|
+
};
|
|
982
|
+
ICONS: {
|
|
983
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
984
|
+
NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
985
|
+
};
|
|
986
|
+
};
|
|
987
|
+
NOTE: {
|
|
988
|
+
NAMES: {
|
|
989
|
+
SINGULAR: string;
|
|
990
|
+
PLURAL: string;
|
|
991
|
+
};
|
|
992
|
+
ICONS: {
|
|
993
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
994
|
+
NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
995
|
+
};
|
|
996
|
+
};
|
|
997
|
+
USER: {
|
|
998
|
+
NAMES: {
|
|
999
|
+
SINGULAR: string;
|
|
1000
|
+
PLURAL: string;
|
|
1001
|
+
};
|
|
1002
|
+
ICONS: {
|
|
1003
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1004
|
+
NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1005
|
+
SETTINGS: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1006
|
+
};
|
|
1007
|
+
};
|
|
1008
|
+
WORKSPACEUSER: {
|
|
1009
|
+
NAMES: {
|
|
1010
|
+
SINGULAR: string;
|
|
1011
|
+
PLURAL: string;
|
|
1012
|
+
};
|
|
1013
|
+
ICONS: {
|
|
1014
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1015
|
+
PLURAL: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1016
|
+
NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1017
|
+
SETTINGS: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1018
|
+
};
|
|
1019
|
+
};
|
|
1020
|
+
CONTACT: {
|
|
1021
|
+
NAMES: {
|
|
1022
|
+
SINGULAR: string;
|
|
1023
|
+
PLURAL: string;
|
|
1024
|
+
};
|
|
1025
|
+
ICONS: {
|
|
1026
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1027
|
+
NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1028
|
+
};
|
|
1029
|
+
};
|
|
1030
|
+
TASK: {
|
|
1031
|
+
NAMES: {
|
|
1032
|
+
SINGULAR: string;
|
|
1033
|
+
PLURAL: string;
|
|
1034
|
+
};
|
|
1035
|
+
ICONS: {
|
|
1036
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1037
|
+
};
|
|
1038
|
+
};
|
|
1039
|
+
PROJECT: {
|
|
1040
|
+
NAMES: {
|
|
1041
|
+
SINGULAR: string;
|
|
1042
|
+
PLURAL: string;
|
|
1043
|
+
};
|
|
1044
|
+
ICONS: {
|
|
1045
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1046
|
+
};
|
|
1047
|
+
};
|
|
1048
|
+
SKILL: {
|
|
1049
|
+
NAMES: {
|
|
1050
|
+
SINGULAR: string;
|
|
1051
|
+
PLURAL: string;
|
|
1052
|
+
};
|
|
1053
|
+
ICONS: {
|
|
1054
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1055
|
+
};
|
|
1056
|
+
};
|
|
1057
|
+
ACCOUNT: {
|
|
1058
|
+
NAMES: {
|
|
1059
|
+
SINGULAR: string;
|
|
1060
|
+
};
|
|
1061
|
+
ICONS: {
|
|
1062
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1063
|
+
};
|
|
1064
|
+
};
|
|
1065
|
+
NOTIFICATIONS: {
|
|
1066
|
+
NAMES: {
|
|
1067
|
+
SINGULAR: string;
|
|
1068
|
+
PLURAL: string;
|
|
1069
|
+
};
|
|
1070
|
+
ICONS: {
|
|
1071
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1072
|
+
};
|
|
1073
|
+
};
|
|
1074
|
+
MESSAGE: {
|
|
1075
|
+
NAMES: {
|
|
1076
|
+
SINGULAR: string;
|
|
1077
|
+
PLURAL: string;
|
|
1078
|
+
};
|
|
1079
|
+
ICONS: {
|
|
1080
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1081
|
+
};
|
|
1082
|
+
};
|
|
1083
|
+
NOTIFICATION: {
|
|
1084
|
+
NAMES: {
|
|
1085
|
+
SINGULAR: string;
|
|
1086
|
+
PLURAL: string;
|
|
1087
|
+
};
|
|
1088
|
+
ICONS: {
|
|
1089
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1090
|
+
};
|
|
1091
|
+
};
|
|
1092
|
+
APP: {
|
|
1093
|
+
NAMES: {
|
|
1094
|
+
SINGULAR: string;
|
|
1095
|
+
PLURAL: string;
|
|
1096
|
+
};
|
|
1097
|
+
ICONS: {
|
|
1098
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1099
|
+
HOME: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1100
|
+
LOGOUT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1101
|
+
UPLOAD: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1102
|
+
};
|
|
1103
|
+
};
|
|
1104
|
+
HELP: {
|
|
1105
|
+
NAMES: {
|
|
1106
|
+
SINGULAR: string;
|
|
1107
|
+
PLURAL: string;
|
|
1108
|
+
};
|
|
1109
|
+
ICONS: {
|
|
1110
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1111
|
+
DOCS: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1112
|
+
FAQ: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1113
|
+
ABOUT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1114
|
+
};
|
|
1115
|
+
};
|
|
1116
|
+
USERSHIELD: {
|
|
1117
|
+
NAMES: {
|
|
1118
|
+
SINGULAR: string;
|
|
1119
|
+
PLURAL: string;
|
|
1120
|
+
};
|
|
1121
|
+
ICONS: {
|
|
1122
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1123
|
+
};
|
|
1124
|
+
};
|
|
1125
|
+
};
|
|
1126
|
+
/** The set of registered entity types. */
|
|
1127
|
+
type EntityType = keyof typeof ENTITY_MAPPINGS;
|
|
1128
|
+
/** Deployment override for a single entity: extra/replacement names and icons. */
|
|
1129
|
+
interface EntityRegistryOverride {
|
|
1130
|
+
NAMES?: Record<string, string>;
|
|
1131
|
+
ICONS?: Record<string, EntityIconComponent>;
|
|
1132
|
+
}
|
|
1133
|
+
/**
|
|
1134
|
+
* Layer deployment-specific names/icons onto the canonical registry — call once
|
|
1135
|
+
* at app startup. Merges in place (so live `ENTITY_MAPPINGS` refs pick it up) and
|
|
1136
|
+
* only touches the keys you pass, e.g.:
|
|
1137
|
+
*
|
|
1138
|
+
* ```ts
|
|
1139
|
+
* configureEntityRegistry({
|
|
1140
|
+
* WORKSPACE: { NAMES: { SINGULAR: 'MatterSpace' }, ICONS: { DEFAULT: RotatedSquareM } },
|
|
1141
|
+
* })
|
|
1142
|
+
* ```
|
|
1143
|
+
*/
|
|
1144
|
+
declare function configureEntityRegistry(overrides: Partial<Record<EntityType, EntityRegistryOverride>>): void;
|
|
1145
|
+
/**
|
|
1146
|
+
* Resolve the icon component for an entity type + variant, falling back to the
|
|
1147
|
+
* type's DEFAULT icon for unknown variants.
|
|
1148
|
+
*/
|
|
1149
|
+
declare const getEntityIcon: (entityType: EntityType, variant?: string) => EntityIconComponent | undefined;
|
|
1150
|
+
/**
|
|
1151
|
+
* Display label for an entity type. `SINGULAR` (default); `PLURAL`/`SHORT`/`NEW`
|
|
1152
|
+
* fall back to derivations of the singular when not explicitly configured.
|
|
1153
|
+
*/
|
|
1154
|
+
declare const getEntityLabel: (entityType: EntityType, form?: "SINGULAR" | "PLURAL" | "SHORT" | "NEW") => string;
|
|
1155
|
+
type EntityIconProps = {
|
|
1156
|
+
entityType: EntityType;
|
|
1157
|
+
variant?: string;
|
|
1158
|
+
className?: string;
|
|
1159
|
+
size?: number;
|
|
1160
|
+
color?: string;
|
|
1161
|
+
'data-testid'?: string;
|
|
1162
|
+
onClick?: () => void;
|
|
1163
|
+
} & React__default.SVGAttributes<SVGElement>;
|
|
1164
|
+
/**
|
|
1165
|
+
* Render an entity's icon — the recommended way to show entity glyphs so all
|
|
1166
|
+
* icon choices stay centralised.
|
|
1167
|
+
*/
|
|
1168
|
+
declare const EntityIcon: ({ entityType, variant, ...props }: EntityIconProps) => React__default.ReactElement<React__default.SVGAttributes<SVGElement> & {
|
|
1169
|
+
size?: number | string;
|
|
1170
|
+
className?: string;
|
|
1171
|
+
}, string | React__default.JSXElementConstructor<any>> | null;
|
|
1172
|
+
/** Centralised icons for private/shared visibility states. */
|
|
1173
|
+
declare const VISIBILITY_ICONS: {
|
|
1174
|
+
PRIVATE: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1175
|
+
SHARED: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1176
|
+
};
|
|
1177
|
+
/** Render the private/shared visibility glyph. */
|
|
1178
|
+
declare const VisibilityIcon: ({ isShared, ...props }: {
|
|
1179
|
+
isShared: boolean;
|
|
1180
|
+
className?: string;
|
|
1181
|
+
size?: number;
|
|
1182
|
+
color?: string;
|
|
1183
|
+
"data-testid"?: string;
|
|
1184
|
+
onClick?: () => void;
|
|
1185
|
+
} & React__default.SVGAttributes<SVGElement>) => React__default.FunctionComponentElement<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* Entity colour system — the single source of truth for deriving a stable colour
|
|
1189
|
+
* from an entity id (workspace/tag/doc badges) shared across every app.
|
|
1190
|
+
*
|
|
1191
|
+
* ONE base palette (16 colours, indexed by the hex char at position 5 of an
|
|
1192
|
+
* entity id) + three opacity constants that shift every variant globally. Pure,
|
|
1193
|
+
* framework-free: no React, no store, no app `@/` imports.
|
|
1194
|
+
*/
|
|
1195
|
+
/** Semantic placeholder colour for empty/pending states (gray-400). */
|
|
1196
|
+
declare const PLACEHOLDER_COLOR = "#9ca3af";
|
|
1197
|
+
/** Neutral gray for generic/unknown file types (slate-500). */
|
|
1198
|
+
declare const NEUTRAL_GRAY = "#64748b";
|
|
1199
|
+
/** Base palette — source of truth for all entity colours (hex char 0–f). */
|
|
1200
|
+
declare const BASE_COLORS: Record<string, string>;
|
|
1201
|
+
/**
|
|
1202
|
+
* Deterministic colour for an entity id. The 5th char (index 4) of the id selects
|
|
1203
|
+
* a base colour; the variant picks the opacity treatment.
|
|
1204
|
+
*/
|
|
1205
|
+
declare function getEntityColor(entityId: string, variant?: 'light' | 'medium' | 'text'): string;
|
|
1206
|
+
/** Full badge colour set for an entity id: light background + solid text + border. */
|
|
1207
|
+
declare function getEntityColorStyles(entityId: string): {
|
|
1208
|
+
backgroundColor: string;
|
|
1209
|
+
color: string;
|
|
1210
|
+
borderColor: string;
|
|
1211
|
+
};
|
|
1212
|
+
/**
|
|
1213
|
+
* Colour for a workspace id — the MEDIUM (solid) variant, for white text on top.
|
|
1214
|
+
* Returns the `--primary` token when colours are disabled or the id is invalid,
|
|
1215
|
+
* so callers always get a paintable value.
|
|
1216
|
+
*/
|
|
1217
|
+
declare const getWorkspaceColor: (workspaceId: string | undefined | null, useWorkspaceColors?: boolean) => string;
|
|
1218
|
+
|
|
1219
|
+
interface UserMenuItem {
|
|
1220
|
+
label: string;
|
|
1221
|
+
icon?: ComponentType<{
|
|
1222
|
+
className?: string;
|
|
1223
|
+
}>;
|
|
1224
|
+
onSelect: () => void;
|
|
1225
|
+
testId?: string;
|
|
1226
|
+
/** A count or short state on the right (e.g. the number of files processing). */
|
|
1227
|
+
badge?: string | number;
|
|
1228
|
+
/** A small unread dot on the icon (e.g. new messages). */
|
|
1229
|
+
dot?: boolean;
|
|
1230
|
+
/** Makes the row a labelled on/off switch (role menuitemcheckbox); selecting it flips the state. */
|
|
1231
|
+
checked?: boolean;
|
|
1232
|
+
/** Draw a divider above this row to start a new group. */
|
|
1233
|
+
separatorBefore?: boolean;
|
|
1234
|
+
}
|
|
1235
|
+
/** Connection/presence state shown as a dot on the avatar and a line under the
|
|
1236
|
+
* email — the account menu is where "am I connected" belongs. */
|
|
1237
|
+
interface UserMenuStatus {
|
|
1238
|
+
/** Short state word — "Connected", "Working offline". */
|
|
1239
|
+
label: string;
|
|
1240
|
+
tone: 'online' | 'busy' | 'offline';
|
|
1241
|
+
/** Fine print under the label (e.g. the server domain). */
|
|
1242
|
+
detail?: string;
|
|
1243
|
+
testId?: string;
|
|
1244
|
+
}
|
|
1245
|
+
interface UserMenuProps {
|
|
1246
|
+
user: {
|
|
1247
|
+
name: string;
|
|
1248
|
+
email?: string | null;
|
|
1249
|
+
picture?: string | null;
|
|
1250
|
+
};
|
|
1251
|
+
/** Optional connection status: avatar dot + a line in the dropdown header. */
|
|
1252
|
+
status?: UserMenuStatus;
|
|
1253
|
+
/** Account actions above the sign-out divider (e.g. Settings). */
|
|
1254
|
+
items?: UserMenuItem[];
|
|
1255
|
+
onLogout: () => void;
|
|
1256
|
+
logoutLabel?: string;
|
|
1257
|
+
align?: 'start' | 'center' | 'end';
|
|
1258
|
+
/** Which side of the trigger the menu opens on (a footer trigger opens upward or sideways). */
|
|
1259
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
1260
|
+
/**
|
|
1261
|
+
* `avatar` (default): avatar + chevron. `account`: a full-width account bar, avatar + display
|
|
1262
|
+
* name + chevron, for a sidebar footer.
|
|
1263
|
+
*/
|
|
1264
|
+
variant?: 'avatar' | 'account';
|
|
1265
|
+
/** `avatar` only: draw the chevron (the icon-only rail hides it). */
|
|
1266
|
+
showChevron?: boolean;
|
|
1267
|
+
classNames?: {
|
|
1268
|
+
trigger?: string;
|
|
1269
|
+
fallback?: string;
|
|
1270
|
+
};
|
|
1271
|
+
testId?: string;
|
|
1272
|
+
logoutTestId?: string;
|
|
1273
|
+
}
|
|
1274
|
+
declare function UserMenu({ user, status, items, onLogout, logoutLabel, align, side, variant, showChevron, classNames, testId, logoutTestId, }: UserMenuProps): React$1.JSX.Element;
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
* DocumentCard — the canonical document thumbnail tile.
|
|
1278
|
+
*
|
|
1279
|
+
* One tile, shared by every app: a full-bleed first-page thumbnail (falling back
|
|
1280
|
+
* to the file-type icon) with the selection checkbox, the actions menu, the
|
|
1281
|
+
* processing state and the document's name pill layered on top of it, rather
|
|
1282
|
+
* than a thumbnail box with a separate meta strip beneath.
|
|
1283
|
+
*
|
|
1284
|
+
* Presentational only — it takes a thumbnail, a status and callbacks, and knows
|
|
1285
|
+
* nothing about how documents are fetched. `DocumentGallery` binds it to data.
|
|
1286
|
+
*/
|
|
1287
|
+
|
|
1288
|
+
interface DocumentCardProps {
|
|
1289
|
+
/** The document — anything with a file name and optional metadata title. */
|
|
1290
|
+
doc: DocumentLike;
|
|
1291
|
+
/** First-page thumbnail (data URI or URL). Falls back to the file-type icon. */
|
|
1292
|
+
thumbnailUrl?: string | null;
|
|
1293
|
+
/** Processing status, e.g. `parsing` (overlay) or `completed` (corner marker). */
|
|
1294
|
+
status?: string | null;
|
|
1295
|
+
/** Renders the selection checkbox. Omit `onToggleSelect` to hide it entirely. */
|
|
1296
|
+
selected?: boolean;
|
|
1297
|
+
onToggleSelect?: () => void;
|
|
1298
|
+
/** Pins the "eye" on the name pill — this is the document open in the viewer. */
|
|
1299
|
+
viewing?: boolean;
|
|
1300
|
+
onOpen?: () => void;
|
|
1301
|
+
/** Actions menu, pinned to the tile's top-right corner. */
|
|
1302
|
+
actions?: React__default.ReactNode;
|
|
1303
|
+
/** Swaps the name pill for an inline rename field. */
|
|
1304
|
+
renaming?: boolean;
|
|
1305
|
+
onCommitRename?: (name: string) => void;
|
|
1306
|
+
onCancelRename?: () => void;
|
|
1307
|
+
/** Replaces the pill's default hover tooltip (e.g. an AI summary + labels). */
|
|
1308
|
+
tooltipContent?: React__default.ReactNode;
|
|
1309
|
+
/** Bottom-left marker slot (e.g. an "available offline" glyph). */
|
|
1310
|
+
marker?: React__default.ReactNode;
|
|
1311
|
+
testId?: string;
|
|
1312
|
+
className?: string;
|
|
1313
|
+
}
|
|
1314
|
+
declare function DocumentCard({ doc, thumbnailUrl, status, selected, onToggleSelect, viewing, onOpen, actions, renaming, onCommitRename, onCancelRename, tooltipContent, marker, testId, className, }: DocumentCardProps): React__default.JSX.Element;
|
|
1315
|
+
|
|
441
1316
|
/**
|
|
442
1317
|
* Core utility: `cn()` — merge class names with Tailwind-aware conflict
|
|
443
1318
|
* resolution (clsx + tailwind-merge). Copied faithfully from the ARBI app so the
|
|
@@ -446,4 +1321,4 @@ declare const markdownBaseComponents: Partial<Components>;
|
|
|
446
1321
|
|
|
447
1322
|
declare function cn(...inputs: ClassValue[]): string;
|
|
448
1323
|
|
|
449
|
-
export { AiMarkdown, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type 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, type DictateContextValue, DictateProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCard, HoverCardContent, HoverCardTrigger, IconToggle, type IconToggleProps, Input, type InputProps, Label, MarkdownRenderer, type 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, type TextareaProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, markdownBaseComponents, splitMarkdownBlocks, toggleVariants };
|
|
1324
|
+
export { AgentBadge, AiMarkdown, Avatar, AvatarFallback, AvatarImage, BASE_COLORS, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, type DialogPresentation, DialogTitle, DialogTrigger, type DictateContextValue, DictateProvider, DocumentCard, type DocumentCardProps, DocumentEntity, type DocumentEntityProps, type DocumentLike, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENTITY_MAPPINGS, EntityIcon, type EntityIconComponent, EntityPill, type EntityRegistryOverride, type EntityType, HoverCard, HoverCardContent, HoverCardTrigger, IconToggle, type IconToggleProps, Input, type InputProps, Label, MarkMenu, type MarkMenuItem, type MarkMenuProps, MarkdownRenderer, type MarkdownRendererProps, MarkdownStreamingContext, NEUTRAL_GRAY, PLACEHOLDER_COLOR, PassageCard, type PassageCardProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type PresenceDisplayStatus, PresenceLabel, Progress, ProjectEntity, type ProjectEntityProps, type ProjectRelation, RadioGroup, RadioGroupItem, type Rag, RagDot, RelevanceDot, ScrollArea, ScrollBar, 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, type TextareaProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuStatus, VISIBILITY_ICONS, VisibilityIcon, badgeVariants, buttonVariants, cardVariants, cn, configureEntityRegistry, configureRagLabels, configureStatusRegistry, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceColor, markdownBaseComponents, splitMarkdownBlocks, toggleVariants };
|