@arbidocs/react 0.4.70 → 0.4.72

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 (75) hide show
  1. package/README.md +6 -4
  2. package/dist/ProductionDialog-BRrZ5Lj5.d.cts +84 -0
  3. package/dist/ProductionDialog-DUC9BXWS.d.ts +84 -0
  4. package/dist/annotations/freeze/index.cjs +45 -1100
  5. package/dist/annotations/freeze/index.cjs.map +1 -1
  6. package/dist/annotations/freeze/index.d.cts +2 -85
  7. package/dist/annotations/freeze/index.d.ts +2 -85
  8. package/dist/annotations/freeze/index.js +4 -1084
  9. package/dist/annotations/freeze/index.js.map +1 -1
  10. package/dist/annotations/index.cjs +48 -48
  11. package/dist/annotations/index.d.cts +3 -51
  12. package/dist/annotations/index.d.ts +3 -51
  13. package/dist/annotations/index.js +2 -2
  14. package/dist/artifacts/index.cjs +9 -9
  15. package/dist/artifacts/index.js +2 -2
  16. package/dist/bundle-BnCSbHy2.d.cts +85 -0
  17. package/dist/bundle-BnCSbHy2.d.ts +85 -0
  18. package/dist/bundle-N2JIJ2T6.js +4 -0
  19. package/dist/bundle-N2JIJ2T6.js.map +1 -0
  20. package/dist/bundle-T6BEVYHE.cjs +13 -0
  21. package/dist/bundle-T6BEVYHE.cjs.map +1 -0
  22. package/dist/{chunk-7CL7QHT6.cjs → chunk-GE5TAR7Y.cjs} +26 -25
  23. package/dist/chunk-GE5TAR7Y.cjs.map +1 -0
  24. package/dist/{chunk-3QF5DNAP.js → chunk-IHTBAY57.js} +3 -3
  25. package/dist/{chunk-3QF5DNAP.js.map → chunk-IHTBAY57.js.map} +1 -1
  26. package/dist/{chunk-ZMTLGO3K.cjs → chunk-IIT7DMQL.cjs} +6 -2
  27. package/dist/chunk-IIT7DMQL.cjs.map +1 -0
  28. package/dist/{chunk-SYPUFZGA.js → chunk-IQ5TYPVU.js} +4 -3
  29. package/dist/chunk-IQ5TYPVU.js.map +1 -0
  30. package/dist/{chunk-ULU5LEWF.cjs → chunk-L2PXZWJM.cjs} +25 -25
  31. package/dist/{chunk-ULU5LEWF.cjs.map → chunk-L2PXZWJM.cjs.map} +1 -1
  32. package/dist/{chunk-V4CXOPLB.js → chunk-MHCN7OST.js} +19 -7
  33. package/dist/{chunk-V4CXOPLB.js.map → chunk-MHCN7OST.js.map} +1 -1
  34. package/dist/{chunk-BTRIS3HY.cjs → chunk-QJRP2LLQ.cjs} +19 -6
  35. package/dist/chunk-QJRP2LLQ.cjs.map +1 -0
  36. package/dist/chunk-QJXFRP5R.cjs +1103 -0
  37. package/dist/chunk-QJXFRP5R.cjs.map +1 -0
  38. package/dist/{chunk-J4MX2W4H.js → chunk-WBYNKFUO.js} +6 -3
  39. package/dist/chunk-WBYNKFUO.js.map +1 -0
  40. package/dist/{chunk-LQ5YHB7W.cjs → chunk-WYZJLZ67.cjs} +6 -4
  41. package/dist/chunk-WYZJLZ67.cjs.map +1 -0
  42. package/dist/{chunk-WS6DF5X4.js → chunk-YNNAJJ5Z.js} +6 -4
  43. package/dist/chunk-YNNAJJ5Z.js.map +1 -0
  44. package/dist/chunk-ZJMUNGOY.js +1088 -0
  45. package/dist/chunk-ZJMUNGOY.js.map +1 -0
  46. package/dist/document-tools/index.cjs +226 -11
  47. package/dist/document-tools/index.cjs.map +1 -1
  48. package/dist/document-tools/index.d.cts +139 -9
  49. package/dist/document-tools/index.d.ts +139 -9
  50. package/dist/document-tools/index.js +207 -9
  51. package/dist/document-tools/index.js.map +1 -1
  52. package/dist/{index-BWv_FKi3.d.cts → index-BVMBElCu.d.cts} +82 -1
  53. package/dist/{index-BWv_FKi3.d.ts → index-BVMBElCu.d.ts} +82 -1
  54. package/dist/index.cjs +688 -369
  55. package/dist/index.cjs.map +1 -1
  56. package/dist/index.d.cts +208 -4
  57. package/dist/index.d.ts +208 -4
  58. package/dist/index.js +313 -11
  59. package/dist/index.js.map +1 -1
  60. package/dist/ui/index.cjs +137 -133
  61. package/dist/ui/index.d.cts +1 -1
  62. package/dist/ui/index.d.ts +1 -1
  63. package/dist/ui/index.js +2 -2
  64. package/dist/viewers/index.cjs +2 -2
  65. package/dist/viewers/index.js +1 -1
  66. package/package.json +4 -3
  67. package/dist/chunk-7CL7QHT6.cjs.map +0 -1
  68. package/dist/chunk-BTRIS3HY.cjs.map +0 -1
  69. package/dist/chunk-J4MX2W4H.js.map +0 -1
  70. package/dist/chunk-LQ5YHB7W.cjs.map +0 -1
  71. package/dist/chunk-SYPUFZGA.js.map +0 -1
  72. package/dist/chunk-WS6DF5X4.js.map +0 -1
  73. package/dist/chunk-ZMTLGO3K.cjs.map +0 -1
  74. package/dist/store-CqkkD7Ho.d.cts +0 -35
  75. package/dist/store-D1nhbkgk.d.ts +0 -35
@@ -25,6 +25,77 @@ import * as TogglePrimitive from '@radix-ui/react-toggle';
25
25
  import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
26
26
  import { Components } from 'react-markdown';
27
27
 
28
+ /**
29
+ * Identity verification types, SDK-free so presentational blocks can take an
30
+ * `IdentityVerificationFlow` through `@arbidocs/react/ui`. `IdentityStatus` mirrors the backend's
31
+ * `IdentityStatusResponse` (`GET /v1/user/identity`).
32
+ */
33
+ type IdentityState = 'none' | 'in_progress' | 'in_review' | 'name_mismatch' | 'declined' | 'verified';
34
+ interface IdentityStatus {
35
+ enabled: boolean;
36
+ /** Owns a Pro project to charge the fee to (free users don't get the feature). */
37
+ eligible: boolean;
38
+ required: boolean;
39
+ /** The one-time fee incl. UK VAT. */
40
+ price_pence: number;
41
+ currency: string;
42
+ attempts_per_fee: number;
43
+ state: IdentityState;
44
+ attempts_left: number;
45
+ /** A fee charge waiting for the bank's 3-D Secure confirmation. */
46
+ pending_payment_url?: string | null;
47
+ /** The tick: passed a check, and the account name still matches it. */
48
+ verified: boolean;
49
+ document_country?: string | null;
50
+ /** Only in `name_mismatch`: the name on the document, offered as the account name. */
51
+ document_given_name?: string | null;
52
+ document_family_name?: string | null;
53
+ }
54
+ interface IdentityPurchase {
55
+ status: 'paid' | 'requires_action';
56
+ payment_url?: string | null;
57
+ }
58
+ type IdentityStep = 'pay' | 'verify' | 'result';
59
+ type IdentityBusy = 'pay' | 'start' | 'refresh' | 'accept' | 'remove' | null;
60
+ /** A refused or failed call: the backend's code (`PRO_REQUIRED`, `PAYMENT_DECLINED`, …) and text. */
61
+ interface IdentityProblem {
62
+ code?: string;
63
+ message: string;
64
+ }
65
+ /** The verification dialog's state and actions (`useIdentityVerificationFlow`). */
66
+ interface IdentityVerificationFlow {
67
+ status: IdentityStatus | undefined;
68
+ isLoading: boolean;
69
+ /** The fee as the UI shows it ("£5.00 incl. VAT"), once the status is known. */
70
+ price: string | null;
71
+ isOpen: boolean;
72
+ open: () => void;
73
+ close: () => void;
74
+ step: IdentityStep;
75
+ busy: IdentityBusy;
76
+ problem: IdentityProblem | null;
77
+ /** The bank wants the fee confirmed (3-D Secure) on this page; then call `recheckPayment`. */
78
+ paymentUrl: string | null;
79
+ pay: () => void;
80
+ recheckPayment: () => void;
81
+ /** Id for the element Didit renders into (render it with a height while `step === 'verify'`). */
82
+ verifyContainerId: string;
83
+ /** Attach the Didit host element; the flow mounts the SDK into it once the session is open. */
84
+ verifyContainerRef: (el: HTMLElement | null) => void;
85
+ /** Didit could not run here (blocked camera, add-in frame): offer `openInNewTab`. */
86
+ embedFailed: boolean;
87
+ openInNewTab: () => void;
88
+ /** Ask for the result now ("I've finished"). */
89
+ checkResult: () => void;
90
+ /** Try again after a decline (uses one of the attempts left). */
91
+ retry: () => void;
92
+ /** Take the document's name as the account name (name_mismatch). */
93
+ acceptName: () => void;
94
+ /** Keep the account name: closes without the tick (renaming later can still match). */
95
+ keepName: () => void;
96
+ remove: () => void;
97
+ }
98
+
28
99
  /**
29
100
  * Minimal, dependency-free tooltip — a drop-in API replacement for a Radix
30
101
  * wrapper (same exports/props: Tooltip, TooltipTrigger, TooltipContent,
@@ -917,6 +988,8 @@ interface UserEntityProps {
917
988
  colorClass?: string;
918
989
  /** Whether this user is an agent — drives the dashed ring + bot badge. */
919
990
  isAgent?: boolean;
991
+ /** Verified tick (passed an ID check under this name): a badge after the name in the pill. */
992
+ isVerified?: boolean;
920
993
  /** Inline border/text colour for agent avatars (from the app's agentAvatarColors). */
921
994
  agentStyle?: React__default.CSSProperties;
922
995
  /**
@@ -940,6 +1013,14 @@ interface UserEntityProps {
940
1013
  }
941
1014
  declare const UserEntity: React__default.NamedExoticComponent<UserEntityProps>;
942
1015
 
1016
+ interface VerifiedBadgeProps {
1017
+ className?: string;
1018
+ /** Accessible name and hover text; default "Identity verified". */
1019
+ label?: string;
1020
+ }
1021
+ /** The verified tick: the user passed an ID check under the name shown. */
1022
+ declare function VerifiedBadge({ className, label }: VerifiedBadgeProps): React$1.JSX.Element;
1023
+
943
1024
  /**
944
1025
  * "AGENT" stamp for an `agt-` peer.
945
1026
  *
@@ -1437,4 +1518,4 @@ declare function DocumentCard({ doc, thumbnailUrl, status, selected, onToggleSel
1437
1518
 
1438
1519
  declare function cn(...inputs: ClassValue[]): string;
1439
1520
 
1440
- export { DropdownMenuLabel as $, AgentBadge as A, BASE_COLORS as B, Card as C, CommandShortcut as D, Dialog as E, DialogClose as F, DialogContent as G, DialogDescription as H, DialogFooter as I, DialogHeader as J, DialogOverlay as K, DialogPortal as L, type DialogPresentation as M, DialogTitle as N, DialogTrigger as O, type DictateContextValue as P, DictateProvider as Q, DocumentCard as R, type DocumentCardProps as S, DocumentEntity as T, type DocumentEntityProps as U, type DocumentLike as V, DropdownMenu as W, DropdownMenuCheckboxItem as X, DropdownMenuContent as Y, DropdownMenuGroup as Z, DropdownMenuItem as _, AiMarkdown as a, type StatusBadgeComponent as a$, DropdownMenuPortal as a0, DropdownMenuRadioGroup as a1, DropdownMenuRadioItem as a2, DropdownMenuSeparator as a3, DropdownMenuShortcut as a4, DropdownMenuSub as a5, DropdownMenuSubContent as a6, DropdownMenuSubTrigger as a7, DropdownMenuTrigger as a8, ENTITY_MAPPINGS as a9, PopoverTrigger as aA, PortalContainerProvider as aB, type PresenceDisplayStatus as aC, PresenceLabel as aD, Progress as aE, ProjectEntity as aF, type ProjectEntityProps as aG, type ProjectRelation as aH, RadioGroup as aI, RadioGroupItem as aJ, type Rag as aK, RagDot as aL, RelevanceDot as aM, ScrollArea as aN, ScrollBar as aO, Select as aP, SelectContent as aQ, SelectGroup as aR, SelectItem as aS, SelectLabel as aT, SelectScrollDownButton as aU, SelectScrollUpButton as aV, SelectSeparator as aW, SelectTrigger as aX, SelectValue as aY, Separator as aZ, Slider as a_, EntityIcon as aa, type EntityIconComponent as ab, EntityPill as ac, type EntityRegistryOverride as ad, type EntityType as ae, HoverCard as af, HoverCardContent as ag, HoverCardTrigger as ah, IconToggle as ai, type IconToggleProps as aj, Input as ak, type InputProps as al, Label as am, MarkMenu as an, type MarkMenuItem as ao, type MarkMenuProps as ap, MarkdownRenderer as aq, type MarkdownRendererProps as ar, MarkdownStreamingContext as as, NEUTRAL_GRAY as at, PLACEHOLDER_COLOR as au, PassageCard as av, type PassageCardProps as aw, Popover as ax, PopoverAnchor as ay, PopoverContent as az, Avatar as b, trimOpenCitation as b$, type StatusBadgeProps as b0, StatusPill as b1, type StatusPillProps as b2, type StatusVariant as b3, Switch as b4, TAG_TYPE_ICONS as b5, TAG_TYPE_LABELS as b6, Table as b7, TableBody as b8, TableCaption as b9, type UserMenuProps as bA, type UserMenuStatus as bB, VISIBILITY_ICONS as bC, VisibilityIcon as bD, VisibilityToggle as bE, type VisibilityToggleProps as bF, badgeVariants as bG, buttonVariants as bH, cardVariants as bI, closeOpenEmphasis as bJ, cn as bK, configureEntityRegistry as bL, configureRagLabels as bM, configureStatusRegistry as bN, getDocIcon as bO, getEntityColor as bP, getEntityColorStyles as bQ, getEntityIcon as bR, getEntityLabel as bS, getStatusVariant as bT, getTagTypeIcon as bU, getTagTypeLabel as bV, getWorkspaceColor as bW, markdownBaseComponents as bX, normalizeCitationMarkup as bY, splitMarkdownBlocks as bZ, toggleVariants as b_, TableCell as ba, TableFooter as bb, TableHead as bc, TableHeader as bd, TableRow as be, Tabs as bf, TabsContent as bg, TabsList as bh, TabsTrigger as bi, TagEntity as bj, type TagEntityProps as bk, type TagLike as bl, Textarea as bm, type TextareaProps as bn, ThreadVisibilityIcon as bo, Toggle as bp, ToggleGroup as bq, ToggleGroupItem as br, Tooltip as bs, TooltipContent as bt, TooltipProvider as bu, TooltipTrigger as bv, UserEntity as bw, type UserEntityProps as bx, UserMenu as by, type UserMenuItem as bz, AvatarFallback as c, usePortalContainer as c0, AvatarImage as d, Badge as e, type BadgeProps as f, Button as g, type ButtonProps as h, CardContent as i, CardDescription as j, CardFooter as k, CardHeader as l, type CardProps as m, CardTitle as n, Checkbox as o, Collapsible as p, CollapsibleContent as q, CollapsibleTrigger as r, Command as s, CommandDialog as t, CommandEmpty as u, CommandGroup as v, CommandInput as w, CommandItem as x, CommandList as y, CommandSeparator as z };
1521
+ export { DropdownMenuLabel as $, AgentBadge as A, BASE_COLORS as B, Card as C, CommandShortcut as D, Dialog as E, DialogClose as F, DialogContent as G, DialogDescription as H, DialogFooter as I, DialogHeader as J, DialogOverlay as K, DialogPortal as L, type DialogPresentation as M, DialogTitle as N, DialogTrigger as O, type DictateContextValue as P, DictateProvider as Q, DocumentCard as R, type DocumentCardProps as S, DocumentEntity as T, type DocumentEntityProps as U, type DocumentLike as V, DropdownMenu as W, DropdownMenuCheckboxItem as X, DropdownMenuContent as Y, DropdownMenuGroup as Z, DropdownMenuItem as _, AiMarkdown as a, SelectScrollDownButton as a$, DropdownMenuPortal as a0, DropdownMenuRadioGroup as a1, DropdownMenuRadioItem as a2, DropdownMenuSeparator as a3, DropdownMenuShortcut as a4, DropdownMenuSub as a5, DropdownMenuSubContent as a6, DropdownMenuSubTrigger as a7, DropdownMenuTrigger as a8, ENTITY_MAPPINGS as a9, NEUTRAL_GRAY as aA, PLACEHOLDER_COLOR as aB, PassageCard as aC, type PassageCardProps as aD, Popover as aE, PopoverAnchor as aF, PopoverContent as aG, PopoverTrigger as aH, PortalContainerProvider as aI, type PresenceDisplayStatus as aJ, PresenceLabel as aK, Progress as aL, ProjectEntity as aM, type ProjectEntityProps as aN, type ProjectRelation as aO, RadioGroup as aP, RadioGroupItem as aQ, type Rag as aR, RagDot as aS, RelevanceDot as aT, ScrollArea as aU, ScrollBar as aV, Select as aW, SelectContent as aX, SelectGroup as aY, SelectItem as aZ, SelectLabel as a_, EntityIcon as aa, type EntityIconComponent as ab, EntityPill as ac, type EntityRegistryOverride as ad, type EntityType as ae, HoverCard as af, HoverCardContent as ag, HoverCardTrigger as ah, IconToggle as ai, type IconToggleProps as aj, type IdentityBusy as ak, type IdentityProblem as al, type IdentityPurchase as am, type IdentityState as an, type IdentityStatus as ao, type IdentityStep as ap, type IdentityVerificationFlow as aq, Input as ar, type InputProps as as, Label as at, MarkMenu as au, type MarkMenuItem as av, type MarkMenuProps as aw, MarkdownRenderer as ax, type MarkdownRendererProps as ay, MarkdownStreamingContext as az, Avatar as b, getEntityLabel as b$, SelectScrollUpButton as b0, SelectSeparator as b1, SelectTrigger as b2, SelectValue as b3, Separator as b4, Slider as b5, type StatusBadgeComponent as b6, type StatusBadgeProps as b7, StatusPill as b8, type StatusPillProps as b9, TooltipContent as bA, TooltipProvider as bB, TooltipTrigger as bC, UserEntity as bD, type UserEntityProps as bE, UserMenu as bF, type UserMenuItem as bG, type UserMenuProps as bH, type UserMenuStatus as bI, VISIBILITY_ICONS as bJ, VerifiedBadge as bK, type VerifiedBadgeProps as bL, VisibilityIcon as bM, VisibilityToggle as bN, type VisibilityToggleProps as bO, badgeVariants as bP, buttonVariants as bQ, cardVariants as bR, closeOpenEmphasis as bS, cn as bT, configureEntityRegistry as bU, configureRagLabels as bV, configureStatusRegistry as bW, getDocIcon as bX, getEntityColor as bY, getEntityColorStyles as bZ, getEntityIcon as b_, type StatusVariant as ba, Switch as bb, TAG_TYPE_ICONS as bc, TAG_TYPE_LABELS as bd, Table as be, TableBody as bf, TableCaption as bg, TableCell as bh, TableFooter as bi, TableHead as bj, TableHeader as bk, TableRow as bl, Tabs as bm, TabsContent as bn, TabsList as bo, TabsTrigger as bp, TagEntity as bq, type TagEntityProps as br, type TagLike as bs, Textarea as bt, type TextareaProps as bu, ThreadVisibilityIcon as bv, Toggle as bw, ToggleGroup as bx, ToggleGroupItem as by, Tooltip as bz, AvatarFallback as c, getStatusVariant as c0, getTagTypeIcon as c1, getTagTypeLabel as c2, getWorkspaceColor as c3, markdownBaseComponents as c4, normalizeCitationMarkup as c5, splitMarkdownBlocks as c6, toggleVariants as c7, trimOpenCitation as c8, usePortalContainer as c9, AvatarImage as d, Badge as e, type BadgeProps as f, Button as g, type ButtonProps as h, CardContent as i, CardDescription as j, CardFooter as k, CardHeader as l, type CardProps as m, CardTitle as n, Checkbox as o, Collapsible as p, CollapsibleContent as q, CollapsibleTrigger as r, Command as s, CommandDialog as t, CommandEmpty as u, CommandGroup as v, CommandInput as w, CommandItem as x, CommandList as y, CommandSeparator as z };