@arbidocs/react 0.4.69 → 0.4.70
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/README.md +8 -0
- package/dist/annotations/index.cjs +186 -2450
- package/dist/annotations/index.cjs.map +1 -1
- package/dist/annotations/index.d.cts +3 -33
- package/dist/annotations/index.d.ts +3 -33
- package/dist/annotations/index.js +4 -2411
- package/dist/annotations/index.js.map +1 -1
- package/dist/artifacts/index.cjs +88 -112
- package/dist/artifacts/index.cjs.map +1 -1
- package/dist/artifacts/index.js +12 -61
- package/dist/artifacts/index.js.map +1 -1
- package/dist/artifacts/redline-core.cjs +8 -7
- package/dist/artifacts/redline-core.js +2 -1
- package/dist/{chunk-PATLJSAO.cjs → chunk-3AADNIOK.cjs} +9 -52
- package/dist/chunk-3AADNIOK.cjs.map +1 -0
- package/dist/chunk-3QF5DNAP.js +2413 -0
- package/dist/chunk-3QF5DNAP.js.map +1 -0
- package/dist/chunk-5DCRIWCA.cjs +243 -0
- package/dist/chunk-5DCRIWCA.cjs.map +1 -0
- package/dist/{chunk-NA3FOYSF.cjs → chunk-5SZ2J2WT.cjs} +5 -177
- package/dist/chunk-5SZ2J2WT.cjs.map +1 -0
- package/dist/{chunk-43AKLNBC.js → chunk-74N436VK.js} +4 -40
- package/dist/chunk-74N436VK.js.map +1 -0
- package/dist/{chunk-Z3RRZ3KV.cjs → chunk-7CL7QHT6.cjs} +2 -240
- package/dist/chunk-7CL7QHT6.cjs.map +1 -0
- package/dist/{chunk-BWVIAATD.cjs → chunk-BTRIS3HY.cjs} +4 -4
- package/dist/{chunk-BWVIAATD.cjs.map → chunk-BTRIS3HY.cjs.map} +1 -1
- package/dist/chunk-G6FHNURH.js +234 -0
- package/dist/chunk-G6FHNURH.js.map +1 -0
- package/dist/chunk-HKUD2NZN.js +61 -0
- package/dist/chunk-HKUD2NZN.js.map +1 -0
- package/dist/chunk-QRCMKEE6.js +173 -0
- package/dist/chunk-QRCMKEE6.js.map +1 -0
- package/dist/{chunk-PFKLOVGQ.js → chunk-SYPUFZGA.js} +3 -233
- package/dist/chunk-SYPUFZGA.js.map +1 -0
- package/dist/chunk-T4IJHRRD.cjs +71 -0
- package/dist/chunk-T4IJHRRD.cjs.map +1 -0
- package/dist/chunk-ULU5LEWF.cjs +2460 -0
- package/dist/chunk-ULU5LEWF.cjs.map +1 -0
- package/dist/{chunk-TQ6FRVAH.js → chunk-V4CXOPLB.js} +3 -3
- package/dist/{chunk-TQ6FRVAH.js.map → chunk-V4CXOPLB.js.map} +1 -1
- package/dist/chunk-VOFNX4P6.cjs +50 -0
- package/dist/chunk-VOFNX4P6.cjs.map +1 -0
- package/dist/chunk-WUTL62MC.js +42 -0
- package/dist/chunk-WUTL62MC.js.map +1 -0
- package/dist/{chunk-JPGV7NMY.js → chunk-YXSXGTYQ.js} +4 -173
- package/dist/chunk-YXSXGTYQ.js.map +1 -0
- package/dist/chunk-Z3LLUO32.cjs +177 -0
- package/dist/chunk-Z3LLUO32.cjs.map +1 -0
- package/dist/document-tools/index.cjs +683 -0
- package/dist/document-tools/index.cjs.map +1 -0
- package/dist/document-tools/index.d.cts +392 -0
- package/dist/document-tools/index.d.ts +392 -0
- package/dist/document-tools/index.js +639 -0
- package/dist/document-tools/index.js.map +1 -0
- package/dist/index.cjs +320 -318
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/store-CqkkD7Ho.d.cts +35 -0
- package/dist/store-D1nhbkgk.d.ts +35 -0
- package/dist/ui/index.cjs +138 -137
- package/dist/ui/index.js +3 -2
- package/package.json +11 -3
- package/dist/chunk-43AKLNBC.js.map +0 -1
- package/dist/chunk-JPGV7NMY.js.map +0 -1
- package/dist/chunk-NA3FOYSF.cjs.map +0 -1
- package/dist/chunk-PATLJSAO.cjs.map +0 -1
- package/dist/chunk-PFKLOVGQ.js.map +0 -1
- package/dist/chunk-Z3RRZ3KV.cjs.map +0 -1
|
@@ -1,5 +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-D1nhbkgk.js';
|
|
4
|
+
export { a as AnnotationStoreOfflineError, c as createLocalStorageStore, b as createMemoryStore } from '../store-D1nhbkgk.js';
|
|
3
5
|
import * as React from 'react';
|
|
4
6
|
import { ReactNode } from 'react';
|
|
5
7
|
|
|
@@ -66,38 +68,6 @@ declare const canRedo: (h: LayerHistory) => boolean;
|
|
|
66
68
|
declare function annotationsOnPage(layer: AnnotationLayer, page: number): Annotation[];
|
|
67
69
|
declare function pendingRedactions(layer: AnnotationLayer): Annotation[];
|
|
68
70
|
|
|
69
|
-
/**
|
|
70
|
-
* Where a layer is kept. The layer is data about a document, not part of it, so the host decides
|
|
71
|
-
* (backend API, IndexedDB, a file). This package ships an in-memory store and a localStorage
|
|
72
|
-
* store; both validate on load because stored JSON is untrusted. A store shared by several
|
|
73
|
-
* writers (ARBI's server-side markup) also implements the optional members: it may merge on save,
|
|
74
|
-
* pull others' changes, and say whether this user may write at all.
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
interface AnnotationStore {
|
|
78
|
-
/** The saved layer, or an empty one for a document that has none yet. */
|
|
79
|
-
load(documentId: string): Promise<AnnotationLayer>;
|
|
80
|
-
/**
|
|
81
|
-
* Write a layer. A store with other writers may resolve to what it actually saved — this layer
|
|
82
|
-
* merged with theirs (see `mergeLayers`); the caller then rebases its newer edits onto it.
|
|
83
|
-
*/
|
|
84
|
-
save(layer: AnnotationLayer): Promise<AnnotationLayer | void>;
|
|
85
|
-
/** Others' changes since the last load or save, or null when there are none. */
|
|
86
|
-
pull?(documentId: string): Promise<AnnotationLayer | null>;
|
|
87
|
-
/** Whether this user may change the layer; false makes it view-only. Known after `load`. */
|
|
88
|
-
canEdit?(documentId: string): boolean;
|
|
89
|
-
}
|
|
90
|
-
/** Thrown by a store whose backend cannot be reached: the layer is kept and saved when back. */
|
|
91
|
-
declare class AnnotationStoreOfflineError extends Error {
|
|
92
|
-
constructor(message?: string);
|
|
93
|
-
}
|
|
94
|
-
declare function createMemoryStore(now?: () => string): AnnotationStore;
|
|
95
|
-
/**
|
|
96
|
-
* Per-browser store. Storage can be absent, full or blocked (private windows), so every access is
|
|
97
|
-
* guarded. A saved layer that no longer validates is ignored rather than crashing the viewer.
|
|
98
|
-
*/
|
|
99
|
-
declare function createLocalStorageStore(storage?: Pick<Storage, 'getItem' | 'setItem'> | undefined, now?: () => string): AnnotationStore;
|
|
100
|
-
|
|
101
71
|
/**
|
|
102
72
|
* Merging two writers' versions of one layer, by annotation id (a PDF annotation's `/NM`).
|
|
103
73
|
*
|
|
@@ -430,4 +400,4 @@ declare function qrCornerFor(corner: ProductionCorner): ProductionCorner;
|
|
|
430
400
|
declare function moveItem<T>(items: readonly T[], from: number, to: number): T[];
|
|
431
401
|
declare function ProductionDialog({ open, onOpenChange, documents, leftOut, onConfirm, busy, progress, error, }: ProductionDialogProps): React.JSX.Element;
|
|
432
402
|
|
|
433
|
-
export { AUTOSAVE_MS, Annotation, type AnnotationAction, type AnnotationController, AnnotationLayer, AnnotationPageOverlay, type AnnotationPageOverlayProps, type AnnotationPatch,
|
|
403
|
+
export { AUTOSAVE_MS, Annotation, type AnnotationAction, type AnnotationController, AnnotationLayer, AnnotationPageOverlay, type AnnotationPageOverlayProps, type AnnotationPatch, AnnotationStore, type AnnotationTool, AnnotationToolbar, type AnnotationToolbarProps, CommentReply, DEFAULT_SETTINGS, type DragMode, type FreezeChoices, FreezeDialog, type FreezeDialogProps, HIGHLIGHT_COLORS, type LayerHistory, type LayerStatus, MARK_COLORS, type MergeInput, type NewMark, NormRect, type PageSelection, type PageTextMark, type PixelRect, type PixelSize, type ProductionChoices, type ProductionCorner, ProductionDialog, type ProductionDialogProps, type ProductionDocument, REDACTION_LOG_COLUMNS, REDACTION_REASONS, RETRY_MS, type RedactionLogRow, RedactionStatus, STAMP_PRESETS, type ToolSettings, type UseAnnotationLayerOptions, annotationsOnPage, applyAction, canRedo, canUndo, containsPoint, createHistory, dragRect, dragToNorm, intersects, isTooSmall, layerStatusText, mergeLayers, mergeLineRects, moveItem, patchForRect, pendingRedactions, qrCornerFor, readSelection, redactionLogCsv, redactionLogRows, redo, reduceLayer, sameMarks, selectionToPageMarks, singleRect, toNorm, toPixels, undo, useAnnotationLayer, useAnnotationShortcuts, useTextSelectionMarks };
|