@arbidocs/react 0.5.61 → 0.5.62
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/ProductionDialog.d-CpzslFn0.d.cts +51 -0
- package/dist/ProductionDialog.d-CpzslFn0.d.ts +51 -0
- package/dist/annotations/freeze/index.cjs +14 -14
- package/dist/annotations/freeze/index.js +3 -3
- package/dist/annotations/index.d.cts +3 -2
- package/dist/annotations/index.d.ts +3 -2
- package/dist/artifacts/index.cjs +12 -12
- package/dist/artifacts/index.js +5 -5
- package/dist/bundle-IC65W2AO.cjs +14 -0
- package/dist/{bundle-DCWPYNGD.cjs.map → bundle-IC65W2AO.cjs.map} +1 -1
- package/dist/bundle-YNOX7VIL.js +5 -0
- package/dist/{bundle-JCKKGEJE.js.map → bundle-YNOX7VIL.js.map} +1 -1
- package/dist/calls/livekit/index.cjs +54 -54
- package/dist/calls/livekit/index.js +6 -6
- package/dist/{chunk-S2W3ZOWG.js → chunk-2LV53J46.js} +85 -16
- package/dist/chunk-2LV53J46.js.map +1 -0
- package/dist/{chunk-H3HYKAS5.cjs → chunk-3BFSALPC.cjs} +3 -3
- package/dist/{chunk-H3HYKAS5.cjs.map → chunk-3BFSALPC.cjs.map} +1 -1
- package/dist/{chunk-2NFUEC5O.js → chunk-3NBPMR3X.js} +3 -3
- package/dist/{chunk-2NFUEC5O.js.map → chunk-3NBPMR3X.js.map} +1 -1
- package/dist/chunk-4DTTEUVY.js +1042 -0
- package/dist/chunk-4DTTEUVY.js.map +1 -0
- package/dist/{chunk-U64WCQP3.js → chunk-AOEJ744V.js} +25 -14
- package/dist/chunk-AOEJ744V.js.map +1 -0
- package/dist/{chunk-4E737GNX.cjs → chunk-BLBXADTN.cjs} +86 -73
- package/dist/chunk-BLBXADTN.cjs.map +1 -0
- package/dist/{chunk-X7JXQT6F.cjs → chunk-DVL7EFZZ.cjs} +42 -46
- package/dist/chunk-DVL7EFZZ.cjs.map +1 -0
- package/dist/{chunk-VAMPYLQ4.cjs → chunk-DZUBZ45Y.cjs} +78 -2
- package/dist/chunk-DZUBZ45Y.cjs.map +1 -0
- package/dist/{chunk-OSWKXZTJ.js → chunk-ER4LFZG3.js} +12 -16
- package/dist/chunk-ER4LFZG3.js.map +1 -0
- package/dist/{chunk-5HDC43MF.js → chunk-G4Z3IP4J.js} +72 -3
- package/dist/chunk-G4Z3IP4J.js.map +1 -0
- package/dist/chunk-GOJHU7RZ.cjs +1122 -0
- package/dist/chunk-GOJHU7RZ.cjs.map +1 -0
- package/dist/{chunk-G76ASVVH.cjs → chunk-GQAXAZN7.cjs} +25 -14
- package/dist/chunk-GQAXAZN7.cjs.map +1 -0
- package/dist/{chunk-TUPSNW3B.cjs → chunk-LMW46NBD.cjs} +11 -11
- package/dist/{chunk-TUPSNW3B.cjs.map → chunk-LMW46NBD.cjs.map} +1 -1
- package/dist/{chunk-KRH55LXW.js → chunk-NCMSQACC.js} +37 -24
- package/dist/chunk-NCMSQACC.js.map +1 -0
- package/dist/{chunk-A2XSLTIP.js → chunk-NIKPG4PW.js} +3 -3
- package/dist/{chunk-A2XSLTIP.js.map → chunk-NIKPG4PW.js.map} +1 -1
- package/dist/{chunk-B6I2HRRF.cjs → chunk-PC4O3JDV.cjs} +3 -3
- package/dist/{chunk-B6I2HRRF.cjs.map → chunk-PC4O3JDV.cjs.map} +1 -1
- package/dist/{chunk-M2SZQBCO.js → chunk-SI7DJWBT.js} +3 -3
- package/dist/{chunk-M2SZQBCO.js.map → chunk-SI7DJWBT.js.map} +1 -1
- package/dist/{chunk-3QK4VVPG.cjs → chunk-TGSEQGM3.cjs} +3 -3
- package/dist/{chunk-3QK4VVPG.cjs.map → chunk-TGSEQGM3.cjs.map} +1 -1
- package/dist/{chunk-LCSUCZVX.cjs → chunk-ZNQPUPX6.cjs} +118 -41
- package/dist/chunk-ZNQPUPX6.cjs.map +1 -0
- package/dist/{chunk-CMNZI4WQ.js → chunk-ZTPJNKF2.js} +4 -4
- package/dist/{chunk-CMNZI4WQ.js.map → chunk-ZTPJNKF2.js.map} +1 -1
- package/dist/document-tools/core.cjs +408 -0
- package/dist/document-tools/core.cjs.map +1 -0
- package/dist/document-tools/core.d.cts +957 -0
- package/dist/document-tools/core.d.ts +957 -0
- package/dist/document-tools/core.js +15 -0
- package/dist/document-tools/core.js.map +1 -0
- package/dist/document-tools/index.cjs +347 -1130
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.d.cts +12 -950
- package/dist/document-tools/index.d.ts +12 -950
- package/dist/document-tools/index.js +13 -1034
- package/dist/document-tools/index.js.map +1 -1
- package/dist/index.cjs +1510 -1255
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-BLw5AN0H.d.cts → index.d-AT7wdTWC.d.cts} +50 -2
- package/dist/{index.d-BLw5AN0H.d.ts → index.d-AT7wdTWC.d.ts} +50 -2
- package/dist/{index.d-DPVj21h1.d.ts → index.d-B0dosFZc.d.cts} +6 -6
- package/dist/{index.d-DPVj21h1.d.cts → index.d-B0dosFZc.d.ts} +6 -6
- package/dist/index.d.cts +145 -69
- package/dist/index.d.ts +145 -69
- package/dist/index.js +346 -121
- package/dist/index.js.map +1 -1
- package/dist/{query-keys.d-DEEMzkLz.d.cts → query-keys.d-BFKQVevT.d.cts} +21 -12
- package/dist/{query-keys.d-DEEMzkLz.d.ts → query-keys.d-BFKQVevT.d.ts} +21 -12
- package/dist/shell/index.cjs +68 -40
- package/dist/shell/index.d.cts +1 -1
- package/dist/shell/index.d.ts +1 -1
- package/dist/shell/index.js +3 -3
- package/dist/store.d-DkFXbWDk.d.ts +35 -0
- package/dist/store.d-GADDvC7w.d.cts +35 -0
- package/dist/ui/index.cjs +149 -149
- package/dist/ui/index.d.cts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +2 -2
- package/package.json +11 -3
- package/dist/ProductionDialog.d-BDJwBSzj.d.ts +0 -84
- package/dist/ProductionDialog.d-DjRQFmQw.d.cts +0 -84
- package/dist/bundle-DCWPYNGD.cjs +0 -14
- package/dist/bundle-JCKKGEJE.js +0 -5
- package/dist/chunk-4E737GNX.cjs.map +0 -1
- package/dist/chunk-5HDC43MF.js.map +0 -1
- package/dist/chunk-G76ASVVH.cjs.map +0 -1
- package/dist/chunk-KRH55LXW.js.map +0 -1
- package/dist/chunk-LCSUCZVX.cjs.map +0 -1
- package/dist/chunk-OSWKXZTJ.js.map +0 -1
- package/dist/chunk-S2W3ZOWG.js.map +0 -1
- package/dist/chunk-U64WCQP3.js.map +0 -1
- package/dist/chunk-VAMPYLQ4.cjs.map +0 -1
- package/dist/chunk-X7JXQT6F.cjs.map +0 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Asks how to number and package a set of documents as a production. It only collects choices; the
|
|
5
|
+
* host runs `buildBundle` (see `@arbidocs/react/annotations/freeze`) and saves the result.
|
|
6
|
+
*
|
|
7
|
+
* The documents can be put in order (drag a row, or its up/down buttons from the keyboard): that
|
|
8
|
+
* order is the numbering order.
|
|
9
|
+
*/
|
|
10
|
+
type ProductionCorner = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
11
|
+
interface ProductionChoices {
|
|
12
|
+
layout: 'merged' | 'per-document';
|
|
13
|
+
prefix: string;
|
|
14
|
+
start: number;
|
|
15
|
+
digits: number;
|
|
16
|
+
/** Corner of the Bates label; the QR code, when on, takes the opposite bottom corner. */
|
|
17
|
+
corner: ProductionCorner;
|
|
18
|
+
qr: boolean;
|
|
19
|
+
/** An index page first: every document with its Bates range. */
|
|
20
|
+
indexPage: boolean;
|
|
21
|
+
/** Also save the result as a document in the workspace (it is downloaded either way). */
|
|
22
|
+
saveToWorkspace: boolean;
|
|
23
|
+
/** Document ids in numbering order. */
|
|
24
|
+
order: string[];
|
|
25
|
+
}
|
|
26
|
+
interface ProductionDocument {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
}
|
|
30
|
+
interface ProductionDialogProps {
|
|
31
|
+
open: boolean;
|
|
32
|
+
onOpenChange: (open: boolean) => void;
|
|
33
|
+
/** The documents, in the order they are numbered until the user reorders them. */
|
|
34
|
+
documents: ProductionDocument[];
|
|
35
|
+
/** Selected documents that cannot be included, with the reason, e.g. "photo.jpg (no PDF)". */
|
|
36
|
+
leftOut?: string[];
|
|
37
|
+
onConfirm: (choices: ProductionChoices) => void;
|
|
38
|
+
busy?: boolean;
|
|
39
|
+
progress?: {
|
|
40
|
+
done: number;
|
|
41
|
+
total: number;
|
|
42
|
+
} | null;
|
|
43
|
+
error?: string | null;
|
|
44
|
+
}
|
|
45
|
+
/** The QR code sits in the bottom corner the label is not in (the label may be top or bottom). */
|
|
46
|
+
declare function qrCornerFor(corner: ProductionCorner): ProductionCorner;
|
|
47
|
+
/** `items` with the entry at `from` moved to `to`. */
|
|
48
|
+
declare function moveItem<T>(items: readonly T[], from: number, to: number): T[];
|
|
49
|
+
declare function ProductionDialog({ open, onOpenChange, documents, leftOut, onConfirm, busy, progress, error, }: ProductionDialogProps): React.JSX.Element;
|
|
50
|
+
|
|
51
|
+
export { type ProductionChoices as P, type ProductionCorner as a, ProductionDialog as b, type ProductionDialogProps as c, type ProductionDocument as d, moveItem as m, qrCornerFor as q };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Asks how to number and package a set of documents as a production. It only collects choices; the
|
|
5
|
+
* host runs `buildBundle` (see `@arbidocs/react/annotations/freeze`) and saves the result.
|
|
6
|
+
*
|
|
7
|
+
* The documents can be put in order (drag a row, or its up/down buttons from the keyboard): that
|
|
8
|
+
* order is the numbering order.
|
|
9
|
+
*/
|
|
10
|
+
type ProductionCorner = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
11
|
+
interface ProductionChoices {
|
|
12
|
+
layout: 'merged' | 'per-document';
|
|
13
|
+
prefix: string;
|
|
14
|
+
start: number;
|
|
15
|
+
digits: number;
|
|
16
|
+
/** Corner of the Bates label; the QR code, when on, takes the opposite bottom corner. */
|
|
17
|
+
corner: ProductionCorner;
|
|
18
|
+
qr: boolean;
|
|
19
|
+
/** An index page first: every document with its Bates range. */
|
|
20
|
+
indexPage: boolean;
|
|
21
|
+
/** Also save the result as a document in the workspace (it is downloaded either way). */
|
|
22
|
+
saveToWorkspace: boolean;
|
|
23
|
+
/** Document ids in numbering order. */
|
|
24
|
+
order: string[];
|
|
25
|
+
}
|
|
26
|
+
interface ProductionDocument {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
}
|
|
30
|
+
interface ProductionDialogProps {
|
|
31
|
+
open: boolean;
|
|
32
|
+
onOpenChange: (open: boolean) => void;
|
|
33
|
+
/** The documents, in the order they are numbered until the user reorders them. */
|
|
34
|
+
documents: ProductionDocument[];
|
|
35
|
+
/** Selected documents that cannot be included, with the reason, e.g. "photo.jpg (no PDF)". */
|
|
36
|
+
leftOut?: string[];
|
|
37
|
+
onConfirm: (choices: ProductionChoices) => void;
|
|
38
|
+
busy?: boolean;
|
|
39
|
+
progress?: {
|
|
40
|
+
done: number;
|
|
41
|
+
total: number;
|
|
42
|
+
} | null;
|
|
43
|
+
error?: string | null;
|
|
44
|
+
}
|
|
45
|
+
/** The QR code sits in the bottom corner the label is not in (the label may be top or bottom). */
|
|
46
|
+
declare function qrCornerFor(corner: ProductionCorner): ProductionCorner;
|
|
47
|
+
/** `items` with the entry at `from` moved to `to`. */
|
|
48
|
+
declare function moveItem<T>(items: readonly T[], from: number, to: number): T[];
|
|
49
|
+
declare function ProductionDialog({ open, onOpenChange, documents, leftOut, onConfirm, busy, progress, error, }: ProductionDialogProps): React.JSX.Element;
|
|
50
|
+
|
|
51
|
+
export { type ProductionChoices as P, type ProductionCorner as a, ProductionDialog as b, type ProductionDialogProps as c, type ProductionDocument as d, moveItem as m, qrCornerFor as q };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var chunk2IJP73ZG_cjs = require('../../chunk-2IJP73ZG.cjs');
|
|
3
|
+
var chunkPC4O3JDV_cjs = require('../../chunk-PC4O3JDV.cjs');
|
|
5
4
|
require('../../chunk-IU2CJNTB.cjs');
|
|
5
|
+
var chunk2IJP73ZG_cjs = require('../../chunk-2IJP73ZG.cjs');
|
|
6
6
|
var reactPdf = require('react-pdf');
|
|
7
7
|
|
|
8
8
|
async function freezePdfInBrowser(bytes, layer, { assets, password, ...options }) {
|
|
9
9
|
const needsRaster = options.mode === "image" || layer.annotations.some(chunk2IJP73ZG_cjs.isEffectiveRedaction);
|
|
10
|
-
const rasterizer = needsRaster ? await
|
|
10
|
+
const rasterizer = needsRaster ? await chunkPC4O3JDV_cjs.createPdfJsRasterizer(reactPdf.pdfjs, bytes, chunkPC4O3JDV_cjs.browserCanvasFactory(), {
|
|
11
11
|
password,
|
|
12
12
|
documentOptions: {
|
|
13
13
|
cMapUrl: assets?.cMapUrl ?? "/cmaps/",
|
|
@@ -16,48 +16,48 @@ async function freezePdfInBrowser(bytes, layer, { assets, password, ...options }
|
|
|
16
16
|
wasmUrl: assets?.wasmUrl ?? "/wasm/"
|
|
17
17
|
}
|
|
18
18
|
}) : void 0;
|
|
19
|
-
return
|
|
19
|
+
return chunkPC4O3JDV_cjs.freezePdf(bytes, layer, { ...options, rasterizer });
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
Object.defineProperty(exports, "DEFAULT_DPI", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkPC4O3JDV_cjs.DEFAULT_DPI; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "FreezeError", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkPC4O3JDV_cjs.FreezeError; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "MAX_PAGE_PIXELS", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkPC4O3JDV_cjs.MAX_PAGE_PIXELS; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "batesLabel", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkPC4O3JDV_cjs.batesLabel; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "browserCanvasFactory", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkPC4O3JDV_cjs.browserCanvasFactory; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "buildBundle", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkPC4O3JDV_cjs.buildBundle; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "burnMarks", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkPC4O3JDV_cjs.burnMarks; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "createPdfJsRasterizer", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkPC4O3JDV_cjs.createPdfJsRasterizer; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "freezePdf", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkPC4O3JDV_cjs.freezePdf; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "readProvenance", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkPC4O3JDV_cjs.readProvenance; }
|
|
61
61
|
});
|
|
62
62
|
exports.freezePdfInBrowser = freezePdfInBrowser;
|
|
63
63
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createPdfJsRasterizer, browserCanvasFactory, freezePdf } from '../../chunk-
|
|
2
|
-
export { DEFAULT_DPI, FreezeError, MAX_PAGE_PIXELS, batesLabel, browserCanvasFactory, buildBundle, burnMarks, createPdfJsRasterizer, freezePdf, readProvenance } from '../../chunk-
|
|
3
|
-
import { isEffectiveRedaction } from '../../chunk-T3USOSVN.js';
|
|
1
|
+
import { createPdfJsRasterizer, browserCanvasFactory, freezePdf } from '../../chunk-NIKPG4PW.js';
|
|
2
|
+
export { DEFAULT_DPI, FreezeError, MAX_PAGE_PIXELS, batesLabel, browserCanvasFactory, buildBundle, burnMarks, createPdfJsRasterizer, freezePdf, readProvenance } from '../../chunk-NIKPG4PW.js';
|
|
4
3
|
import '../../chunk-PTOP7OHG.js';
|
|
4
|
+
import { isEffectiveRedaction } from '../../chunk-T3USOSVN.js';
|
|
5
5
|
import { pdfjs } from 'react-pdf';
|
|
6
6
|
|
|
7
7
|
async function freezePdfInBrowser(bytes, layer, { assets, password, ...options }) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { A as Annotation, e as RedactionStatus, d as CommentReply, b as AnnotationLayer, N as NormRect } from '../model.d-CNtRWKVK.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.d-CNtRWKVK.cjs';
|
|
3
|
-
import { A as AnnotationStore } from '../
|
|
4
|
-
export { a as AnnotationStoreOfflineError,
|
|
3
|
+
import { A as AnnotationStore } from '../store.d-GADDvC7w.cjs';
|
|
4
|
+
export { a as AnnotationStoreOfflineError, c as createLocalStorageStore, b as createMemoryStore } from '../store.d-GADDvC7w.cjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
7
|
+
export { P as ProductionChoices, a as ProductionCorner, b as ProductionDialog, c as ProductionDialogProps, d as ProductionDocument, m as moveItem, q as qrCornerFor } from '../ProductionDialog.d-CpzslFn0.cjs';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Pure state for an annotation layer: actions, a reducer and undo/redo history.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { A as Annotation, e as RedactionStatus, d as CommentReply, b as AnnotationLayer, N as NormRect } from '../model.d-CNtRWKVK.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.d-CNtRWKVK.js';
|
|
3
|
-
import { A as AnnotationStore } from '../
|
|
4
|
-
export { a as AnnotationStoreOfflineError,
|
|
3
|
+
import { A as AnnotationStore } from '../store.d-DkFXbWDk.js';
|
|
4
|
+
export { a as AnnotationStoreOfflineError, c as createLocalStorageStore, b as createMemoryStore } from '../store.d-DkFXbWDk.js';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
7
|
+
export { P as ProductionChoices, a as ProductionCorner, b as ProductionDialog, c as ProductionDialogProps, d as ProductionDocument, m as moveItem, q as qrCornerFor } from '../ProductionDialog.d-CpzslFn0.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Pure state for an annotation layer: actions, a reducer and undo/redo history.
|
package/dist/artifacts/index.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkZNQPUPX6_cjs = require('../chunk-ZNQPUPX6.cjs');
|
|
4
|
+
var chunkDVL7EFZZ_cjs = require('../chunk-DVL7EFZZ.cjs');
|
|
5
5
|
var chunk3AADNIOK_cjs = require('../chunk-3AADNIOK.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkGQAXAZN7_cjs = require('../chunk-GQAXAZN7.cjs');
|
|
7
|
+
var chunkY7S2SQH3_cjs = require('../chunk-Y7S2SQH3.cjs');
|
|
7
8
|
require('../chunk-N73IMVFF.cjs');
|
|
8
9
|
var chunkZWFMFOGP_cjs = require('../chunk-ZWFMFOGP.cjs');
|
|
9
10
|
var chunkVOFNX4P6_cjs = require('../chunk-VOFNX4P6.cjs');
|
|
10
11
|
var chunkOC7F5SNA_cjs = require('../chunk-OC7F5SNA.cjs');
|
|
11
12
|
require('../chunk-Z3LLUO32.cjs');
|
|
12
|
-
require('../chunk-S6A6FSG7.cjs');
|
|
13
|
-
var chunkY7S2SQH3_cjs = require('../chunk-Y7S2SQH3.cjs');
|
|
14
13
|
require('../chunk-RCKA7BEF.cjs');
|
|
14
|
+
require('../chunk-S6A6FSG7.cjs');
|
|
15
15
|
var react = require('react');
|
|
16
16
|
var reactQuery = require('@tanstack/react-query');
|
|
17
17
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -287,7 +287,7 @@ function useArtifactText(docId, options) {
|
|
|
287
287
|
const enabled = (options?.enabled ?? true) && chunkZWFMFOGP_cjs.isDocumentId(docId) && arbi.hasWorkspace;
|
|
288
288
|
const query = reactQuery.useQuery({
|
|
289
289
|
// Under the shared `parsedDoc` key, so a document's invalidation reaches it too.
|
|
290
|
-
queryKey: [...
|
|
290
|
+
queryKey: [...chunkGQAXAZN7_cjs.arbiQueryKeys.parsedDoc(docId ?? "", "marker"), "artifact-text"],
|
|
291
291
|
queryFn: async () => {
|
|
292
292
|
const { docId: plainId, version } = chunkZWFMFOGP_cjs.parseVersionRef(docId);
|
|
293
293
|
const parsed = await arbi.documents.getParsedContent(
|
|
@@ -335,12 +335,12 @@ function useArtifactText(docId, options) {
|
|
|
335
335
|
// src/artifacts/useArtifactSession.ts
|
|
336
336
|
function useArtifactVersions(workspaceId, docId) {
|
|
337
337
|
const plainId = docId ? chunkZWFMFOGP_cjs.parseVersionRef(docId).docId : null;
|
|
338
|
-
const { data: documents } =
|
|
338
|
+
const { data: documents } = chunkZNQPUPX6_cjs.useDocuments(workspaceId);
|
|
339
339
|
const listed = react.useMemo(
|
|
340
340
|
() => (documents ?? []).find((d) => d.external_id === plainId),
|
|
341
341
|
[documents, plainId]
|
|
342
342
|
);
|
|
343
|
-
const { data: history } =
|
|
343
|
+
const { data: history } = chunkDVL7EFZZ_cjs.useDocumentVersionList(plainId, {
|
|
344
344
|
enabled: !!plainId && documents !== void 0 && !listed
|
|
345
345
|
});
|
|
346
346
|
return react.useMemo(
|
|
@@ -364,10 +364,10 @@ function useSaveArtifactVersion() {
|
|
|
364
364
|
}
|
|
365
365
|
);
|
|
366
366
|
const docId = result.doc_ext_ids?.[0];
|
|
367
|
-
if (docId) await
|
|
368
|
-
await queryClient.invalidateQueries({ queryKey:
|
|
367
|
+
if (docId) await chunkZNQPUPX6_cjs.refreshDocuments(queryClient, arbi, [docId]);
|
|
368
|
+
await queryClient.invalidateQueries({ queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.allDocumentVersions() });
|
|
369
369
|
if (docId)
|
|
370
|
-
await queryClient.invalidateQueries({ queryKey:
|
|
370
|
+
await queryClient.invalidateQueries({ queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.parsedDocument(docId) });
|
|
371
371
|
return { docId, version: result.version ?? void 0 };
|
|
372
372
|
}
|
|
373
373
|
});
|
|
@@ -486,7 +486,7 @@ function useArtifactSession(options) {
|
|
|
486
486
|
function useArtifactSource(documentId, enabled = true) {
|
|
487
487
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
488
488
|
return reactQuery.useQuery({
|
|
489
|
-
queryKey:
|
|
489
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.artifactSource(documentId ?? ""),
|
|
490
490
|
queryFn: async () => (await arbi.documents.download(documentId)).text(),
|
|
491
491
|
enabled: enabled && !!documentId && arbi.isLoggedIn,
|
|
492
492
|
staleTime: 5 * 60 * 1e3
|
package/dist/artifacts/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { useDocuments, refreshDocuments } from '../chunk-
|
|
2
|
-
import { useDocumentVersionList } from '../chunk-
|
|
1
|
+
import { useDocuments, refreshDocuments } from '../chunk-2LV53J46.js';
|
|
2
|
+
import { useDocumentVersionList } from '../chunk-ER4LFZG3.js';
|
|
3
3
|
import { revertRedlineRegion, buildHybridRedlineWithRegions, buildHybridRedlineMarkdown } from '../chunk-74N436VK.js';
|
|
4
4
|
export { buildHybridRedlineMarkdown, buildHybridRedlineWithRegions, revertRedlineRegion } from '../chunk-74N436VK.js';
|
|
5
|
-
import { arbiQueryKeys } from '../chunk-
|
|
5
|
+
import { arbiQueryKeys } from '../chunk-AOEJ744V.js';
|
|
6
|
+
import { useArbi } from '../chunk-R7YNABZY.js';
|
|
6
7
|
import '../chunk-DPYBZDJB.js';
|
|
7
8
|
import { isDocumentId, parseVersionRef, flattenChunks, documentVersions, toArtifactVersions, findVersion, versionLabel, cleanDraftWithReport } from '../chunk-NNWMHMEC.js';
|
|
8
9
|
export { cleanDraftMarkdown, cleanDraftWithReport, documentVersions, findVersion, flattenChunks, isDocumentId, parseVersionRef, promoteBoldTitle, repairParsedStructure, repairParsedTitle, savedFromId, stripAgentPreamble, toArtifactVersions, unescapeMarkdown, unwrapCitationLinks, versionLabel, versionRef } from '../chunk-NNWMHMEC.js';
|
|
@@ -10,9 +11,8 @@ import { normalizeMarkdown } from '../chunk-WUTL62MC.js';
|
|
|
10
11
|
export { normalizeMarkdown } from '../chunk-WUTL62MC.js';
|
|
11
12
|
import { MarkdownRenderer } from '../chunk-C44GO33B.js';
|
|
12
13
|
import '../chunk-QRCMKEE6.js';
|
|
13
|
-
import '../chunk-SN5YV6FF.js';
|
|
14
|
-
import { useArbi } from '../chunk-R7YNABZY.js';
|
|
15
14
|
import '../chunk-CPZ36AQS.js';
|
|
15
|
+
import '../chunk-SN5YV6FF.js';
|
|
16
16
|
import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
|
|
17
17
|
import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
|
|
18
18
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkPC4O3JDV_cjs = require('./chunk-PC4O3JDV.cjs');
|
|
4
|
+
require('./chunk-IU2CJNTB.cjs');
|
|
5
|
+
require('./chunk-2IJP73ZG.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "buildBundle", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkPC4O3JDV_cjs.buildBundle; }
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=bundle-IC65W2AO.cjs.map
|
|
14
|
+
//# sourceMappingURL=bundle-IC65W2AO.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"bundle-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"bundle-IC65W2AO.cjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"bundle-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"bundle-YNOX7VIL.js"}
|