@arbidocs/react 0.4.157 → 0.4.158

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 '../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';
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';
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 '../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';
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';
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
3
  var chunkQKNJ6FRD_cjs = require('../chunk-QKNJ6FRD.cjs');
4
- var chunkL2PXZWJM_cjs = require('../chunk-L2PXZWJM.cjs');
5
- var chunkSSOPIPEX_cjs = require('../chunk-SSOPIPEX.cjs');
6
4
  var chunkZWFMFOGP_cjs = require('../chunk-ZWFMFOGP.cjs');
7
5
  require('../chunk-VOFNX4P6.cjs');
8
- require('../chunk-WYZJLZ67.cjs');
6
+ var chunkL2PXZWJM_cjs = require('../chunk-L2PXZWJM.cjs');
7
+ var chunkSSOPIPEX_cjs = require('../chunk-SSOPIPEX.cjs');
9
8
  require('../chunk-Z3LLUO32.cjs');
9
+ require('../chunk-WYZJLZ67.cjs');
10
10
  require('../chunk-HJDR5HEO.cjs');
11
11
  require('../chunk-S6A6FSG7.cjs');
12
12
  require('../chunk-R2MF7YCW.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 '../ProductionDialog-BRrZ5Lj5.cjs';
4
+ import { P as ProductionChoices, A as AnnotationStore } from '../store-BEXGdE1y.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 '../ProductionDialog-DUC9BXWS.js';
4
+ import { P as ProductionChoices, A as AnnotationStore } from '../store-CoLuVSxI.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,11 +1,11 @@
1
1
  import { fetchDocumentFile, fetchDocumentPdf, DocumentFetchError, useDocumentTools } from '../chunk-2HNEVAXO.js';
2
2
  export { DocumentFetchError, DocumentToolsProvider, certificateLink, clientUpload, contentDispositionFileName, defaultCertificateUrl, downloadBlob, fetchDocumentFile, fetchDocumentPdf, uploadQueryString, useDocumentTools, useOptionalDocumentTools } from '../chunk-2HNEVAXO.js';
3
- import { mergeLayers, AnnotationStoreOfflineError } from '../chunk-IHTBAY57.js';
4
- import { parseLayer, emptyLayer, LAYER_SCHEMA_VERSION } from '../chunk-COWZGCL5.js';
5
3
  import { parseVersionRef } from '../chunk-NNWMHMEC.js';
6
4
  import '../chunk-WUTL62MC.js';
7
- import '../chunk-YNNAJJ5Z.js';
5
+ import { mergeLayers, AnnotationStoreOfflineError } from '../chunk-IHTBAY57.js';
6
+ import { parseLayer, emptyLayer, LAYER_SCHEMA_VERSION } from '../chunk-COWZGCL5.js';
8
7
  import '../chunk-QRCMKEE6.js';
8
+ import '../chunk-YNNAJJ5Z.js';
9
9
  import '../chunk-47CCGUWR.js';
10
10
  import '../chunk-SN5YV6FF.js';
11
11
  import '../chunk-CPPBN2JB.js';
package/dist/index.cjs CHANGED
@@ -7,8 +7,8 @@ require('./chunk-VOFNX4P6.cjs');
7
7
  var chunkJFKWH6EP_cjs = require('./chunk-JFKWH6EP.cjs');
8
8
  var chunkRDLAOB55_cjs = require('./chunk-RDLAOB55.cjs');
9
9
  var chunkOC7F5SNA_cjs = require('./chunk-OC7F5SNA.cjs');
10
- var chunkWYZJLZ67_cjs = require('./chunk-WYZJLZ67.cjs');
11
10
  var chunkZ3LLUO32_cjs = require('./chunk-Z3LLUO32.cjs');
11
+ var chunkWYZJLZ67_cjs = require('./chunk-WYZJLZ67.cjs');
12
12
  var chunkHUZB36QU_cjs = require('./chunk-HUZB36QU.cjs');
13
13
  var chunkHJDR5HEO_cjs = require('./chunk-HJDR5HEO.cjs');
14
14
  var chunkS6A6FSG7_cjs = require('./chunk-S6A6FSG7.cjs');
@@ -10787,6 +10787,18 @@ Object.defineProperty(exports, "splitMarkdownBlocks", {
10787
10787
  enumerable: true,
10788
10788
  get: function () { return chunkOC7F5SNA_cjs.splitMarkdownBlocks; }
10789
10789
  });
10790
+ Object.defineProperty(exports, "closeOpenEmphasis", {
10791
+ enumerable: true,
10792
+ get: function () { return chunkZ3LLUO32_cjs.closeOpenEmphasis; }
10793
+ });
10794
+ Object.defineProperty(exports, "normalizeCitationMarkup", {
10795
+ enumerable: true,
10796
+ get: function () { return chunkZ3LLUO32_cjs.normalizeCitationMarkup; }
10797
+ });
10798
+ Object.defineProperty(exports, "trimOpenCitation", {
10799
+ enumerable: true,
10800
+ get: function () { return chunkZ3LLUO32_cjs.trimOpenCitation; }
10801
+ });
10790
10802
  Object.defineProperty(exports, "Button", {
10791
10803
  enumerable: true,
10792
10804
  get: function () { return chunkWYZJLZ67_cjs.Button; }
@@ -10835,18 +10847,6 @@ Object.defineProperty(exports, "buttonVariants", {
10835
10847
  enumerable: true,
10836
10848
  get: function () { return chunkWYZJLZ67_cjs.buttonVariants; }
10837
10849
  });
10838
- Object.defineProperty(exports, "closeOpenEmphasis", {
10839
- enumerable: true,
10840
- get: function () { return chunkZ3LLUO32_cjs.closeOpenEmphasis; }
10841
- });
10842
- Object.defineProperty(exports, "normalizeCitationMarkup", {
10843
- enumerable: true,
10844
- get: function () { return chunkZ3LLUO32_cjs.normalizeCitationMarkup; }
10845
- });
10846
- Object.defineProperty(exports, "trimOpenCitation", {
10847
- enumerable: true,
10848
- get: function () { return chunkZ3LLUO32_cjs.trimOpenCitation; }
10849
- });
10850
10850
  Object.defineProperty(exports, "ScrollArea", {
10851
10851
  enumerable: true,
10852
10852
  get: function () { return chunkHUZB36QU_cjs.ScrollArea; }
package/dist/index.js CHANGED
@@ -10,10 +10,10 @@ import { returnFocusToMark, MarkMenu, AiMarkdown, Card, Badge, Input, FILE_TYPE_
10
10
  export { AUDIO_MIME_PREFERENCE, AgentBadge, AiMarkdown, ArbiBotHeadIcon, ArbiIcon, 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, DEFAULT_SEGMENTER_CONFIG, DebouncedInput, DictateProvider, DocIcon, DocumentCard, DocumentEntity, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, INITIAL_SEGMENTER_STATE, IconToggle, ImgIcon, InlineMicButton, Input, Label, MarkMenu, MicRecordingOverlay, MicWaveformIndicator, NEUTRAL_GRAY, PLACEHOLDER_COLOR, PassageCard, PdfIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, PresenceLabel, Progress, ProjectEntity, RadioGroup, RadioGroupItem, RagDot, RelevanceDot, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, ShieldIcon, 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, VIDEO_MIME_PREFERENCE, VISIBILITY_ICONS, VerifiedBadge, VerifiedToggle, VidIcon, VisibilityIcon, VisibilityToggle, XlsIcon, agentAvatarColors, badgeVariants, cardVariants, classifyMediaError, configureEntityRegistry, configureRagLabels, configureStatusRegistry, createChunkedRecorder, createUserAvatarIcon, extensionFromMime, flushSegmenter, formatElapsed, formatFriendlyDate, friendlyFileType, getDocIcon, getDocumentTitle, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getFileExtension, getFileTypeIcon, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getUserAvatarColor, getUserDisplayName, getUserInitials, getWorkspaceColor, isAgent, isAudioFile, isDownloadOnlyFile, isImageDocument, isImageFile, isMediaFile, isVideoFile, levelFromRms, pickRecorderMimeType, stepSegmenter, tagKindNouns, tagKindTitle, toggleVariants, useAudioRecorder, useDictateContext, usesOriginalBytesForViewer } from './chunk-CNGWJDMG.js';
11
11
  import { MarkdownRenderer } from './chunk-C44GO33B.js';
12
12
  export { MarkdownCode, MarkdownLink, MarkdownRenderer, MarkdownStreamingContext, markdownBaseComponents, markdownSanitizeSchema, splitMarkdownBlocks } from './chunk-C44GO33B.js';
13
- import { Button, Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-YNNAJJ5Z.js';
14
- export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, buttonVariants } from './chunk-YNNAJJ5Z.js';
15
13
  import { normalizeCitationMarkup } from './chunk-QRCMKEE6.js';
16
14
  export { closeOpenEmphasis, normalizeCitationMarkup, trimOpenCitation } from './chunk-QRCMKEE6.js';
15
+ import { Button, Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-YNNAJJ5Z.js';
16
+ export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, buttonVariants } from './chunk-YNNAJJ5Z.js';
17
17
  import { ScrollArea } from './chunk-W4H6XAIU.js';
18
18
  export { ScrollArea, ScrollBar } from './chunk-W4H6XAIU.js';
19
19
  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 chunkRDLAOB55_cjs = require('../chunk-RDLAOB55.cjs');
4
4
  var chunkOC7F5SNA_cjs = require('../chunk-OC7F5SNA.cjs');
5
- var chunkWYZJLZ67_cjs = require('../chunk-WYZJLZ67.cjs');
6
5
  var chunkZ3LLUO32_cjs = require('../chunk-Z3LLUO32.cjs');
6
+ var chunkWYZJLZ67_cjs = require('../chunk-WYZJLZ67.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');
@@ -594,6 +594,14 @@ Object.defineProperty(exports, "splitMarkdownBlocks", {
594
594
  enumerable: true,
595
595
  get: function () { return chunkOC7F5SNA_cjs.splitMarkdownBlocks; }
596
596
  });
597
+ Object.defineProperty(exports, "closeOpenEmphasis", {
598
+ enumerable: true,
599
+ get: function () { return chunkZ3LLUO32_cjs.closeOpenEmphasis; }
600
+ });
601
+ Object.defineProperty(exports, "trimOpenCitation", {
602
+ enumerable: true,
603
+ get: function () { return chunkZ3LLUO32_cjs.trimOpenCitation; }
604
+ });
597
605
  Object.defineProperty(exports, "Button", {
598
606
  enumerable: true,
599
607
  get: function () { return chunkWYZJLZ67_cjs.Button; }
@@ -642,14 +650,6 @@ Object.defineProperty(exports, "buttonVariants", {
642
650
  enumerable: true,
643
651
  get: function () { return chunkWYZJLZ67_cjs.buttonVariants; }
644
652
  });
645
- Object.defineProperty(exports, "closeOpenEmphasis", {
646
- enumerable: true,
647
- get: function () { return chunkZ3LLUO32_cjs.closeOpenEmphasis; }
648
- });
649
- Object.defineProperty(exports, "trimOpenCitation", {
650
- enumerable: true,
651
- get: function () { return chunkZ3LLUO32_cjs.trimOpenCitation; }
652
- });
653
653
  Object.defineProperty(exports, "ScrollArea", {
654
654
  enumerable: true,
655
655
  get: function () { return chunkHUZB36QU_cjs.ScrollArea; }
package/dist/ui/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export { AgentBadge, AiMarkdown, ArbiIcon, 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, DebouncedInput, DictateProvider, DocumentCard, DocumentEntity, ENTITY_MAPPINGS, EntityIcon, EntityPill, HoverCard, HoverCardContent, HoverCardTrigger, IconToggle, Input, Label, MarkMenu, NEUTRAL_GRAY, PLACEHOLDER_COLOR, PassageCard, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, PresenceLabel, Progress, ProjectEntity, RadioGroup, RadioGroupItem, RagDot, RelevanceDot, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, ShieldIcon, 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, VerifiedToggle, VisibilityIcon, VisibilityToggle, agentAvatarColors, badgeVariants, cardVariants, configureEntityRegistry, configureRagLabels, configureStatusRegistry, createUserAvatarIcon, extensionFromMime, formatFriendlyDate, friendlyFileType, getDocIcon, getDocumentTitle, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getFileExtension, getFileTypeIcon, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getUserAvatarColor, getUserDisplayName, getUserInitials, getWorkspaceColor, isAgent, isAudioFile, isDownloadOnlyFile, isImageDocument, isImageFile, isMediaFile, isVideoFile, tagKindNouns, tagKindTitle, toggleVariants, useDictateContext, usesOriginalBytesForViewer } from '../chunk-CNGWJDMG.js';
2
2
  export { MarkdownCode, MarkdownLink, MarkdownRenderer, MarkdownStreamingContext, markdownBaseComponents, markdownSanitizeSchema, splitMarkdownBlocks } from '../chunk-C44GO33B.js';
3
- export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, buttonVariants } from '../chunk-YNNAJJ5Z.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.157",
3
+ "version": "0.4.158",
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.157",
97
- "@arbidocs/sdk": "0.4.157",
96
+ "@arbidocs/client": "0.4.158",
97
+ "@arbidocs/sdk": "0.4.158",
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 };