@arbidocs/react 0.4.91 → 0.4.93

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/ui/index.js CHANGED
@@ -1,7 +1,7 @@
1
- export { AgentBadge, AiMarkdown, Avatar, AvatarFallback, AvatarImage, BASE_COLORS, Badge, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DictateProvider, DocumentCard, DocumentEntity, ENTITY_MAPPINGS, EntityIcon, EntityPill, HoverCard, HoverCardContent, HoverCardTrigger, IconToggle, Input, Label, MarkMenu, NEUTRAL_GRAY, PLACEHOLDER_COLOR, PassageCard, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PresenceLabel, Progress, ProjectEntity, RadioGroup, RadioGroupItem, RagDot, RelevanceDot, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, StatusPill, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, Textarea, ThreadVisibilityIcon, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserEntity, UserMenu, VISIBILITY_ICONS, VerifiedBadge, VisibilityIcon, VisibilityToggle, badgeVariants, cardVariants, configureEntityRegistry, configureRagLabels, configureStatusRegistry, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceColor, toggleVariants } from '../chunk-YQKMBQRX.js';
2
- export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, buttonVariants } from '../chunk-YNNAJJ5Z.js';
1
+ export { AgentBadge, AiMarkdown, Avatar, AvatarFallback, AvatarImage, BASE_COLORS, Badge, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DictateProvider, DocumentCard, DocumentEntity, ENTITY_MAPPINGS, EntityIcon, EntityPill, HoverCard, HoverCardContent, HoverCardTrigger, IconToggle, Input, Label, MarkMenu, NEUTRAL_GRAY, PLACEHOLDER_COLOR, PassageCard, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PresenceLabel, Progress, ProjectEntity, RadioGroup, RadioGroupItem, RagDot, RelevanceDot, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, StatusPill, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, Textarea, ThreadVisibilityIcon, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserEntity, UserMenu, VISIBILITY_ICONS, VerifiedBadge, VisibilityIcon, VisibilityToggle, badgeVariants, cardVariants, configureEntityRegistry, configureRagLabels, configureStatusRegistry, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceColor, toggleVariants } from '../chunk-5UOGYTLH.js';
3
2
  export { MarkdownRenderer, MarkdownStreamingContext, markdownBaseComponents, splitMarkdownBlocks } from '../chunk-YXSXGTYQ.js';
4
3
  export { closeOpenEmphasis, trimOpenCitation } from '../chunk-QRCMKEE6.js';
4
+ export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, buttonVariants } from '../chunk-YNNAJJ5Z.js';
5
5
  export { ScrollArea, ScrollBar } from '../chunk-W4H6XAIU.js';
6
6
  export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, PortalContainerProvider, usePortalContainer } from '../chunk-47CCGUWR.js';
7
7
  export { cn } from '../chunk-SN5YV6FF.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbidocs/react",
3
- "version": "0.4.91",
3
+ "version": "0.4.93",
4
4
  "description": "React hooks and provider for the ARBI SDK",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -93,8 +93,8 @@
93
93
  "build-storybook": "storybook build"
94
94
  },
95
95
  "dependencies": {
96
- "@arbidocs/client": "0.4.91",
97
- "@arbidocs/sdk": "0.4.91",
96
+ "@arbidocs/client": "0.4.93",
97
+ "@arbidocs/sdk": "0.4.93",
98
98
  "@didit-protocol/sdk-web": "0.4.0",
99
99
  "@radix-ui/react-avatar": "^1.2.0",
100
100
  "@radix-ui/react-checkbox": "^1.3.5",
@@ -1,37 +1,5 @@
1
- import { b as AnnotationLayer } from './model-DIwXRuGC.cjs';
2
1
  import * as React from 'react';
3
-
4
- /**
5
- * Where a layer is kept. The layer is data about a document, not part of it, so the host decides
6
- * (backend API, IndexedDB, a file). This package ships an in-memory store and a localStorage
7
- * store; both validate on load because stored JSON is untrusted. A store shared by several
8
- * writers (ARBI's server-side markup) also implements the optional members: it may merge on save,
9
- * pull others' changes, and say whether this user may write at all.
10
- */
11
-
12
- interface AnnotationStore {
13
- /** The saved layer, or an empty one for a document that has none yet. */
14
- load(documentId: string): Promise<AnnotationLayer>;
15
- /**
16
- * Write a layer. A store with other writers may resolve to what it actually saved — this layer
17
- * merged with theirs (see `mergeLayers`); the caller then rebases its newer edits onto it.
18
- */
19
- save(layer: AnnotationLayer): Promise<AnnotationLayer | void>;
20
- /** Others' changes since the last load or save, or null when there are none. */
21
- pull?(documentId: string): Promise<AnnotationLayer | null>;
22
- /** Whether this user may change the layer; false makes it view-only. Known after `load`. */
23
- canEdit?(documentId: string): boolean;
24
- }
25
- /** Thrown by a store whose backend cannot be reached: the layer is kept and saved when back. */
26
- declare class AnnotationStoreOfflineError extends Error {
27
- constructor(message?: string);
28
- }
29
- declare function createMemoryStore(now?: () => string): AnnotationStore;
30
- /**
31
- * Per-browser store. Storage can be absent, full or blocked (private windows), so every access is
32
- * guarded. A saved layer that no longer validates is ignored rather than crashing the viewer.
33
- */
34
- declare function createLocalStorageStore(storage?: Pick<Storage, 'getItem' | 'setItem'> | undefined, now?: () => string): AnnotationStore;
2
+ import { b as AnnotationLayer } from './model-DIwXRuGC.cjs';
35
3
 
36
4
  /**
37
5
  * Asks how to number and package a set of documents as a production. It only collects choices; the
@@ -81,4 +49,36 @@ declare function qrCornerFor(corner: ProductionCorner): ProductionCorner;
81
49
  declare function moveItem<T>(items: readonly T[], from: number, to: number): T[];
82
50
  declare function ProductionDialog({ open, onOpenChange, documents, leftOut, onConfirm, busy, progress, error, }: ProductionDialogProps): React.JSX.Element;
83
51
 
52
+ /**
53
+ * Where a layer is kept. The layer is data about a document, not part of it, so the host decides
54
+ * (backend API, IndexedDB, a file). This package ships an in-memory store and a localStorage
55
+ * store; both validate on load because stored JSON is untrusted. A store shared by several
56
+ * writers (ARBI's server-side markup) also implements the optional members: it may merge on save,
57
+ * pull others' changes, and say whether this user may write at all.
58
+ */
59
+
60
+ interface AnnotationStore {
61
+ /** The saved layer, or an empty one for a document that has none yet. */
62
+ load(documentId: string): Promise<AnnotationLayer>;
63
+ /**
64
+ * Write a layer. A store with other writers may resolve to what it actually saved — this layer
65
+ * merged with theirs (see `mergeLayers`); the caller then rebases its newer edits onto it.
66
+ */
67
+ save(layer: AnnotationLayer): Promise<AnnotationLayer | void>;
68
+ /** Others' changes since the last load or save, or null when there are none. */
69
+ pull?(documentId: string): Promise<AnnotationLayer | null>;
70
+ /** Whether this user may change the layer; false makes it view-only. Known after `load`. */
71
+ canEdit?(documentId: string): boolean;
72
+ }
73
+ /** Thrown by a store whose backend cannot be reached: the layer is kept and saved when back. */
74
+ declare class AnnotationStoreOfflineError extends Error {
75
+ constructor(message?: string);
76
+ }
77
+ declare function createMemoryStore(now?: () => string): AnnotationStore;
78
+ /**
79
+ * Per-browser store. Storage can be absent, full or blocked (private windows), so every access is
80
+ * guarded. A saved layer that no longer validates is ignored rather than crashing the viewer.
81
+ */
82
+ declare function createLocalStorageStore(storage?: Pick<Storage, 'getItem' | 'setItem'> | undefined, now?: () => string): AnnotationStore;
83
+
84
84
  export { type AnnotationStore as A, type ProductionChoices as P, AnnotationStoreOfflineError as a, type ProductionCorner as b, ProductionDialog as c, type ProductionDialogProps as d, type ProductionDocument as e, createLocalStorageStore as f, createMemoryStore as g, moveItem as m, qrCornerFor as q };
@@ -1,37 +1,5 @@
1
- import { b as AnnotationLayer } from './model-DIwXRuGC.js';
2
1
  import * as React from 'react';
3
-
4
- /**
5
- * Where a layer is kept. The layer is data about a document, not part of it, so the host decides
6
- * (backend API, IndexedDB, a file). This package ships an in-memory store and a localStorage
7
- * store; both validate on load because stored JSON is untrusted. A store shared by several
8
- * writers (ARBI's server-side markup) also implements the optional members: it may merge on save,
9
- * pull others' changes, and say whether this user may write at all.
10
- */
11
-
12
- interface AnnotationStore {
13
- /** The saved layer, or an empty one for a document that has none yet. */
14
- load(documentId: string): Promise<AnnotationLayer>;
15
- /**
16
- * Write a layer. A store with other writers may resolve to what it actually saved — this layer
17
- * merged with theirs (see `mergeLayers`); the caller then rebases its newer edits onto it.
18
- */
19
- save(layer: AnnotationLayer): Promise<AnnotationLayer | void>;
20
- /** Others' changes since the last load or save, or null when there are none. */
21
- pull?(documentId: string): Promise<AnnotationLayer | null>;
22
- /** Whether this user may change the layer; false makes it view-only. Known after `load`. */
23
- canEdit?(documentId: string): boolean;
24
- }
25
- /** Thrown by a store whose backend cannot be reached: the layer is kept and saved when back. */
26
- declare class AnnotationStoreOfflineError extends Error {
27
- constructor(message?: string);
28
- }
29
- declare function createMemoryStore(now?: () => string): AnnotationStore;
30
- /**
31
- * Per-browser store. Storage can be absent, full or blocked (private windows), so every access is
32
- * guarded. A saved layer that no longer validates is ignored rather than crashing the viewer.
33
- */
34
- declare function createLocalStorageStore(storage?: Pick<Storage, 'getItem' | 'setItem'> | undefined, now?: () => string): AnnotationStore;
2
+ import { b as AnnotationLayer } from './model-DIwXRuGC.js';
35
3
 
36
4
  /**
37
5
  * Asks how to number and package a set of documents as a production. It only collects choices; the
@@ -81,4 +49,36 @@ declare function qrCornerFor(corner: ProductionCorner): ProductionCorner;
81
49
  declare function moveItem<T>(items: readonly T[], from: number, to: number): T[];
82
50
  declare function ProductionDialog({ open, onOpenChange, documents, leftOut, onConfirm, busy, progress, error, }: ProductionDialogProps): React.JSX.Element;
83
51
 
52
+ /**
53
+ * Where a layer is kept. The layer is data about a document, not part of it, so the host decides
54
+ * (backend API, IndexedDB, a file). This package ships an in-memory store and a localStorage
55
+ * store; both validate on load because stored JSON is untrusted. A store shared by several
56
+ * writers (ARBI's server-side markup) also implements the optional members: it may merge on save,
57
+ * pull others' changes, and say whether this user may write at all.
58
+ */
59
+
60
+ interface AnnotationStore {
61
+ /** The saved layer, or an empty one for a document that has none yet. */
62
+ load(documentId: string): Promise<AnnotationLayer>;
63
+ /**
64
+ * Write a layer. A store with other writers may resolve to what it actually saved — this layer
65
+ * merged with theirs (see `mergeLayers`); the caller then rebases its newer edits onto it.
66
+ */
67
+ save(layer: AnnotationLayer): Promise<AnnotationLayer | void>;
68
+ /** Others' changes since the last load or save, or null when there are none. */
69
+ pull?(documentId: string): Promise<AnnotationLayer | null>;
70
+ /** Whether this user may change the layer; false makes it view-only. Known after `load`. */
71
+ canEdit?(documentId: string): boolean;
72
+ }
73
+ /** Thrown by a store whose backend cannot be reached: the layer is kept and saved when back. */
74
+ declare class AnnotationStoreOfflineError extends Error {
75
+ constructor(message?: string);
76
+ }
77
+ declare function createMemoryStore(now?: () => string): AnnotationStore;
78
+ /**
79
+ * Per-browser store. Storage can be absent, full or blocked (private windows), so every access is
80
+ * guarded. A saved layer that no longer validates is ignored rather than crashing the viewer.
81
+ */
82
+ declare function createLocalStorageStore(storage?: Pick<Storage, 'getItem' | 'setItem'> | undefined, now?: () => string): AnnotationStore;
83
+
84
84
  export { type AnnotationStore as A, type ProductionChoices as P, AnnotationStoreOfflineError as a, type ProductionCorner as b, ProductionDialog as c, type ProductionDialogProps as d, type ProductionDocument as e, createLocalStorageStore as f, createMemoryStore as g, moveItem as m, qrCornerFor as q };