@arbidocs/react 0.4.79 → 0.4.80

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.
@@ -1,7 +1,7 @@
1
1
  import { A as Annotation, e as RedactionStatus, d as CommentReply, b as AnnotationLayer, N as NormRect } from '../model-DIwXRuGC.cjs';
2
2
  export { a as AnnotationKind, c as AnnotationLayerError, B as BoxAnnotation, C as CommentAnnotation, H as HighlightAnnotation, L as LAYER_SCHEMA_VERSION, R as RedactionAnnotation, S as StampAnnotation, f as annotationRects, g as clampRect, h as emptyLayer, i as isEffectiveRedaction, p as parseAnnotation, j as parseLayer } from '../model-DIwXRuGC.cjs';
3
- import { A as AnnotationStore } from '../store-BEXGdE1y.cjs';
4
- export { a as AnnotationStoreOfflineError, P as ProductionChoices, b as ProductionCorner, c as ProductionDialog, d as ProductionDialogProps, e as ProductionDocument, f as createLocalStorageStore, g as createMemoryStore, m as moveItem, q as qrCornerFor } from '../store-BEXGdE1y.cjs';
3
+ import { A as AnnotationStore } from '../ProductionDialog-BRrZ5Lj5.cjs';
4
+ export { a as AnnotationStoreOfflineError, P as ProductionChoices, b as ProductionCorner, c as ProductionDialog, d as ProductionDialogProps, e as ProductionDocument, f as createLocalStorageStore, g as createMemoryStore, m as moveItem, q as qrCornerFor } from '../ProductionDialog-BRrZ5Lj5.cjs';
5
5
  import * as React from 'react';
6
6
  import { ReactNode } from 'react';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { A as Annotation, e as RedactionStatus, d as CommentReply, b as AnnotationLayer, N as NormRect } from '../model-DIwXRuGC.js';
2
2
  export { a as AnnotationKind, c as AnnotationLayerError, B as BoxAnnotation, C as CommentAnnotation, H as HighlightAnnotation, L as LAYER_SCHEMA_VERSION, R as RedactionAnnotation, S as StampAnnotation, f as annotationRects, g as clampRect, h as emptyLayer, i as isEffectiveRedaction, p as parseAnnotation, j as parseLayer } from '../model-DIwXRuGC.js';
3
- import { A as AnnotationStore } from '../store-CoLuVSxI.js';
4
- export { a as AnnotationStoreOfflineError, P as ProductionChoices, b as ProductionCorner, c as ProductionDialog, d as ProductionDialogProps, e as ProductionDocument, f as createLocalStorageStore, g as createMemoryStore, m as moveItem, q as qrCornerFor } from '../store-CoLuVSxI.js';
3
+ import { A as AnnotationStore } from '../ProductionDialog-DUC9BXWS.js';
4
+ export { a as AnnotationStoreOfflineError, P as ProductionChoices, b as ProductionCorner, c as ProductionDialog, d as ProductionDialogProps, e as ProductionDocument, f as createLocalStorageStore, g as createMemoryStore, m as moveItem, q as qrCornerFor } from '../ProductionDialog-DUC9BXWS.js';
5
5
  import * as React from 'react';
6
6
  import { ReactNode } from 'react';
7
7
 
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
+ var chunkL2PXZWJM_cjs = require('../chunk-L2PXZWJM.cjs');
4
+ var chunkSSOPIPEX_cjs = require('../chunk-SSOPIPEX.cjs');
3
5
  var chunkT4IJHRRD_cjs = require('../chunk-T4IJHRRD.cjs');
4
6
  require('../chunk-5DCRIWCA.cjs');
5
7
  require('../chunk-VOFNX4P6.cjs');
6
- var chunkL2PXZWJM_cjs = require('../chunk-L2PXZWJM.cjs');
7
- var chunkSSOPIPEX_cjs = require('../chunk-SSOPIPEX.cjs');
8
- require('../chunk-Z3LLUO32.cjs');
9
8
  require('../chunk-WYZJLZ67.cjs');
9
+ require('../chunk-Z3LLUO32.cjs');
10
10
  require('../chunk-HJDR5HEO.cjs');
11
11
  require('../chunk-S6A6FSG7.cjs');
12
12
  var chunkIIT7DMQL_cjs = require('../chunk-IIT7DMQL.cjs');
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import { ArbiClient, operations, components } from '@arbidocs/client';
4
- import { P as ProductionChoices, A as AnnotationStore } from '../store-BEXGdE1y.cjs';
4
+ import { P as ProductionChoices, A as AnnotationStore } from '../ProductionDialog-BRrZ5Lj5.cjs';
5
5
  import { a as BundleFile, b as BundleIndexEntry } from '../bundle-BnCSbHy2.cjs';
6
6
  import { A as Annotation, b as AnnotationLayer } from '../model-DIwXRuGC.cjs';
7
7
  import * as _tanstack_react_query from '@tanstack/react-query';
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import { ArbiClient, operations, components } from '@arbidocs/client';
4
- import { P as ProductionChoices, A as AnnotationStore } from '../store-CoLuVSxI.js';
4
+ import { P as ProductionChoices, A as AnnotationStore } from '../ProductionDialog-DUC9BXWS.js';
5
5
  import { a as BundleFile, b as BundleIndexEntry } from '../bundle-BnCSbHy2.js';
6
6
  import { A as Annotation, b as AnnotationLayer } from '../model-DIwXRuGC.js';
7
7
  import * as _tanstack_react_query from '@tanstack/react-query';
@@ -1,10 +1,10 @@
1
+ import { mergeLayers, AnnotationStoreOfflineError } from '../chunk-IHTBAY57.js';
2
+ import { parseLayer, emptyLayer, LAYER_SCHEMA_VERSION } from '../chunk-COWZGCL5.js';
1
3
  import { parseVersionRef } from '../chunk-HKUD2NZN.js';
2
4
  import '../chunk-G6FHNURH.js';
3
5
  import '../chunk-WUTL62MC.js';
4
- import { mergeLayers, AnnotationStoreOfflineError } from '../chunk-IHTBAY57.js';
5
- import { parseLayer, emptyLayer, LAYER_SCHEMA_VERSION } from '../chunk-COWZGCL5.js';
6
- import '../chunk-QRCMKEE6.js';
7
6
  import '../chunk-YNNAJJ5Z.js';
7
+ import '../chunk-QRCMKEE6.js';
8
8
  import '../chunk-47CCGUWR.js';
9
9
  import '../chunk-SN5YV6FF.js';
10
10
  import { useDeploymentDomain } from '../chunk-WBYNKFUO.js';
package/dist/index.cjs CHANGED
@@ -5,8 +5,8 @@ var chunk5DCRIWCA_cjs = require('./chunk-5DCRIWCA.cjs');
5
5
  var chunkF7KQVVD2_cjs = require('./chunk-F7KQVVD2.cjs');
6
6
  var chunkQJRP2LLQ_cjs = require('./chunk-QJRP2LLQ.cjs');
7
7
  var chunk5SZ2J2WT_cjs = require('./chunk-5SZ2J2WT.cjs');
8
- var chunkZ3LLUO32_cjs = require('./chunk-Z3LLUO32.cjs');
9
8
  var chunkWYZJLZ67_cjs = require('./chunk-WYZJLZ67.cjs');
9
+ var chunkZ3LLUO32_cjs = require('./chunk-Z3LLUO32.cjs');
10
10
  var chunkHUZB36QU_cjs = require('./chunk-HUZB36QU.cjs');
11
11
  var chunkHJDR5HEO_cjs = require('./chunk-HJDR5HEO.cjs');
12
12
  var chunkS6A6FSG7_cjs = require('./chunk-S6A6FSG7.cjs');
@@ -7224,18 +7224,6 @@ Object.defineProperty(exports, "splitMarkdownBlocks", {
7224
7224
  enumerable: true,
7225
7225
  get: function () { return chunk5SZ2J2WT_cjs.splitMarkdownBlocks; }
7226
7226
  });
7227
- Object.defineProperty(exports, "closeOpenEmphasis", {
7228
- enumerable: true,
7229
- get: function () { return chunkZ3LLUO32_cjs.closeOpenEmphasis; }
7230
- });
7231
- Object.defineProperty(exports, "normalizeCitationMarkup", {
7232
- enumerable: true,
7233
- get: function () { return chunkZ3LLUO32_cjs.normalizeCitationMarkup; }
7234
- });
7235
- Object.defineProperty(exports, "trimOpenCitation", {
7236
- enumerable: true,
7237
- get: function () { return chunkZ3LLUO32_cjs.trimOpenCitation; }
7238
- });
7239
7227
  Object.defineProperty(exports, "Button", {
7240
7228
  enumerable: true,
7241
7229
  get: function () { return chunkWYZJLZ67_cjs.Button; }
@@ -7284,6 +7272,18 @@ Object.defineProperty(exports, "buttonVariants", {
7284
7272
  enumerable: true,
7285
7273
  get: function () { return chunkWYZJLZ67_cjs.buttonVariants; }
7286
7274
  });
7275
+ Object.defineProperty(exports, "closeOpenEmphasis", {
7276
+ enumerable: true,
7277
+ get: function () { return chunkZ3LLUO32_cjs.closeOpenEmphasis; }
7278
+ });
7279
+ Object.defineProperty(exports, "normalizeCitationMarkup", {
7280
+ enumerable: true,
7281
+ get: function () { return chunkZ3LLUO32_cjs.normalizeCitationMarkup; }
7282
+ });
7283
+ Object.defineProperty(exports, "trimOpenCitation", {
7284
+ enumerable: true,
7285
+ get: function () { return chunkZ3LLUO32_cjs.trimOpenCitation; }
7286
+ });
7287
7287
  Object.defineProperty(exports, "ScrollArea", {
7288
7288
  enumerable: true,
7289
7289
  get: function () { return chunkHUZB36QU_cjs.ScrollArea; }
package/dist/index.js CHANGED
@@ -7,10 +7,10 @@ import { returnFocusToMark, MarkMenu, AiMarkdown, Card, Badge, TagEntity, Input,
7
7
  export { AgentBadge, AiMarkdown, ArbiBotHeadIcon, AudIcon, 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, DocIcon, DocumentCard, DocumentEntity, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, IconToggle, ImgIcon, InlineMicButton, Input, Label, MarkMenu, MicRecordingOverlay, MicWaveformIndicator, NEUTRAL_GRAY, PLACEHOLDER_COLOR, PassageCard, PdfIcon, 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, TxtIcon, UserEntity, UserMenu, VISIBILITY_ICONS, VerifiedBadge, VidIcon, VisibilityIcon, VisibilityToggle, XlsIcon, badgeVariants, cardVariants, classifyMediaError, configureEntityRegistry, configureRagLabels, configureStatusRegistry, formatElapsed, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceColor, toggleVariants, useAudioRecorder } from './chunk-MHCN7OST.js';
8
8
  import { MarkdownRenderer } from './chunk-YXSXGTYQ.js';
9
9
  export { MarkdownRenderer, MarkdownStreamingContext, markdownBaseComponents, splitMarkdownBlocks } from './chunk-YXSXGTYQ.js';
10
- import { normalizeCitationMarkup } from './chunk-QRCMKEE6.js';
11
- export { closeOpenEmphasis, normalizeCitationMarkup, trimOpenCitation } from './chunk-QRCMKEE6.js';
12
10
  import { Button, Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-YNNAJJ5Z.js';
13
11
  export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, buttonVariants } from './chunk-YNNAJJ5Z.js';
12
+ import { normalizeCitationMarkup } from './chunk-QRCMKEE6.js';
13
+ export { closeOpenEmphasis, normalizeCitationMarkup, trimOpenCitation } from './chunk-QRCMKEE6.js';
14
14
  import { ScrollArea } from './chunk-W4H6XAIU.js';
15
15
  export { ScrollArea, ScrollBar } from './chunk-W4H6XAIU.js';
16
16
  import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator } from './chunk-47CCGUWR.js';
package/dist/ui/index.cjs CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  var chunkQJRP2LLQ_cjs = require('../chunk-QJRP2LLQ.cjs');
4
4
  var chunk5SZ2J2WT_cjs = require('../chunk-5SZ2J2WT.cjs');
5
- var chunkZ3LLUO32_cjs = require('../chunk-Z3LLUO32.cjs');
6
5
  var chunkWYZJLZ67_cjs = require('../chunk-WYZJLZ67.cjs');
6
+ var chunkZ3LLUO32_cjs = require('../chunk-Z3LLUO32.cjs');
7
7
  var chunkHUZB36QU_cjs = require('../chunk-HUZB36QU.cjs');
8
8
  var chunkHJDR5HEO_cjs = require('../chunk-HJDR5HEO.cjs');
9
9
  var chunkS6A6FSG7_cjs = require('../chunk-S6A6FSG7.cjs');
@@ -474,14 +474,6 @@ Object.defineProperty(exports, "splitMarkdownBlocks", {
474
474
  enumerable: true,
475
475
  get: function () { return chunk5SZ2J2WT_cjs.splitMarkdownBlocks; }
476
476
  });
477
- Object.defineProperty(exports, "closeOpenEmphasis", {
478
- enumerable: true,
479
- get: function () { return chunkZ3LLUO32_cjs.closeOpenEmphasis; }
480
- });
481
- Object.defineProperty(exports, "trimOpenCitation", {
482
- enumerable: true,
483
- get: function () { return chunkZ3LLUO32_cjs.trimOpenCitation; }
484
- });
485
477
  Object.defineProperty(exports, "Button", {
486
478
  enumerable: true,
487
479
  get: function () { return chunkWYZJLZ67_cjs.Button; }
@@ -530,6 +522,14 @@ Object.defineProperty(exports, "buttonVariants", {
530
522
  enumerable: true,
531
523
  get: function () { return chunkWYZJLZ67_cjs.buttonVariants; }
532
524
  });
525
+ Object.defineProperty(exports, "closeOpenEmphasis", {
526
+ enumerable: true,
527
+ get: function () { return chunkZ3LLUO32_cjs.closeOpenEmphasis; }
528
+ });
529
+ Object.defineProperty(exports, "trimOpenCitation", {
530
+ enumerable: true,
531
+ get: function () { return chunkZ3LLUO32_cjs.trimOpenCitation; }
532
+ });
533
533
  Object.defineProperty(exports, "ScrollArea", {
534
534
  enumerable: true,
535
535
  get: function () { return chunkHUZB36QU_cjs.ScrollArea; }
package/dist/ui/index.js CHANGED
@@ -1,7 +1,7 @@
1
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-MHCN7OST.js';
2
2
  export { MarkdownRenderer, MarkdownStreamingContext, markdownBaseComponents, splitMarkdownBlocks } from '../chunk-YXSXGTYQ.js';
3
- export { closeOpenEmphasis, trimOpenCitation } from '../chunk-QRCMKEE6.js';
4
3
  export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, buttonVariants } from '../chunk-YNNAJJ5Z.js';
4
+ export { closeOpenEmphasis, trimOpenCitation } from '../chunk-QRCMKEE6.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.79",
3
+ "version": "0.4.80",
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.79",
97
- "@arbidocs/sdk": "0.4.79",
96
+ "@arbidocs/client": "0.4.80",
97
+ "@arbidocs/sdk": "0.4.80",
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,5 +1,37 @@
1
- import * as React from 'react';
2
1
  import { b as AnnotationLayer } from './model-DIwXRuGC.cjs';
2
+ 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;
3
35
 
4
36
  /**
5
37
  * Asks how to number and package a set of documents as a production. It only collects choices; the
@@ -49,36 +81,4 @@ declare function qrCornerFor(corner: ProductionCorner): ProductionCorner;
49
81
  declare function moveItem<T>(items: readonly T[], from: number, to: number): T[];
50
82
  declare function ProductionDialog({ open, onOpenChange, documents, leftOut, onConfirm, busy, progress, error, }: ProductionDialogProps): React.JSX.Element;
51
83
 
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,5 +1,37 @@
1
- import * as React from 'react';
2
1
  import { b as AnnotationLayer } from './model-DIwXRuGC.js';
2
+ 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;
3
35
 
4
36
  /**
5
37
  * Asks how to number and package a set of documents as a production. It only collects choices; the
@@ -49,36 +81,4 @@ declare function qrCornerFor(corner: ProductionCorner): ProductionCorner;
49
81
  declare function moveItem<T>(items: readonly T[], from: number, to: number): T[];
50
82
  declare function ProductionDialog({ open, onOpenChange, documents, leftOut, onConfirm, busy, progress, error, }: ProductionDialogProps): React.JSX.Element;
51
83
 
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 };