UNPKG

pdf-annotator-react

Version:
18 lines (17 loc) 1.15 kB
import { Annotation, AnnotationMode, AnnotationRect, AnnotationType, Point, CategoryItem } from './types'; export declare const createAnnotation: (type: AnnotationType, rect: { x: number; y: number; width: number; height: number; pageIndex: number; }, content?: string, color?: string, category?: CategoryItem) => Annotation; export declare const getAnnotationColor: (type: AnnotationType, category?: CategoryItem, categoryColors?: Record<string, string>) => string; export declare const annotationModeToType: (mode: AnnotationMode) => AnnotationType; export declare const calculateRectFromPoints: (startPoint: Point, endPoint: Point, pageIndex: number) => AnnotationRect; export declare const pointsToSvgPath: (points: Point[]) => string; export declare const DEFAULT_CATEGORY_COLORS: Record<number, string>; export declare const getCategoryColor: (category?: CategoryItem | null) => string; export declare const getCategoryDisplayName: (category?: CategoryItem | null) => string; export declare const annotationsToJSON: (annotations: Annotation[]) => string; export declare const distance: (p1: Point, p2: Point) => number;