@arbidocs/react 0.4.55 → 0.4.56

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.
Files changed (49) hide show
  1. package/dist/PdfViewer-bQH9yxFg.d.cts +55 -0
  2. package/dist/PdfViewer-bQH9yxFg.d.ts +55 -0
  3. package/dist/annotations/freeze/index.cjs +748 -0
  4. package/dist/annotations/freeze/index.cjs.map +1 -0
  5. package/dist/annotations/freeze/index.d.cts +199 -0
  6. package/dist/annotations/freeze/index.d.ts +199 -0
  7. package/dist/annotations/freeze/index.js +738 -0
  8. package/dist/annotations/freeze/index.js.map +1 -0
  9. package/dist/annotations/index.cjs +1737 -0
  10. package/dist/annotations/index.cjs.map +1 -0
  11. package/dist/annotations/index.d.cts +291 -0
  12. package/dist/annotations/index.d.ts +291 -0
  13. package/dist/annotations/index.js +1671 -0
  14. package/dist/annotations/index.js.map +1 -0
  15. package/dist/artifacts/index.cjs +16 -16
  16. package/dist/artifacts/index.js +5 -5
  17. package/dist/chunk-BGDE4DP5.cjs +192 -0
  18. package/dist/chunk-BGDE4DP5.cjs.map +1 -0
  19. package/dist/{chunk-MS7VH2BY.js → chunk-CVN7MAGQ.js} +6 -146
  20. package/dist/chunk-CVN7MAGQ.js.map +1 -0
  21. package/dist/chunk-JWXIRUWN.js +183 -0
  22. package/dist/chunk-JWXIRUWN.js.map +1 -0
  23. package/dist/chunk-QS3Q5542.js +151 -0
  24. package/dist/chunk-QS3Q5542.js.map +1 -0
  25. package/dist/{chunk-RI3BZQWD.cjs → chunk-R6V6YHPD.cjs} +3 -3
  26. package/dist/{chunk-RI3BZQWD.cjs.map → chunk-R6V6YHPD.cjs.map} +1 -1
  27. package/dist/{chunk-LOESXNVT.cjs → chunk-X3F5ABY2.cjs} +5 -158
  28. package/dist/chunk-X3F5ABY2.cjs.map +1 -0
  29. package/dist/chunk-XDCRWZF2.cjs +185 -0
  30. package/dist/chunk-XDCRWZF2.cjs.map +1 -0
  31. package/dist/{chunk-GT6KN3DV.js → chunk-XKGTZ3H6.js} +3 -3
  32. package/dist/{chunk-GT6KN3DV.js.map → chunk-XKGTZ3H6.js.map} +1 -1
  33. package/dist/index.cjs +475 -474
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/index.js +11 -9
  36. package/dist/index.js.map +1 -1
  37. package/dist/model-DzQxhMMz.d.cts +102 -0
  38. package/dist/model-DzQxhMMz.d.ts +102 -0
  39. package/dist/ui/index.cjs +186 -185
  40. package/dist/ui/index.js +3 -2
  41. package/dist/viewers/index.cjs +61 -52
  42. package/dist/viewers/index.cjs.map +1 -1
  43. package/dist/viewers/index.d.cts +3 -43
  44. package/dist/viewers/index.d.ts +3 -43
  45. package/dist/viewers/index.js +61 -52
  46. package/dist/viewers/index.js.map +1 -1
  47. package/package.json +31 -9
  48. package/dist/chunk-LOESXNVT.cjs.map +0 -1
  49. package/dist/chunk-MS7VH2BY.js.map +0 -1
@@ -0,0 +1,55 @@
1
+ import * as React from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ /** Where the app serves the pdf.js runtime assets from. */
5
+ interface PdfViewerAssets {
6
+ /** pdf.js worker bundle. Default `/pdf.worker.min.mjs`. */
7
+ workerSrc?: string;
8
+ /** Directory of pdf.js character maps. Default `/cmaps/`. */
9
+ cMapUrl?: string;
10
+ /** Directory of pdf.js standard font data. Default `/standard_fonts/`. */
11
+ standardFontDataUrl?: string;
12
+ /**
13
+ * Directory of the pdf.js wasm decoders (openjpeg for JPEG 2000, jbig2,
14
+ * qcms). Scanned PDFs routinely embed JPX/JBIG2-compressed page images;
15
+ * without these modules pdf.js fails image decoding with only a console
16
+ * warning and renders blank white pages. Default `/wasm/`.
17
+ */
18
+ wasmUrl?: string;
19
+ }
20
+ interface PdfViewerProps {
21
+ file: string | Blob;
22
+ currentPage?: number;
23
+ onLoadSuccess?: (numPages: number) => void;
24
+ /** Incremented to trigger scroll to currentPage */
25
+ scrollTrigger?: number;
26
+ /** Zoom as a multiplier of the fit-width size (1 = fit width). Default 1. */
27
+ zoom?: number;
28
+ /** Called by pinch and double-tap; the host owns the value (its buttons change it too). */
29
+ onZoomChange?: (zoom: number) => void;
30
+ /**
31
+ * Called as the user scrolls, with the page occupying most of the viewport.
32
+ * This is the reusable form of the monolith's `setViewingDocumentPage`.
33
+ */
34
+ onPageChange?: (pageNumber: number) => void;
35
+ /**
36
+ * Force pdf.js to rasterise fonts onto the canvas instead of using @font-face.
37
+ * Required when rendering into a different document (e.g. a popped-out window),
38
+ * where @font-face rules from the opener do not apply.
39
+ */
40
+ disableFontFace?: boolean;
41
+ /** Where the app serves the pdf.js worker, cmaps and standard fonts from. */
42
+ assets?: PdfViewerAssets;
43
+ /**
44
+ * Content drawn over every page, inside its border box (e.g. the annotation layer). It fills the
45
+ * page area and moves and scales with it. `pageWidthPt` is the page's width in PDF points once
46
+ * known, so overlays can size strokes and text to match what a later export draws.
47
+ */
48
+ renderPageOverlay?: (page: {
49
+ pageNumber: number;
50
+ pageWidthPt: number | undefined;
51
+ }) => ReactNode;
52
+ }
53
+ declare function PdfViewer({ file, currentPage, onLoadSuccess, scrollTrigger, zoom, onZoomChange, onPageChange, disableFontFace, assets, renderPageOverlay, }: PdfViewerProps): React.JSX.Element;
54
+
55
+ export { PdfViewer as P, type PdfViewerAssets as a, type PdfViewerProps as b };
@@ -0,0 +1,55 @@
1
+ import * as React from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ /** Where the app serves the pdf.js runtime assets from. */
5
+ interface PdfViewerAssets {
6
+ /** pdf.js worker bundle. Default `/pdf.worker.min.mjs`. */
7
+ workerSrc?: string;
8
+ /** Directory of pdf.js character maps. Default `/cmaps/`. */
9
+ cMapUrl?: string;
10
+ /** Directory of pdf.js standard font data. Default `/standard_fonts/`. */
11
+ standardFontDataUrl?: string;
12
+ /**
13
+ * Directory of the pdf.js wasm decoders (openjpeg for JPEG 2000, jbig2,
14
+ * qcms). Scanned PDFs routinely embed JPX/JBIG2-compressed page images;
15
+ * without these modules pdf.js fails image decoding with only a console
16
+ * warning and renders blank white pages. Default `/wasm/`.
17
+ */
18
+ wasmUrl?: string;
19
+ }
20
+ interface PdfViewerProps {
21
+ file: string | Blob;
22
+ currentPage?: number;
23
+ onLoadSuccess?: (numPages: number) => void;
24
+ /** Incremented to trigger scroll to currentPage */
25
+ scrollTrigger?: number;
26
+ /** Zoom as a multiplier of the fit-width size (1 = fit width). Default 1. */
27
+ zoom?: number;
28
+ /** Called by pinch and double-tap; the host owns the value (its buttons change it too). */
29
+ onZoomChange?: (zoom: number) => void;
30
+ /**
31
+ * Called as the user scrolls, with the page occupying most of the viewport.
32
+ * This is the reusable form of the monolith's `setViewingDocumentPage`.
33
+ */
34
+ onPageChange?: (pageNumber: number) => void;
35
+ /**
36
+ * Force pdf.js to rasterise fonts onto the canvas instead of using @font-face.
37
+ * Required when rendering into a different document (e.g. a popped-out window),
38
+ * where @font-face rules from the opener do not apply.
39
+ */
40
+ disableFontFace?: boolean;
41
+ /** Where the app serves the pdf.js worker, cmaps and standard fonts from. */
42
+ assets?: PdfViewerAssets;
43
+ /**
44
+ * Content drawn over every page, inside its border box (e.g. the annotation layer). It fills the
45
+ * page area and moves and scales with it. `pageWidthPt` is the page's width in PDF points once
46
+ * known, so overlays can size strokes and text to match what a later export draws.
47
+ */
48
+ renderPageOverlay?: (page: {
49
+ pageNumber: number;
50
+ pageWidthPt: number | undefined;
51
+ }) => ReactNode;
52
+ }
53
+ declare function PdfViewer({ file, currentPage, onLoadSuccess, scrollTrigger, zoom, onZoomChange, onPageChange, disableFontFace, assets, renderPageOverlay, }: PdfViewerProps): React.JSX.Element;
54
+
55
+ export { PdfViewer as P, type PdfViewerAssets as a, type PdfViewerProps as b };