@vue-pdf-viewer/viewer 3.0.0-alpha.0 → 3.0.0-alpha.3
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/{annotation-circle-tIpRci60.js → annotation-circle-COOiYsJg.js} +2 -2
- package/dist/{annotation-freetext-zmKZ4GuW.js → annotation-freetext-dvsFpAZu.js} +2 -2
- package/dist/{annotation-highlight-CBhenBLo.js → annotation-highlight-DfO5AU26.js} +2 -2
- package/dist/{annotation-ink-Cr5tjD8f.js → annotation-ink-Dq1T0COO.js} +2 -2
- package/dist/{annotation-line-CBubP1QZ.js → annotation-line-mbXXKVam.js} +2 -2
- package/dist/{annotation-link-DI9mj24Y.js → annotation-link-DHPTdWez.js} +2 -2
- package/dist/{annotation-signature-DQVfU7hJ.js → annotation-signature-4ci2KImE.js} +2 -2
- package/dist/{annotation-square-_rIuUCHT.js → annotation-square-SQ7oqcEq.js} +2 -2
- package/dist/{annotation-squiggly-DfLrUnSa.js → annotation-squiggly-B7fWFNAK.js} +2 -2
- package/dist/{annotation-stamp-B5gaCO0X.js → annotation-stamp-BkEskP5J.js} +2 -2
- package/dist/{annotation-strikeout-Cn_VHn_N.js → annotation-strikeout-C-bSOcHc.js} +2 -2
- package/dist/{annotation-text-pKHfDK_Q.js → annotation-text-BgsMjKeI.js} +2 -2
- package/dist/{annotation-underline-BDgmfJQk.js → annotation-underline-Be5qs13j.js} +2 -2
- package/dist/{arrow-up-DhoV0HvK.js → arrow-up-vWNs2knA.js} +2 -2
- package/dist/{check-BRo7Q5UG.js → check-BkaH7nrH.js} +2 -2
- package/dist/{chevron-down-BEs3P7KI.js → chevron-down-BSFTOkiu.js} +2 -2
- package/dist/{clear-DP391aEz.js → clear-CasZmBPr.js} +2 -2
- package/dist/{close-CnbAWKuA.js → close-BgsD04zx.js} +2 -2
- package/dist/{comment-panel-BkFw3FUB.js → comment-panel-B-sIKcBp.js} +2 -2
- package/dist/{download-C45QpUvK.js → download-DCHGUHXx.js} +2 -2
- package/dist/{drag-icon-CpENKa0y.js → drag-icon-D-z1P6O_.js} +2 -2
- package/dist/{drag-icon-dark-B0sqKXav.js → drag-icon-dark-DXDxQjnW.js} +2 -2
- package/dist/{ellipsis-vertical-X1VRRfZe.js → ellipsis-vertical-Cjbi7utY.js} +2 -2
- package/dist/{empty-comment-dark-DdPeDeR5.js → empty-comment-dark-CrZRt0Hl.js} +2 -2
- package/dist/{empty-comment-light-Dgc1r5xv.js → empty-comment-light-BVPUX2pA.js} +2 -2
- package/dist/{file-C2gjRcLU.js → file-BD05gONj.js} +2 -2
- package/dist/{first-page-32lvRrjG.js → first-page-DihCXIQm.js} +2 -2
- package/dist/{fullscreen-Cuegwls4.js → fullscreen-BmHQQPIs.js} +2 -2
- package/dist/{hand-BvbzlDGf.js → hand-B1v6mSWQ.js} +2 -2
- package/dist/index.js +9012 -8646
- package/dist/index.umd.cjs +18 -18
- package/dist/{info-2-wEcru0.js → info-DXpOTVKn.js} +2 -2
- package/dist/{last-page-DDJIJ2gp.js → last-page-DIN17z_8.js} +2 -2
- package/dist/{magnifier-shuB09Te.js → magnifier-Dep29X1B.js} +2 -2
- package/dist/{moon-Cf7pmsnw.js → moon-Dw-MII-V.js} +2 -2
- package/dist/{page-view-dual-f5-I0-4D.js → page-view-dual-DCLg-YkG.js} +2 -2
- package/dist/{page-view-single-DTduusoS.js → page-view-single-CWOhdavX.js} +2 -2
- package/dist/{pointer-CdvbhXLR.js → pointer-jfdFDx4z.js} +2 -2
- package/dist/{printer-ERNx1Q88.js → printer-B8qbXO9F.js} +2 -2
- package/dist/{rotate-counter-clockwise-CEN3P8nT.js → rotate-counter-clockwise-DFl9ijSR.js} +2 -2
- package/dist/{scrolling-horizontal-CdariRpO.js → scrolling-horizontal-JO2P2O-8.js} +2 -2
- package/dist/{scrolling-page-wFZlGv_K.js → scrolling-page-y5Rrmrnm.js} +2 -2
- package/dist/{scrolling-vertical-B1Doxmyt.js → scrolling-vertical-D9MCCss9.js} +2 -2
- package/dist/{scrolling-wrapped-BBipRQ-N.js → scrolling-wrapped-CYbEHLH6.js} +2 -2
- package/dist/{sun-C0fX-A5U.js → sun-BhyBd5LA.js} +2 -2
- package/dist/{thumbnail-HzftUNEp.js → thumbnail-BMmN_jSl.js} +2 -2
- package/dist/{trash-BTydaFkw.js → trash-Deie-RCt.js} +2 -2
- package/dist/{zoom-in-CPqqALGr.js → zoom-in-qogh-J7e.js} +2 -2
- package/dist/{zoom-out-BpilF8O_.js → zoom-out-BFzERV6_.js} +2 -2
- package/package.json +16 -11
- package/dist/types/assets/pdf-annotations/index.d.ts +0 -2
- package/dist/types/components/AppButton.vue.d.ts +0 -18
- package/dist/types/components/AppFormControl.vue.d.ts +0 -30
- package/dist/types/components/AppIcon.vue.d.ts +0 -15
- package/dist/types/components/AppInput.vue.d.ts +0 -12
- package/dist/types/components/AppLoader.vue.d.ts +0 -19
- package/dist/types/components/AppPopover.vue.d.ts +0 -93
- package/dist/types/components/AppTooltip.vue.d.ts +0 -34
- package/dist/types/components/DragFileMask.vue.d.ts +0 -55
- package/dist/types/components/HighlightColorButton.vue.d.ts +0 -15
- package/dist/types/components/HighlightColorPicker.vue.d.ts +0 -2
- package/dist/types/components/LayerAnnotation.vue.d.ts +0 -47
- package/dist/types/components/LayerAnnotationEditor.vue.d.ts +0 -26
- package/dist/types/components/LayerAnnotationEditorHighlight.vue.d.ts +0 -37
- package/dist/types/components/LayerAnnotationEditorHighlightItem.vue.d.ts +0 -26
- package/dist/types/components/LayerAnnotationEditorImage.vue.d.ts +0 -28
- package/dist/types/components/LayerAnnotationStampResizer.vue.d.ts +0 -28
- package/dist/types/components/LayerCanvas.vue.d.ts +0 -25
- package/dist/types/components/LayerText.vue.d.ts +0 -30
- package/dist/types/components/LayerTextHighlight.vue.d.ts +0 -20
- package/dist/types/components/LayerTextSearchHighlight.vue.d.ts +0 -19
- package/dist/types/components/LayerXFA.vue.d.ts +0 -23
- package/dist/types/components/ModalPassword.vue.d.ts +0 -19
- package/dist/types/components/ModalPdfProperties.vue.d.ts +0 -18
- package/dist/types/components/ModalPrintLoadingProgress.vue.d.ts +0 -20
- package/dist/types/components/Signatures.vue.d.ts +0 -2
- package/dist/types/components/SwitchAppearance.vue.d.ts +0 -23
- package/dist/types/components/ToolCommentPanel.vue.d.ts +0 -31
- package/dist/types/components/ToolDownload.vue.d.ts +0 -21
- package/dist/types/components/ToolFullscreen.vue.d.ts +0 -22
- package/dist/types/components/ToolMenuOthers.vue.d.ts +0 -88
- package/dist/types/components/ToolMenuOthersMobile.vue.d.ts +0 -21
- package/dist/types/components/ToolOpenFile.vue.d.ts +0 -21
- package/dist/types/components/ToolOpenFileInput.vue.d.ts +0 -11
- package/dist/types/components/ToolPagination.vue.d.ts +0 -68
- package/dist/types/components/ToolPrint.vue.d.ts +0 -35
- package/dist/types/components/ToolSearch.vue.d.ts +0 -73
- package/dist/types/components/ToolThumbnail.vue.d.ts +0 -43
- package/dist/types/components/ToolZoom.vue.d.ts +0 -55
- package/dist/types/components/ToolZoomPercentageMenu.vue.d.ts +0 -25
- package/dist/types/components/VPdfComments.vue.d.ts +0 -28
- package/dist/types/components/VPdfCommentsDate.vue.d.ts +0 -15
- package/dist/types/components/VPdfCommentsHeader.vue.d.ts +0 -16
- package/dist/types/components/VPdfCommentsIcon.vue.d.ts +0 -16
- package/dist/types/components/VPdfCommentsReplies.vue.d.ts +0 -16
- package/dist/types/components/VPdfCommentsSidebar.vue.d.ts +0 -15
- package/dist/types/components/VPdfCommentsText.vue.d.ts +0 -2
- package/dist/types/components/VPdfPage.vue.d.ts +0 -44
- package/dist/types/components/VPdfSplitter.vue.d.ts +0 -2
- package/dist/types/components/VPdfThumbnail.vue.d.ts +0 -26
- package/dist/types/components/VPdfThumbnails.vue.d.ts +0 -22
- package/dist/types/components/VPdfViewer.vue.d.ts +0 -602
- package/dist/types/components/index.d.ts +0 -4
- package/dist/types/components/ui/button/Button.vue.d.ts +0 -52
- package/dist/types/components/ui/button/index.d.ts +0 -7
- package/dist/types/components/ui/checkbox/Checkbox.vue.d.ts +0 -35
- package/dist/types/components/ui/checkbox/index.d.ts +0 -1
- package/dist/types/components/ui/collapsible/Collapsible.vue.d.ts +0 -30
- package/dist/types/components/ui/collapsible/CollapsibleContent.vue.d.ts +0 -28
- package/dist/types/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +0 -28
- package/dist/types/components/ui/collapsible/index.d.ts +0 -3
- package/dist/types/components/ui/dialog/Dialog.vue.d.ts +0 -28
- package/dist/types/components/ui/dialog/DialogClose.vue.d.ts +0 -28
- package/dist/types/components/ui/dialog/DialogContent.vue.d.ts +0 -35
- package/dist/types/components/ui/dialog/DialogDescription.vue.d.ts +0 -35
- package/dist/types/components/ui/dialog/DialogFooter.vue.d.ts +0 -34
- package/dist/types/components/ui/dialog/DialogHeader.vue.d.ts +0 -34
- package/dist/types/components/ui/dialog/DialogTitle.vue.d.ts +0 -35
- package/dist/types/components/ui/dialog/DialogTrigger.vue.d.ts +0 -28
- package/dist/types/components/ui/dialog/index.d.ts +0 -8
- package/dist/types/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +0 -28
- package/dist/types/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +0 -35
- package/dist/types/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +0 -52
- package/dist/types/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +0 -28
- package/dist/types/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +0 -41
- package/dist/types/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +0 -38
- package/dist/types/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +0 -28
- package/dist/types/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +0 -38
- package/dist/types/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +0 -17
- package/dist/types/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +0 -34
- package/dist/types/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +0 -28
- package/dist/types/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +0 -35
- package/dist/types/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +0 -35
- package/dist/types/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +0 -28
- package/dist/types/components/ui/dropdown-menu/index.d.ts +0 -15
- package/dist/types/components/ui/input/Input.vue.d.ts +0 -16
- package/dist/types/components/ui/input/index.d.ts +0 -7
- package/dist/types/components/ui/popover/Popover.vue.d.ts +0 -28
- package/dist/types/components/ui/popover/PopoverContent.vue.d.ts +0 -64
- package/dist/types/components/ui/popover/PopoverTrigger.vue.d.ts +0 -28
- package/dist/types/components/ui/popover/index.d.ts +0 -3
- package/dist/types/components/ui/progress/Progress.vue.d.ts +0 -28
- package/dist/types/components/ui/progress/index.d.ts +0 -1
- package/dist/types/components/ui/toast/Toast.vue.d.ts +0 -28
- package/dist/types/components/ui/toast/ToastAction.vue.d.ts +0 -35
- package/dist/types/components/ui/toast/ToastClose.vue.d.ts +0 -17
- package/dist/types/components/ui/toast/ToastDescription.vue.d.ts +0 -35
- package/dist/types/components/ui/toast/ToastProvider.vue.d.ts +0 -28
- package/dist/types/components/ui/toast/ToastTitle.vue.d.ts +0 -35
- package/dist/types/components/ui/toast/ToastViewport.vue.d.ts +0 -17
- package/dist/types/components/ui/toast/Toaster.vue.d.ts +0 -2
- package/dist/types/components/ui/toast/index.d.ts +0 -21
- package/dist/types/components/ui/toast/use-toast.d.ts +0 -272
- package/dist/types/components/ui/tooltip/Tooltip.vue.d.ts +0 -28
- package/dist/types/components/ui/tooltip/TooltipContent.vue.d.ts +0 -52
- package/dist/types/components/ui/tooltip/TooltipProvider.vue.d.ts +0 -28
- package/dist/types/components/ui/tooltip/TooltipTrigger.vue.d.ts +0 -28
- package/dist/types/components/ui/tooltip/index.d.ts +0 -4
- package/dist/types/components/utils/annotations.d.ts +0 -5
- package/dist/types/components/utils/destination.d.ts +0 -7
- package/dist/types/components/utils/helpers.d.ts +0 -2
- package/dist/types/components/utils/link_service.d.ts +0 -71
- package/dist/types/components/utils/sanitizeExternalURL.d.ts +0 -1
- package/dist/types/composables/useAnnotationDrag.d.ts +0 -72
- package/dist/types/composables/useAnnotationHighlight.d.ts +0 -389
- package/dist/types/composables/useAnnotationStamp.d.ts +0 -493
- package/dist/types/composables/useAnnotationStorage.d.ts +0 -72
- package/dist/types/composables/useDownload.d.ts +0 -13
- package/dist/types/composables/useHighlight.d.ts +0 -11
- package/dist/types/composables/useLicense.d.ts +0 -22
- package/dist/types/composables/usePdf.d.ts +0 -28
- package/dist/types/composables/usePdfComments.d.ts +0 -5
- package/dist/types/composables/usePdfPagesSizes.d.ts +0 -8
- package/dist/types/composables/usePdfProperties.d.ts +0 -10
- package/dist/types/composables/usePinch.d.ts +0 -3
- package/dist/types/composables/usePlugins.d.ts +0 -252
- package/dist/types/composables/usePrintControl.d.ts +0 -22
- package/dist/types/composables/usePrintProcess.d.ts +0 -8
- package/dist/types/composables/useRenderQueue.d.ts +0 -13
- package/dist/types/composables/useRequestAnimationFrame.d.ts +0 -1
- package/dist/types/composables/useRotation.d.ts +0 -7
- package/dist/types/composables/useScale.d.ts +0 -21
- package/dist/types/composables/useSearch.d.ts +0 -5
- package/dist/types/composables/useTextLayers.d.ts +0 -5
- package/dist/types/composables/useVirtualPages.d.ts +0 -32
- package/dist/types/composables/useVisibilities.d.ts +0 -9
- package/dist/types/const.d.ts +0 -130
- package/dist/types/index.d.ts +0 -8
- package/dist/types/utils/annotation-command.d.ts +0 -18
- package/dist/types/utils/annotation-display.d.ts +0 -24
- package/dist/types/utils/annotation-highlight.d.ts +0 -69
- package/dist/types/utils/annotation-image.d.ts +0 -111
- package/dist/types/utils/annotation-pdf.d.ts +0 -35
- package/dist/types/utils/appConsole.d.ts +0 -24
- package/dist/types/utils/characters.d.ts +0 -16
- package/dist/types/utils/color.d.ts +0 -4
- package/dist/types/utils/convertPDFDate.d.ts +0 -1
- package/dist/types/utils/enumerators.d.ts +0 -80
- package/dist/types/utils/highlight.d.ts +0 -8
- package/dist/types/utils/promiseWithResolvers.d.ts +0 -7
- package/dist/types/utils/searchHighlight.d.ts +0 -10
- package/dist/types/utils/smoothScroll.d.ts +0 -2
- package/dist/types/utils/types.d.ts +0 -715
- package/dist/types/utils/uiViewer.d.ts +0 -4
- package/dist/types/utils/validators.d.ts +0 -26
- package/dist/types/utils.d.ts +0 -20
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { PageViewport } from 'pdfjs-dist';
|
|
2
|
-
import type { RectBox } from './types';
|
|
3
|
-
export declare function calculateBoundingBox(boxes: RectBox[]): [number, number, number, number];
|
|
4
|
-
export declare function createSVGPathFromQuadPoints(quadPoints: number[], viewport: PageViewport): string;
|
|
5
|
-
declare class HighlightOutline {
|
|
6
|
-
#private;
|
|
7
|
-
constructor(outlines: any[], box: Float32Array, lastPoint: any[]);
|
|
8
|
-
get outlines(): any[];
|
|
9
|
-
toSVGPath(): string;
|
|
10
|
-
/**
|
|
11
|
-
* Serialize the outlines into the PDF page coordinate system.
|
|
12
|
-
* @param {Array<number>} _bbox - the bounding box of the annotation.
|
|
13
|
-
* @param {number} _rotation - the rotation of the annotation.
|
|
14
|
-
* @returns {Array<Array<number>>}
|
|
15
|
-
*/
|
|
16
|
-
serialize([blX, blY, trX, trY]: [number, number, number, number], _rotation: number): any[][];
|
|
17
|
-
get box(): Float32Array;
|
|
18
|
-
}
|
|
19
|
-
export declare function getHighlightOutlineCreator(boxes: RectBox[], options?: {
|
|
20
|
-
borderWidth: number;
|
|
21
|
-
innerMargin: number;
|
|
22
|
-
isLTR: boolean;
|
|
23
|
-
}): {
|
|
24
|
-
box: Float32Array;
|
|
25
|
-
getOutlines: () => HighlightOutline;
|
|
26
|
-
};
|
|
27
|
-
export declare function quadPointsToBoxes(quadPoints: number[], rect: number[], pageWidth: number, pageHeight: number, pageX?: number, pageY?: number): {
|
|
28
|
-
x: number;
|
|
29
|
-
y: number;
|
|
30
|
-
width: number;
|
|
31
|
-
height: number;
|
|
32
|
-
}[];
|
|
33
|
-
export declare function quadPointsToBoxesForRect(quadPoints: number[], rect: number[]): {
|
|
34
|
-
x: number;
|
|
35
|
-
y: number;
|
|
36
|
-
width: number;
|
|
37
|
-
height: number;
|
|
38
|
-
}[];
|
|
39
|
-
/**
|
|
40
|
-
* Get selection boxes from text layer with proper rotation handling.
|
|
41
|
-
* Adapted from PDF.js display/editor/tools.js
|
|
42
|
-
* @param {HTMLElement} textLayer - The text layer element
|
|
43
|
-
* @returns {Array<{x: number, y: number, width: number, height: number}>|null} Normalized boxes or null
|
|
44
|
-
*/
|
|
45
|
-
export declare function getSelectionBoxes(textLayer: HTMLElement): {
|
|
46
|
-
x: number;
|
|
47
|
-
y: number;
|
|
48
|
-
width: number;
|
|
49
|
-
height: number;
|
|
50
|
-
}[] | null;
|
|
51
|
-
/**
|
|
52
|
-
* Convert selection boxes to PDF quadPoints
|
|
53
|
-
* @param {Array<{x: number, y: number, width: number, height: number}>} boxes - Normalized boxes (0-1 range)
|
|
54
|
-
* @param {PageViewport} viewport - PDF page viewport
|
|
55
|
-
* @returns {number[]} Array of quadPoints in PDF coordinate system
|
|
56
|
-
*/
|
|
57
|
-
export declare function boxesToQuadPoints(boxes: Array<{
|
|
58
|
-
x: number;
|
|
59
|
-
y: number;
|
|
60
|
-
width: number;
|
|
61
|
-
height: number;
|
|
62
|
-
}>, viewport: PageViewport): number[];
|
|
63
|
-
/**
|
|
64
|
-
* Calculate the bounding rectangle from quadPoints
|
|
65
|
-
* @param {number[]} quadPoints - Array of quadPoints coordinates
|
|
66
|
-
* @returns {number[]} Bounding rectangle [x1, y1, x2, y2] in PDF coordinates
|
|
67
|
-
*/
|
|
68
|
-
export declare function quadPointsToRect(quadPoints: number[]): number[];
|
|
69
|
-
export {};
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AnnotationImageManager - Based on PDF.js ImageManager
|
|
3
|
-
*
|
|
4
|
-
* Manages images used by annotation editors with memory optimization.
|
|
5
|
-
* Features:
|
|
6
|
-
* - Caching with reference counting
|
|
7
|
-
* - Memory management (converts to blob when not in use)
|
|
8
|
-
* - Multiple image sources: File, URL, Blob, Canvas
|
|
9
|
-
* - SVG support with aspect ratio preservation
|
|
10
|
-
* - Unique ID generation and validation
|
|
11
|
-
*/
|
|
12
|
-
export interface ImageData {
|
|
13
|
-
bitmap: ImageBitmap | HTMLImageElement;
|
|
14
|
-
id: string;
|
|
15
|
-
refCounter: number;
|
|
16
|
-
isSvg: boolean;
|
|
17
|
-
url?: string;
|
|
18
|
-
file?: File;
|
|
19
|
-
blobPromise?: Promise<Blob>;
|
|
20
|
-
svgUrl?: string;
|
|
21
|
-
}
|
|
22
|
-
export interface ImageManagerOptions {
|
|
23
|
-
baseId?: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Utility function to generate unique IDs
|
|
27
|
-
*/
|
|
28
|
-
declare function generateUuid(): string;
|
|
29
|
-
/**
|
|
30
|
-
* Utility function to fetch data from URL
|
|
31
|
-
*/
|
|
32
|
-
declare function fetchImageData(url: string): Promise<Blob>;
|
|
33
|
-
declare function validateFileSize(file: File, maxSize?: number): boolean;
|
|
34
|
-
declare function validateFileMimeType(file: File, mimeTypes?: string[]): boolean;
|
|
35
|
-
declare function isSVGFittingCanvas(): Promise<boolean>;
|
|
36
|
-
export declare class AnnotationImageManager {
|
|
37
|
-
private readonly baseId;
|
|
38
|
-
private idCounter;
|
|
39
|
-
private cache;
|
|
40
|
-
constructor(options?: ImageManagerOptions);
|
|
41
|
-
/**
|
|
42
|
-
* Get image data from cache or create new entry
|
|
43
|
-
*/
|
|
44
|
-
private get;
|
|
45
|
-
/**
|
|
46
|
-
* Handle SVG image loading with aspect ratio preservation
|
|
47
|
-
*/
|
|
48
|
-
private handleSvgImage;
|
|
49
|
-
/**
|
|
50
|
-
* Get image from File object
|
|
51
|
-
*/
|
|
52
|
-
getFromFile(file: File): Promise<ImageData | null>;
|
|
53
|
-
/**
|
|
54
|
-
* Get image from URL
|
|
55
|
-
*/
|
|
56
|
-
getFromUrl(url: string): Promise<ImageData | null>;
|
|
57
|
-
/**
|
|
58
|
-
* Get image from Blob with custom ID
|
|
59
|
-
*/
|
|
60
|
-
getFromBlob(id: string, blobPromise: Promise<Blob>): Promise<ImageData | null>;
|
|
61
|
-
/**
|
|
62
|
-
* Get image by ID (restore from cache)
|
|
63
|
-
*/
|
|
64
|
-
getFromId(id: string): Promise<ImageData | null>;
|
|
65
|
-
/**
|
|
66
|
-
* Get image from Canvas element
|
|
67
|
-
*/
|
|
68
|
-
getFromCanvas(id: string, canvas: HTMLCanvasElement): ImageData;
|
|
69
|
-
/**
|
|
70
|
-
* Get SVG URL by ID
|
|
71
|
-
*/
|
|
72
|
-
getSvgUrl(id: string): string | null;
|
|
73
|
-
/**
|
|
74
|
-
* Delete image by ID (decrement reference counter)
|
|
75
|
-
*/
|
|
76
|
-
deleteId(id: string): void;
|
|
77
|
-
/**
|
|
78
|
-
* Check if ID belongs to this manager
|
|
79
|
-
*/
|
|
80
|
-
isValidId(id: string): boolean;
|
|
81
|
-
/**
|
|
82
|
-
* Get all cached image IDs
|
|
83
|
-
*/
|
|
84
|
-
getCachedIds(): string[];
|
|
85
|
-
/**
|
|
86
|
-
* Get cache statistics
|
|
87
|
-
*/
|
|
88
|
-
getCacheStats(): {
|
|
89
|
-
totalImages: number;
|
|
90
|
-
loadedImages: number;
|
|
91
|
-
totalMemory: number;
|
|
92
|
-
};
|
|
93
|
-
/**
|
|
94
|
-
* Clear all cached images
|
|
95
|
-
*/
|
|
96
|
-
clear(): void;
|
|
97
|
-
/**
|
|
98
|
-
* Convert ImageBitmap to data URL (for export/clipboard)
|
|
99
|
-
*/
|
|
100
|
-
bitmapToDataUrl(imageData: ImageData): Promise<string>;
|
|
101
|
-
/**
|
|
102
|
-
* Create ImageBitmap from existing ImageData for serialization
|
|
103
|
-
*/
|
|
104
|
-
serializeBitmap(imageData: ImageData, options?: {
|
|
105
|
-
width?: number;
|
|
106
|
-
height?: number;
|
|
107
|
-
preserveAspectRatio?: boolean;
|
|
108
|
-
}): Promise<ImageBitmap>;
|
|
109
|
-
}
|
|
110
|
-
export declare const annotationImageManager: AnnotationImageManager;
|
|
111
|
-
export { generateUuid, fetchImageData, isSVGFittingCanvas, validateFileSize, validateFileMimeType };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { PDFDocumentProxy } from 'pdfjs-dist';
|
|
2
|
-
export declare function updatePdfAnnotations(pdfDocument: PDFDocumentProxy): Promise<void>;
|
|
3
|
-
/**
|
|
4
|
-
* Calculate the proper rect for highlight annotation serialization
|
|
5
|
-
*
|
|
6
|
-
* This method replicates the getRect logic from PDF.js AnnotationEditor to ensure
|
|
7
|
-
* that outlines are properly serialized when saving documents. The issue was that
|
|
8
|
-
* the original rect was not being calculated in the same coordinate system that
|
|
9
|
-
* PDF.js uses for outline serialization.
|
|
10
|
-
*
|
|
11
|
-
* In PDF.js, the HighlightEditor.serialize() method calls:
|
|
12
|
-
* 1. const rect = this.getRect(0, 0) - to get the rect in page coordinates
|
|
13
|
-
* 2. outlines: this.#serializeOutlines(rect) - to serialize outlines using that rect
|
|
14
|
-
*
|
|
15
|
-
* The #serializeOutlines method then calls:
|
|
16
|
-
* return this.#highlightOutlines.serialize(rect, this.#getRotation())
|
|
17
|
-
*
|
|
18
|
-
* This ensures that the outlines are properly transformed from normalized coordinates
|
|
19
|
-
* (0-1 range) to actual page coordinates, taking into account page translation and rotation.
|
|
20
|
-
*
|
|
21
|
-
* Since we use dontFlip: true in getViewport, the coordinates are already in PDF
|
|
22
|
-
* coordinate system (Y=0 at bottom), so we don't need to flip Y coordinates again.
|
|
23
|
-
*
|
|
24
|
-
* @param {number[]} quadPoints - The quad points of the annotation in page coordinates
|
|
25
|
-
* @param {Object} pageDimensions - Page dimensions and translation from viewport.rawDims
|
|
26
|
-
* @param {number} rotation - Page rotation in degrees (0, 90, 180, 270)
|
|
27
|
-
* @param {boolean} isDontFlip - Whether the viewport was created with dontFlip: true (default: true)
|
|
28
|
-
* @returns {number[]} The calculated rect [x1, y1, x2, y2] in page coordinates
|
|
29
|
-
*/
|
|
30
|
-
export declare const getAnnotationRect: (quadPoints: number[], pageDimensions: {
|
|
31
|
-
width: number;
|
|
32
|
-
height: number;
|
|
33
|
-
pageX: number;
|
|
34
|
-
pageY: number;
|
|
35
|
-
}, rotation?: number, isDontFlip?: boolean) => number[];
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare class Console {
|
|
2
|
-
private static instance;
|
|
3
|
-
private isProduction;
|
|
4
|
-
private constructor();
|
|
5
|
-
static getInstance(): Console;
|
|
6
|
-
/**
|
|
7
|
-
* Debug level logging - stripped in production
|
|
8
|
-
*/
|
|
9
|
-
debug(...args: any[]): void;
|
|
10
|
-
/**
|
|
11
|
-
* Info level logging
|
|
12
|
-
*/
|
|
13
|
-
info(...args: any[]): void;
|
|
14
|
-
/**
|
|
15
|
-
* Warning level logging
|
|
16
|
-
*/
|
|
17
|
-
warn(...args: any[]): void;
|
|
18
|
-
/**
|
|
19
|
-
* Error level logging
|
|
20
|
-
*/
|
|
21
|
-
error(...args: any[]): void;
|
|
22
|
-
}
|
|
23
|
-
declare const _default: Console;
|
|
24
|
-
export default _default;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare enum CharacterType {
|
|
2
|
-
SPACE = 0,
|
|
3
|
-
ALPHA_LETTER = 1,
|
|
4
|
-
PUNCTUATION = 2,
|
|
5
|
-
HAN_LETTER = 3,
|
|
6
|
-
KATAKANA_LETTER = 4,
|
|
7
|
-
HIRAGANA_LETTER = 5,
|
|
8
|
-
HALF_WIDTH_KATAKANA_LETTER = 6,
|
|
9
|
-
THAI_LETTER = 7
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* This function is based on the word-break detection implemented in:
|
|
13
|
-
* https://hg.mozilla.org/mozilla-central/file/tip/intl/lwbrk/WordBreaker.cpp
|
|
14
|
-
*/
|
|
15
|
-
declare function getCharacterType(charCode: number): CharacterType;
|
|
16
|
-
export { CharacterType, getCharacterType };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const makeHexColor: (r: number, g: number, b: number) => string;
|
|
2
|
-
export declare const uint8ClampedArrayToRgb: (color: Uint8ClampedArray | number[]) => number[];
|
|
3
|
-
export declare function rgbToUint8ClampedArray(hexColor: string): number[];
|
|
4
|
-
export declare function hexToUint8ClampedArray(hexColor: string): Uint8ClampedArray;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const convertPDFDate: (input: string) => Date | null;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
export declare enum LicenseType {
|
|
2
|
-
All = "all",
|
|
3
|
-
Premium = "premium",
|
|
4
|
-
Freemium = "freemium",
|
|
5
|
-
Unlicense = "none",
|
|
6
|
-
Organization = "organization",
|
|
7
|
-
Developer = "developer"
|
|
8
|
-
}
|
|
9
|
-
export declare enum ScrollMode {
|
|
10
|
-
Vertical = "Vertical",
|
|
11
|
-
Horizontal = "Horizontal",
|
|
12
|
-
Page = "Page",
|
|
13
|
-
Wrapped = "Wrapped"
|
|
14
|
-
}
|
|
15
|
-
export declare enum ViewMode {
|
|
16
|
-
SinglePage = "Single",
|
|
17
|
-
DualPage = "Dual"
|
|
18
|
-
}
|
|
19
|
-
export declare enum ZoomLevel {
|
|
20
|
-
ActualSize = "actualSize",
|
|
21
|
-
PageFit = "pageFit",
|
|
22
|
-
PageWidth = "pageWidth"
|
|
23
|
-
}
|
|
24
|
-
export declare enum ScrollDirection {
|
|
25
|
-
Horizontal = "Horizontal",
|
|
26
|
-
Vertical = "Vertical",
|
|
27
|
-
Both = "Both"
|
|
28
|
-
}
|
|
29
|
-
export declare enum VPVAnnotationType {
|
|
30
|
-
INTERNAL_LINK = "internal-link",
|
|
31
|
-
LINK = "link",
|
|
32
|
-
FILE_ATTACHMENT = "file-attachment",
|
|
33
|
-
FORM_TEXT = "form-text",
|
|
34
|
-
FORM_SELECT = "form-select",
|
|
35
|
-
FORM_CHECKBOX = "form-checkbox",
|
|
36
|
-
FORM_RADIO = "form-radio",
|
|
37
|
-
FORM_BUTTON = "form-button",
|
|
38
|
-
BUTTON = "button",
|
|
39
|
-
NAVIGATION = "navigation"
|
|
40
|
-
}
|
|
41
|
-
export declare enum LayerRenderStatus {
|
|
42
|
-
PreRender = 0,
|
|
43
|
-
DidRender = 1
|
|
44
|
-
}
|
|
45
|
-
export declare enum AnnotationType {
|
|
46
|
-
Text = 1,
|
|
47
|
-
Link = 2,
|
|
48
|
-
FreeText = 3,
|
|
49
|
-
Line = 4,
|
|
50
|
-
Square = 5,
|
|
51
|
-
Circle = 6,
|
|
52
|
-
Polygon = 7,
|
|
53
|
-
Polyline = 8,
|
|
54
|
-
Highlight = 9,
|
|
55
|
-
Underline = 10,
|
|
56
|
-
Squiggly = 11,
|
|
57
|
-
StrikeOut = 12,
|
|
58
|
-
Stamp = 13,
|
|
59
|
-
Caret = 14,
|
|
60
|
-
Ink = 15,
|
|
61
|
-
Popup = 16,
|
|
62
|
-
FileAttachment = 17,
|
|
63
|
-
Widget = 20
|
|
64
|
-
}
|
|
65
|
-
export declare enum AnnotationFlag {
|
|
66
|
-
INVISIBLE = 1,
|
|
67
|
-
HIDDEN = 2,
|
|
68
|
-
PRINT = 4,
|
|
69
|
-
NOZOOM = 8,
|
|
70
|
-
NOROTATE = 16,
|
|
71
|
-
NOVIEW = 32,
|
|
72
|
-
READONLY = 64,
|
|
73
|
-
LOCKED = 128,
|
|
74
|
-
TOGGLENOVIEW = 256,
|
|
75
|
-
LOCKEDCONTENTS = 512
|
|
76
|
-
}
|
|
77
|
-
export declare enum LicenseProduct {
|
|
78
|
-
Viewer = "viewer",
|
|
79
|
-
ViewerAndAnnotation = "viewer_and_annotation"
|
|
80
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { TextContent } from 'pdfjs-dist/types/src/display/text_layer';
|
|
2
|
-
import type { HighlightOptions, Match } from './types';
|
|
3
|
-
declare function isMatchEntireWord(content: string, startIdx: number, length: number): boolean;
|
|
4
|
-
declare function highlightMatches(matches: Match[], textContent: TextContent, textDivs: HTMLElement[]): void;
|
|
5
|
-
declare function resetDivs(textContent: TextContent, textDivs: HTMLElement[]): void;
|
|
6
|
-
declare function findMatches(queries: (string | RegExp)[], textContent: TextContent, pageIndex: number, options: HighlightOptions): Match[];
|
|
7
|
-
declare function getHighlightOptionsWithDefaults(options?: HighlightOptions): HighlightOptions;
|
|
8
|
-
export { findMatches, highlightMatches, resetDivs, getHighlightOptionsWithDefaults, isMatchEntireWord };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue';
|
|
2
|
-
import type { FlagKeyword, HighlightArea, HighlightMatchPosition, NormalizedKeyword, SingleKeyword } from './types';
|
|
3
|
-
export declare const normalizeFlagKeyword: (flagKeyword: FlagKeyword) => NormalizedKeyword;
|
|
4
|
-
export declare const normalizeSingleKeyword: (keyword: SingleKeyword, matchCase?: boolean, wholeWords?: boolean) => NormalizedKeyword;
|
|
5
|
-
export declare const sortHighlightPosition: (a: HighlightArea, b: HighlightArea) => 0 | 1 | -1;
|
|
6
|
-
export declare const getHighlightStyle: (area: HighlightArea) => CSSProperties;
|
|
7
|
-
export declare const unwrap: (ele: Node) => void;
|
|
8
|
-
export declare const getHighlightElement: (layerRef: HTMLElement, query: HighlightMatchPosition, selector?: string) => HTMLElement;
|
|
9
|
-
export declare const getHighlightElements: (layerRef: HTMLElement, querySelector: string) => Promise<NodeListOf<Element>>;
|
|
10
|
-
export declare function scrollHighlightIntoView(highlightEle: HTMLElement, pageContainer: HTMLElement, viewerContainer: HTMLElement): void;
|