@embedpdf/plugin-annotation 2.2.0 → 2.3.0
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1196 -92
- package/dist/index.js.map +1 -1
- package/dist/lib/actions.d.ts +31 -2
- package/dist/lib/annotation-plugin.d.ts +177 -2
- package/dist/lib/handlers/types.d.ts +1 -1
- package/dist/lib/helpers.d.ts +6 -1
- package/dist/lib/selectors.d.ts +97 -8
- package/dist/lib/tools/default-tools.d.ts +39 -11
- package/dist/lib/tools/types.d.ts +7 -1
- package/dist/lib/types.d.ts +265 -1
- package/dist/preact/adapter.d.ts +3 -3
- package/dist/preact/index.cjs +1 -1
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.js +857 -403
- package/dist/preact/index.js.map +1 -1
- package/dist/react/adapter.d.ts +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +857 -403
- package/dist/react/index.js.map +1 -1
- package/dist/shared/components/annotation-container.d.ts +8 -1
- package/dist/shared/components/annotation-layer.d.ts +4 -2
- package/dist/shared/components/annotations/ink.d.ts +3 -3
- package/dist/shared/components/annotations/link.d.ts +28 -0
- package/dist/shared/components/annotations.d.ts +2 -1
- package/dist/shared/components/group-selection-box.d.ts +32 -0
- package/dist/shared/components/index.d.ts +1 -0
- package/dist/shared/components/text-markup/highlight.d.ts +3 -2
- package/dist/shared/components/text-markup/squiggly.d.ts +3 -2
- package/dist/shared/components/text-markup/strikeout.d.ts +3 -2
- package/dist/shared/components/text-markup/underline.d.ts +3 -2
- package/dist/shared/components/types.d.ts +7 -0
- package/dist/shared-preact/components/annotation-container.d.ts +8 -1
- package/dist/shared-preact/components/annotation-layer.d.ts +4 -2
- package/dist/shared-preact/components/annotations/ink.d.ts +3 -3
- package/dist/shared-preact/components/annotations/link.d.ts +28 -0
- package/dist/shared-preact/components/annotations.d.ts +2 -1
- package/dist/shared-preact/components/group-selection-box.d.ts +32 -0
- package/dist/shared-preact/components/index.d.ts +1 -0
- package/dist/shared-preact/components/text-markup/highlight.d.ts +3 -2
- package/dist/shared-preact/components/text-markup/squiggly.d.ts +3 -2
- package/dist/shared-preact/components/text-markup/strikeout.d.ts +3 -2
- package/dist/shared-preact/components/text-markup/underline.d.ts +3 -2
- package/dist/shared-preact/components/types.d.ts +7 -0
- package/dist/shared-react/components/annotation-container.d.ts +8 -1
- package/dist/shared-react/components/annotation-layer.d.ts +4 -2
- package/dist/shared-react/components/annotations/ink.d.ts +3 -3
- package/dist/shared-react/components/annotations/link.d.ts +28 -0
- package/dist/shared-react/components/annotations.d.ts +2 -1
- package/dist/shared-react/components/group-selection-box.d.ts +32 -0
- package/dist/shared-react/components/index.d.ts +1 -0
- package/dist/shared-react/components/text-markup/highlight.d.ts +3 -2
- package/dist/shared-react/components/text-markup/squiggly.d.ts +3 -2
- package/dist/shared-react/components/text-markup/strikeout.d.ts +3 -2
- package/dist/shared-react/components/text-markup/underline.d.ts +3 -2
- package/dist/shared-react/components/types.d.ts +7 -0
- package/dist/svelte/components/AnnotationLayer.svelte.d.ts +5 -1
- package/dist/svelte/components/Annotations.svelte.d.ts +5 -1
- package/dist/svelte/components/GroupSelectionBox.svelte.d.ts +32 -0
- package/dist/svelte/components/annotations/Ink.svelte.d.ts +2 -1
- package/dist/svelte/components/annotations/Link.svelte.d.ts +24 -0
- package/dist/svelte/components/annotations/index.d.ts +1 -0
- package/dist/svelte/components/index.d.ts +1 -0
- package/dist/svelte/components/text-markup/Highlight.svelte.d.ts +2 -1
- package/dist/svelte/components/text-markup/Squiggly.svelte.d.ts +2 -1
- package/dist/svelte/components/text-markup/Strikeout.svelte.d.ts +2 -1
- package/dist/svelte/components/text-markup/Underline.svelte.d.ts +2 -1
- package/dist/svelte/components/types.d.ts +2 -0
- package/dist/svelte/index.cjs +1 -1
- package/dist/svelte/index.cjs.map +1 -1
- package/dist/svelte/index.js +905 -255
- package/dist/svelte/index.js.map +1 -1
- package/dist/svelte/types.d.ts +7 -0
- package/dist/vue/components/annotation-container.vue.d.ts +2 -0
- package/dist/vue/components/annotation-layer.vue.d.ts +28 -5
- package/dist/vue/components/annotations/index.d.ts +1 -0
- package/dist/vue/components/annotations/ink.vue.d.ts +2 -2
- package/dist/vue/components/annotations/line.vue.d.ts +1 -1
- package/dist/vue/components/annotations/link.vue.d.ts +29 -0
- package/dist/vue/components/annotations/polygon.vue.d.ts +1 -1
- package/dist/vue/components/annotations/polyline.vue.d.ts +1 -1
- package/dist/vue/components/annotations.vue.d.ts +65 -1
- package/dist/vue/components/group-selection-box.vue.d.ts +73 -0
- package/dist/vue/components/index.d.ts +1 -0
- package/dist/vue/components/text-markup/highlight.vue.d.ts +2 -2
- package/dist/vue/components/text-markup/squiggly.vue.d.ts +2 -2
- package/dist/vue/components/text-markup/strikeout.vue.d.ts +2 -2
- package/dist/vue/components/text-markup/underline.vue.d.ts +2 -2
- package/dist/vue/hooks/use-annotation.d.ts +2 -0
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.js +946 -406
- package/dist/vue/index.js.map +1 -1
- package/dist/vue/types.d.ts +7 -0
- package/package.json +10 -10
|
@@ -13,6 +13,8 @@ interface AnnotationContainerProps<T extends PdfAnnotationObject> {
|
|
|
13
13
|
trackedAnnotation: TrackedAnnotation<T>;
|
|
14
14
|
children: JSX.Element | ((annotation: T) => JSX.Element);
|
|
15
15
|
isSelected: boolean;
|
|
16
|
+
/** Whether multiple annotations are selected (container becomes passive) */
|
|
17
|
+
isMultiSelected?: boolean;
|
|
16
18
|
isDraggable: boolean;
|
|
17
19
|
isResizable: boolean;
|
|
18
20
|
lockAspectRatio?: boolean;
|
|
@@ -28,5 +30,10 @@ interface AnnotationContainerProps<T extends PdfAnnotationObject> {
|
|
|
28
30
|
selectionOutlineColor?: string;
|
|
29
31
|
customAnnotationRenderer?: CustomAnnotationRenderer<T>;
|
|
30
32
|
}
|
|
31
|
-
|
|
33
|
+
/**
|
|
34
|
+
* AnnotationContainer wraps individual annotations with interaction handles.
|
|
35
|
+
* When isMultiSelected is true, the container becomes passive - drag/resize
|
|
36
|
+
* is handled by the GroupSelectionBox instead.
|
|
37
|
+
*/
|
|
38
|
+
export declare function AnnotationContainer<T extends PdfAnnotationObject>({ scale, documentId, pageIndex, rotation, pageWidth, pageHeight, trackedAnnotation, children, isSelected, isMultiSelected, isDraggable, isResizable, lockAspectRatio, style, vertexConfig, selectionMenu, outlineOffset, onDoubleClick, onSelect, zIndex, resizeUI, vertexUI, selectionOutlineColor, customAnnotationRenderer, ...props }: AnnotationContainerProps<T>): JSX.Element;
|
|
32
39
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, CSSProperties } from '../../react/adapter.ts';
|
|
2
|
-
import { ResizeHandleUI, VertexHandleUI, CustomAnnotationRenderer, AnnotationSelectionMenuRenderFn } from './types';
|
|
2
|
+
import { ResizeHandleUI, VertexHandleUI, CustomAnnotationRenderer, AnnotationSelectionMenuRenderFn, GroupSelectionMenuRenderFn } from './types';
|
|
3
3
|
import { PdfAnnotationObject } from '@embedpdf/models';
|
|
4
4
|
type AnnotationLayerProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
5
5
|
/** The ID of the document that this layer displays annotations for */
|
|
@@ -9,6 +9,8 @@ type AnnotationLayerProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
|
9
9
|
rotation?: number;
|
|
10
10
|
/** Customize selection menu across all annotations on this layer */
|
|
11
11
|
selectionMenu?: AnnotationSelectionMenuRenderFn;
|
|
12
|
+
/** Customize group selection menu across all annotations on this layer */
|
|
13
|
+
groupSelectionMenu?: GroupSelectionMenuRenderFn;
|
|
12
14
|
style?: CSSProperties;
|
|
13
15
|
/** Customize resize handles */
|
|
14
16
|
resizeUI?: ResizeHandleUI;
|
|
@@ -19,5 +21,5 @@ type AnnotationLayerProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
|
19
21
|
/** Customize annotation renderer */
|
|
20
22
|
customAnnotationRenderer?: CustomAnnotationRenderer<PdfAnnotationObject>;
|
|
21
23
|
};
|
|
22
|
-
export declare function AnnotationLayer({ style, documentId, pageIndex, scale: overrideScale, rotation: overrideRotation, selectionMenu, resizeUI, vertexUI, selectionOutlineColor, customAnnotationRenderer, ...props }: AnnotationLayerProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function AnnotationLayer({ style, documentId, pageIndex, scale: overrideScale, rotation: overrideRotation, selectionMenu, groupSelectionMenu, resizeUI, vertexUI, selectionOutlineColor, customAnnotationRenderer, ...props }: AnnotationLayerProps): import("react/jsx-runtime").JSX.Element;
|
|
23
25
|
export {};
|
|
@@ -3,8 +3,8 @@ import { PdfInkListObject, Rect } from '@embedpdf/models';
|
|
|
3
3
|
interface InkProps {
|
|
4
4
|
/** Whether the annotation is selected */
|
|
5
5
|
isSelected: boolean;
|
|
6
|
-
/** Stroke
|
|
7
|
-
|
|
6
|
+
/** Stroke color */
|
|
7
|
+
strokeColor?: string;
|
|
8
8
|
/** 0 – 1 */
|
|
9
9
|
opacity?: number;
|
|
10
10
|
/** Line width in PDF units */
|
|
@@ -21,5 +21,5 @@ interface InkProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* Renders a PDF Ink annotation (free-hand drawing) as SVG.
|
|
23
23
|
*/
|
|
24
|
-
export declare function Ink({ isSelected,
|
|
24
|
+
export declare function Ink({ isSelected, strokeColor, opacity, strokeWidth, inkList, rect, scale, onClick, }: InkProps): JSX.Element;
|
|
25
25
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { MouseEvent, TouchEvent } from '../../../react/adapter.ts';
|
|
2
|
+
import { PdfAnnotationBorderStyle, Rect } from '@embedpdf/models';
|
|
3
|
+
interface LinkProps {
|
|
4
|
+
/** Whether the annotation is selected */
|
|
5
|
+
isSelected: boolean;
|
|
6
|
+
/** Stroke colour – defaults to blue when omitted */
|
|
7
|
+
strokeColor?: string;
|
|
8
|
+
/** Stroke width in PDF units */
|
|
9
|
+
strokeWidth?: number;
|
|
10
|
+
/** Stroke type – defaults to underline when omitted */
|
|
11
|
+
strokeStyle?: PdfAnnotationBorderStyle;
|
|
12
|
+
/** Stroke dash array – for dashed style */
|
|
13
|
+
strokeDashArray?: number[];
|
|
14
|
+
/** Bounding box of the annotation (PDF units) */
|
|
15
|
+
rect: Rect;
|
|
16
|
+
/** Current page zoom factor */
|
|
17
|
+
scale: number;
|
|
18
|
+
/** Click handler (used for selection) */
|
|
19
|
+
onClick?: (e: MouseEvent<SVGElement> | TouchEvent<SVGElement>) => void;
|
|
20
|
+
/** Whether this link has an IRT (In Reply To) reference - disables direct interaction */
|
|
21
|
+
hasIRT?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Renders a PDF Link annotation as SVG.
|
|
25
|
+
* Supports underline (default), solid, and dashed border styles.
|
|
26
|
+
*/
|
|
27
|
+
export declare function Link({ isSelected, strokeColor, strokeWidth, strokeStyle, strokeDashArray, rect, scale, onClick, hasIRT, }: LinkProps): JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PdfAnnotationObject } from '@embedpdf/models';
|
|
2
|
-
import { CustomAnnotationRenderer, ResizeHandleUI, AnnotationSelectionMenuRenderFn, VertexHandleUI } from './types';
|
|
2
|
+
import { CustomAnnotationRenderer, ResizeHandleUI, AnnotationSelectionMenuRenderFn, GroupSelectionMenuRenderFn, VertexHandleUI } from './types';
|
|
3
3
|
interface AnnotationsProps {
|
|
4
4
|
documentId: string;
|
|
5
5
|
pageIndex: number;
|
|
@@ -8,6 +8,7 @@ interface AnnotationsProps {
|
|
|
8
8
|
pageWidth: number;
|
|
9
9
|
pageHeight: number;
|
|
10
10
|
selectionMenu?: AnnotationSelectionMenuRenderFn;
|
|
11
|
+
groupSelectionMenu?: GroupSelectionMenuRenderFn;
|
|
11
12
|
resizeUI?: ResizeHandleUI;
|
|
12
13
|
vertexUI?: VertexHandleUI;
|
|
13
14
|
selectionOutlineColor?: string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TrackedAnnotation } from '../../index.ts';
|
|
2
|
+
import { ResizeHandleUI, GroupSelectionMenuRenderFn } from './types';
|
|
3
|
+
interface GroupSelectionBoxProps {
|
|
4
|
+
documentId: string;
|
|
5
|
+
pageIndex: number;
|
|
6
|
+
scale: number;
|
|
7
|
+
rotation: number;
|
|
8
|
+
pageWidth: number;
|
|
9
|
+
pageHeight: number;
|
|
10
|
+
/** All selected annotations on this page */
|
|
11
|
+
selectedAnnotations: TrackedAnnotation[];
|
|
12
|
+
/** Whether the group is draggable (all annotations must be group-draggable) */
|
|
13
|
+
isDraggable: boolean;
|
|
14
|
+
/** Whether the group is resizable (all annotations must be group-resizable) */
|
|
15
|
+
isResizable: boolean;
|
|
16
|
+
/** Resize handle UI customization */
|
|
17
|
+
resizeUI?: ResizeHandleUI;
|
|
18
|
+
/** Selection outline color */
|
|
19
|
+
selectionOutlineColor?: string;
|
|
20
|
+
/** Outline offset */
|
|
21
|
+
outlineOffset?: number;
|
|
22
|
+
/** Z-index for the group box */
|
|
23
|
+
zIndex?: number;
|
|
24
|
+
/** Group selection menu render function */
|
|
25
|
+
groupSelectionMenu?: GroupSelectionMenuRenderFn;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* GroupSelectionBox renders a bounding box around all selected annotations
|
|
29
|
+
* with drag and resize handles for group manipulation.
|
|
30
|
+
*/
|
|
31
|
+
export declare function GroupSelectionBox({ documentId, pageIndex, scale, rotation, pageWidth, pageHeight, selectedAnnotations, isDraggable, isResizable, resizeUI, selectionOutlineColor, outlineOffset, zIndex, groupSelectionMenu, }: GroupSelectionBoxProps): JSX.Element | null;
|
|
32
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CSSProperties, MouseEvent, TouchEvent } from '../../../react/adapter.ts';
|
|
2
2
|
import { Rect } from '@embedpdf/models';
|
|
3
3
|
type HighlightProps = {
|
|
4
|
-
color
|
|
4
|
+
/** Stroke/markup color */
|
|
5
|
+
strokeColor?: string;
|
|
5
6
|
opacity?: number;
|
|
6
7
|
segmentRects: Rect[];
|
|
7
8
|
rect?: Rect;
|
|
@@ -9,5 +10,5 @@ type HighlightProps = {
|
|
|
9
10
|
onClick?: (e: MouseEvent<HTMLDivElement> | TouchEvent<HTMLDivElement>) => void;
|
|
10
11
|
style?: CSSProperties;
|
|
11
12
|
};
|
|
12
|
-
export declare function Highlight({
|
|
13
|
+
export declare function Highlight({ strokeColor, opacity, segmentRects, rect, scale, onClick, style, }: HighlightProps): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CSSProperties, MouseEvent, TouchEvent } from '../../../react/adapter.ts';
|
|
2
2
|
import { Rect } from '@embedpdf/models';
|
|
3
3
|
type SquigglyProps = {
|
|
4
|
-
color
|
|
4
|
+
/** Stroke/markup color */
|
|
5
|
+
strokeColor?: string;
|
|
5
6
|
opacity?: number;
|
|
6
7
|
segmentRects: Rect[];
|
|
7
8
|
rect?: Rect;
|
|
@@ -9,5 +10,5 @@ type SquigglyProps = {
|
|
|
9
10
|
onClick?: (e: MouseEvent<HTMLDivElement> | TouchEvent<HTMLDivElement>) => void;
|
|
10
11
|
style?: CSSProperties;
|
|
11
12
|
};
|
|
12
|
-
export declare function Squiggly({
|
|
13
|
+
export declare function Squiggly({ strokeColor, opacity, segmentRects, rect, scale, onClick, style, }: SquigglyProps): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CSSProperties, MouseEvent, TouchEvent } from '../../../react/adapter.ts';
|
|
2
2
|
import { Rect } from '@embedpdf/models';
|
|
3
3
|
type StrikeoutProps = {
|
|
4
|
-
color
|
|
4
|
+
/** Stroke/markup color */
|
|
5
|
+
strokeColor?: string;
|
|
5
6
|
opacity?: number;
|
|
6
7
|
segmentRects: Rect[];
|
|
7
8
|
rect?: Rect;
|
|
@@ -9,5 +10,5 @@ type StrikeoutProps = {
|
|
|
9
10
|
onClick?: (e: MouseEvent<HTMLDivElement> | TouchEvent<HTMLDivElement>) => void;
|
|
10
11
|
style?: CSSProperties;
|
|
11
12
|
};
|
|
12
|
-
export declare function Strikeout({
|
|
13
|
+
export declare function Strikeout({ strokeColor, opacity, segmentRects, rect, scale, onClick, style, }: StrikeoutProps): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CSSProperties, MouseEvent, TouchEvent } from '../../../react/adapter.ts';
|
|
2
2
|
import { Rect } from '@embedpdf/models';
|
|
3
3
|
type UnderlineProps = {
|
|
4
|
-
color
|
|
4
|
+
/** Stroke/markup color */
|
|
5
|
+
strokeColor?: string;
|
|
5
6
|
opacity?: number;
|
|
6
7
|
segmentRects: Rect[];
|
|
7
8
|
rect?: Rect;
|
|
@@ -9,5 +10,5 @@ type UnderlineProps = {
|
|
|
9
10
|
onClick?: (e: MouseEvent<HTMLDivElement> | TouchEvent<HTMLDivElement>) => void;
|
|
10
11
|
style?: CSSProperties;
|
|
11
12
|
};
|
|
12
|
-
export declare function Underline({
|
|
13
|
+
export declare function Underline({ strokeColor, opacity, segmentRects, rect, scale, onClick, style, }: UnderlineProps): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -10,6 +10,13 @@ export interface AnnotationSelectionContext {
|
|
|
10
10
|
}
|
|
11
11
|
export type AnnotationSelectionMenuProps = SelectionMenuPropsBase<AnnotationSelectionContext>;
|
|
12
12
|
export type AnnotationSelectionMenuRenderFn = SelectionMenuRenderFn<AnnotationSelectionContext>;
|
|
13
|
+
export interface GroupSelectionContext {
|
|
14
|
+
type: 'group';
|
|
15
|
+
annotations: TrackedAnnotation[];
|
|
16
|
+
pageIndex: number;
|
|
17
|
+
}
|
|
18
|
+
export type GroupSelectionMenuProps = SelectionMenuPropsBase<GroupSelectionContext>;
|
|
19
|
+
export type GroupSelectionMenuRenderFn = SelectionMenuRenderFn<GroupSelectionContext>;
|
|
13
20
|
export type HandleProps = HandleElementProps & {
|
|
14
21
|
backgroundColor?: string;
|
|
15
22
|
};
|
|
@@ -13,6 +13,8 @@ interface AnnotationContainerProps<T extends PdfAnnotationObject> {
|
|
|
13
13
|
trackedAnnotation: TrackedAnnotation<T>;
|
|
14
14
|
children: JSX.Element | ((annotation: T) => JSX.Element);
|
|
15
15
|
isSelected: boolean;
|
|
16
|
+
/** Whether multiple annotations are selected (container becomes passive) */
|
|
17
|
+
isMultiSelected?: boolean;
|
|
16
18
|
isDraggable: boolean;
|
|
17
19
|
isResizable: boolean;
|
|
18
20
|
lockAspectRatio?: boolean;
|
|
@@ -28,5 +30,10 @@ interface AnnotationContainerProps<T extends PdfAnnotationObject> {
|
|
|
28
30
|
selectionOutlineColor?: string;
|
|
29
31
|
customAnnotationRenderer?: CustomAnnotationRenderer<T>;
|
|
30
32
|
}
|
|
31
|
-
|
|
33
|
+
/**
|
|
34
|
+
* AnnotationContainer wraps individual annotations with interaction handles.
|
|
35
|
+
* When isMultiSelected is true, the container becomes passive - drag/resize
|
|
36
|
+
* is handled by the GroupSelectionBox instead.
|
|
37
|
+
*/
|
|
38
|
+
export declare function AnnotationContainer<T extends PdfAnnotationObject>({ scale, documentId, pageIndex, rotation, pageWidth, pageHeight, trackedAnnotation, children, isSelected, isMultiSelected, isDraggable, isResizable, lockAspectRatio, style, vertexConfig, selectionMenu, outlineOffset, onDoubleClick, onSelect, zIndex, resizeUI, vertexUI, selectionOutlineColor, customAnnotationRenderer, ...props }: AnnotationContainerProps<T>): JSX.Element;
|
|
32
39
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, CSSProperties } from '../../preact/adapter.ts';
|
|
2
|
-
import { ResizeHandleUI, VertexHandleUI, CustomAnnotationRenderer, AnnotationSelectionMenuRenderFn } from './types';
|
|
2
|
+
import { ResizeHandleUI, VertexHandleUI, CustomAnnotationRenderer, AnnotationSelectionMenuRenderFn, GroupSelectionMenuRenderFn } from './types';
|
|
3
3
|
import { PdfAnnotationObject } from '@embedpdf/models';
|
|
4
4
|
type AnnotationLayerProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
5
5
|
/** The ID of the document that this layer displays annotations for */
|
|
@@ -9,6 +9,8 @@ type AnnotationLayerProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
|
9
9
|
rotation?: number;
|
|
10
10
|
/** Customize selection menu across all annotations on this layer */
|
|
11
11
|
selectionMenu?: AnnotationSelectionMenuRenderFn;
|
|
12
|
+
/** Customize group selection menu across all annotations on this layer */
|
|
13
|
+
groupSelectionMenu?: GroupSelectionMenuRenderFn;
|
|
12
14
|
style?: CSSProperties;
|
|
13
15
|
/** Customize resize handles */
|
|
14
16
|
resizeUI?: ResizeHandleUI;
|
|
@@ -19,5 +21,5 @@ type AnnotationLayerProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
|
19
21
|
/** Customize annotation renderer */
|
|
20
22
|
customAnnotationRenderer?: CustomAnnotationRenderer<PdfAnnotationObject>;
|
|
21
23
|
};
|
|
22
|
-
export declare function AnnotationLayer({ style, documentId, pageIndex, scale: overrideScale, rotation: overrideRotation, selectionMenu, resizeUI, vertexUI, selectionOutlineColor, customAnnotationRenderer, ...props }: AnnotationLayerProps): import("preact").JSX.Element;
|
|
24
|
+
export declare function AnnotationLayer({ style, documentId, pageIndex, scale: overrideScale, rotation: overrideRotation, selectionMenu, groupSelectionMenu, resizeUI, vertexUI, selectionOutlineColor, customAnnotationRenderer, ...props }: AnnotationLayerProps): import("preact").JSX.Element;
|
|
23
25
|
export {};
|
|
@@ -3,8 +3,8 @@ import { PdfInkListObject, Rect } from '@embedpdf/models';
|
|
|
3
3
|
interface InkProps {
|
|
4
4
|
/** Whether the annotation is selected */
|
|
5
5
|
isSelected: boolean;
|
|
6
|
-
/** Stroke
|
|
7
|
-
|
|
6
|
+
/** Stroke color */
|
|
7
|
+
strokeColor?: string;
|
|
8
8
|
/** 0 – 1 */
|
|
9
9
|
opacity?: number;
|
|
10
10
|
/** Line width in PDF units */
|
|
@@ -21,5 +21,5 @@ interface InkProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* Renders a PDF Ink annotation (free-hand drawing) as SVG.
|
|
23
23
|
*/
|
|
24
|
-
export declare function Ink({ isSelected,
|
|
24
|
+
export declare function Ink({ isSelected, strokeColor, opacity, strokeWidth, inkList, rect, scale, onClick, }: InkProps): JSX.Element;
|
|
25
25
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { MouseEvent, TouchEvent } from '../../../preact/adapter.ts';
|
|
2
|
+
import { PdfAnnotationBorderStyle, Rect } from '@embedpdf/models';
|
|
3
|
+
interface LinkProps {
|
|
4
|
+
/** Whether the annotation is selected */
|
|
5
|
+
isSelected: boolean;
|
|
6
|
+
/** Stroke colour – defaults to blue when omitted */
|
|
7
|
+
strokeColor?: string;
|
|
8
|
+
/** Stroke width in PDF units */
|
|
9
|
+
strokeWidth?: number;
|
|
10
|
+
/** Stroke type – defaults to underline when omitted */
|
|
11
|
+
strokeStyle?: PdfAnnotationBorderStyle;
|
|
12
|
+
/** Stroke dash array – for dashed style */
|
|
13
|
+
strokeDashArray?: number[];
|
|
14
|
+
/** Bounding box of the annotation (PDF units) */
|
|
15
|
+
rect: Rect;
|
|
16
|
+
/** Current page zoom factor */
|
|
17
|
+
scale: number;
|
|
18
|
+
/** Click handler (used for selection) */
|
|
19
|
+
onClick?: (e: MouseEvent<SVGElement> | TouchEvent<SVGElement>) => void;
|
|
20
|
+
/** Whether this link has an IRT (In Reply To) reference - disables direct interaction */
|
|
21
|
+
hasIRT?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Renders a PDF Link annotation as SVG.
|
|
25
|
+
* Supports underline (default), solid, and dashed border styles.
|
|
26
|
+
*/
|
|
27
|
+
export declare function Link({ isSelected, strokeColor, strokeWidth, strokeStyle, strokeDashArray, rect, scale, onClick, hasIRT, }: LinkProps): JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PdfAnnotationObject } from '@embedpdf/models';
|
|
2
|
-
import { CustomAnnotationRenderer, ResizeHandleUI, AnnotationSelectionMenuRenderFn, VertexHandleUI } from './types';
|
|
2
|
+
import { CustomAnnotationRenderer, ResizeHandleUI, AnnotationSelectionMenuRenderFn, GroupSelectionMenuRenderFn, VertexHandleUI } from './types';
|
|
3
3
|
interface AnnotationsProps {
|
|
4
4
|
documentId: string;
|
|
5
5
|
pageIndex: number;
|
|
@@ -8,6 +8,7 @@ interface AnnotationsProps {
|
|
|
8
8
|
pageWidth: number;
|
|
9
9
|
pageHeight: number;
|
|
10
10
|
selectionMenu?: AnnotationSelectionMenuRenderFn;
|
|
11
|
+
groupSelectionMenu?: GroupSelectionMenuRenderFn;
|
|
11
12
|
resizeUI?: ResizeHandleUI;
|
|
12
13
|
vertexUI?: VertexHandleUI;
|
|
13
14
|
selectionOutlineColor?: string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TrackedAnnotation } from '../../lib/index.ts';
|
|
2
|
+
import { ResizeHandleUI, GroupSelectionMenuRenderFn } from './types';
|
|
3
|
+
interface GroupSelectionBoxProps {
|
|
4
|
+
documentId: string;
|
|
5
|
+
pageIndex: number;
|
|
6
|
+
scale: number;
|
|
7
|
+
rotation: number;
|
|
8
|
+
pageWidth: number;
|
|
9
|
+
pageHeight: number;
|
|
10
|
+
/** All selected annotations on this page */
|
|
11
|
+
selectedAnnotations: TrackedAnnotation[];
|
|
12
|
+
/** Whether the group is draggable (all annotations must be group-draggable) */
|
|
13
|
+
isDraggable: boolean;
|
|
14
|
+
/** Whether the group is resizable (all annotations must be group-resizable) */
|
|
15
|
+
isResizable: boolean;
|
|
16
|
+
/** Resize handle UI customization */
|
|
17
|
+
resizeUI?: ResizeHandleUI;
|
|
18
|
+
/** Selection outline color */
|
|
19
|
+
selectionOutlineColor?: string;
|
|
20
|
+
/** Outline offset */
|
|
21
|
+
outlineOffset?: number;
|
|
22
|
+
/** Z-index for the group box */
|
|
23
|
+
zIndex?: number;
|
|
24
|
+
/** Group selection menu render function */
|
|
25
|
+
groupSelectionMenu?: GroupSelectionMenuRenderFn;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* GroupSelectionBox renders a bounding box around all selected annotations
|
|
29
|
+
* with drag and resize handles for group manipulation.
|
|
30
|
+
*/
|
|
31
|
+
export declare function GroupSelectionBox({ documentId, pageIndex, scale, rotation, pageWidth, pageHeight, selectedAnnotations, isDraggable, isResizable, resizeUI, selectionOutlineColor, outlineOffset, zIndex, groupSelectionMenu, }: GroupSelectionBoxProps): JSX.Element | null;
|
|
32
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CSSProperties, MouseEvent, TouchEvent } from '../../../preact/adapter.ts';
|
|
2
2
|
import { Rect } from '@embedpdf/models';
|
|
3
3
|
type HighlightProps = {
|
|
4
|
-
color
|
|
4
|
+
/** Stroke/markup color */
|
|
5
|
+
strokeColor?: string;
|
|
5
6
|
opacity?: number;
|
|
6
7
|
segmentRects: Rect[];
|
|
7
8
|
rect?: Rect;
|
|
@@ -9,5 +10,5 @@ type HighlightProps = {
|
|
|
9
10
|
onClick?: (e: MouseEvent<HTMLDivElement> | TouchEvent<HTMLDivElement>) => void;
|
|
10
11
|
style?: CSSProperties;
|
|
11
12
|
};
|
|
12
|
-
export declare function Highlight({
|
|
13
|
+
export declare function Highlight({ strokeColor, opacity, segmentRects, rect, scale, onClick, style, }: HighlightProps): import("preact").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CSSProperties, MouseEvent, TouchEvent } from '../../../preact/adapter.ts';
|
|
2
2
|
import { Rect } from '@embedpdf/models';
|
|
3
3
|
type SquigglyProps = {
|
|
4
|
-
color
|
|
4
|
+
/** Stroke/markup color */
|
|
5
|
+
strokeColor?: string;
|
|
5
6
|
opacity?: number;
|
|
6
7
|
segmentRects: Rect[];
|
|
7
8
|
rect?: Rect;
|
|
@@ -9,5 +10,5 @@ type SquigglyProps = {
|
|
|
9
10
|
onClick?: (e: MouseEvent<HTMLDivElement> | TouchEvent<HTMLDivElement>) => void;
|
|
10
11
|
style?: CSSProperties;
|
|
11
12
|
};
|
|
12
|
-
export declare function Squiggly({
|
|
13
|
+
export declare function Squiggly({ strokeColor, opacity, segmentRects, rect, scale, onClick, style, }: SquigglyProps): import("preact").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CSSProperties, MouseEvent, TouchEvent } from '../../../preact/adapter.ts';
|
|
2
2
|
import { Rect } from '@embedpdf/models';
|
|
3
3
|
type StrikeoutProps = {
|
|
4
|
-
color
|
|
4
|
+
/** Stroke/markup color */
|
|
5
|
+
strokeColor?: string;
|
|
5
6
|
opacity?: number;
|
|
6
7
|
segmentRects: Rect[];
|
|
7
8
|
rect?: Rect;
|
|
@@ -9,5 +10,5 @@ type StrikeoutProps = {
|
|
|
9
10
|
onClick?: (e: MouseEvent<HTMLDivElement> | TouchEvent<HTMLDivElement>) => void;
|
|
10
11
|
style?: CSSProperties;
|
|
11
12
|
};
|
|
12
|
-
export declare function Strikeout({
|
|
13
|
+
export declare function Strikeout({ strokeColor, opacity, segmentRects, rect, scale, onClick, style, }: StrikeoutProps): import("preact").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CSSProperties, MouseEvent, TouchEvent } from '../../../preact/adapter.ts';
|
|
2
2
|
import { Rect } from '@embedpdf/models';
|
|
3
3
|
type UnderlineProps = {
|
|
4
|
-
color
|
|
4
|
+
/** Stroke/markup color */
|
|
5
|
+
strokeColor?: string;
|
|
5
6
|
opacity?: number;
|
|
6
7
|
segmentRects: Rect[];
|
|
7
8
|
rect?: Rect;
|
|
@@ -9,5 +10,5 @@ type UnderlineProps = {
|
|
|
9
10
|
onClick?: (e: MouseEvent<HTMLDivElement> | TouchEvent<HTMLDivElement>) => void;
|
|
10
11
|
style?: CSSProperties;
|
|
11
12
|
};
|
|
12
|
-
export declare function Underline({
|
|
13
|
+
export declare function Underline({ strokeColor, opacity, segmentRects, rect, scale, onClick, style, }: UnderlineProps): import("preact").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -10,6 +10,13 @@ export interface AnnotationSelectionContext {
|
|
|
10
10
|
}
|
|
11
11
|
export type AnnotationSelectionMenuProps = SelectionMenuPropsBase<AnnotationSelectionContext>;
|
|
12
12
|
export type AnnotationSelectionMenuRenderFn = SelectionMenuRenderFn<AnnotationSelectionContext>;
|
|
13
|
+
export interface GroupSelectionContext {
|
|
14
|
+
type: 'group';
|
|
15
|
+
annotations: TrackedAnnotation[];
|
|
16
|
+
pageIndex: number;
|
|
17
|
+
}
|
|
18
|
+
export type GroupSelectionMenuProps = SelectionMenuPropsBase<GroupSelectionContext>;
|
|
19
|
+
export type GroupSelectionMenuRenderFn = SelectionMenuRenderFn<GroupSelectionContext>;
|
|
13
20
|
export type HandleProps = HandleElementProps & {
|
|
14
21
|
backgroundColor?: string;
|
|
15
22
|
};
|
|
@@ -13,6 +13,8 @@ interface AnnotationContainerProps<T extends PdfAnnotationObject> {
|
|
|
13
13
|
trackedAnnotation: TrackedAnnotation<T>;
|
|
14
14
|
children: JSX.Element | ((annotation: T) => JSX.Element);
|
|
15
15
|
isSelected: boolean;
|
|
16
|
+
/** Whether multiple annotations are selected (container becomes passive) */
|
|
17
|
+
isMultiSelected?: boolean;
|
|
16
18
|
isDraggable: boolean;
|
|
17
19
|
isResizable: boolean;
|
|
18
20
|
lockAspectRatio?: boolean;
|
|
@@ -28,5 +30,10 @@ interface AnnotationContainerProps<T extends PdfAnnotationObject> {
|
|
|
28
30
|
selectionOutlineColor?: string;
|
|
29
31
|
customAnnotationRenderer?: CustomAnnotationRenderer<T>;
|
|
30
32
|
}
|
|
31
|
-
|
|
33
|
+
/**
|
|
34
|
+
* AnnotationContainer wraps individual annotations with interaction handles.
|
|
35
|
+
* When isMultiSelected is true, the container becomes passive - drag/resize
|
|
36
|
+
* is handled by the GroupSelectionBox instead.
|
|
37
|
+
*/
|
|
38
|
+
export declare function AnnotationContainer<T extends PdfAnnotationObject>({ scale, documentId, pageIndex, rotation, pageWidth, pageHeight, trackedAnnotation, children, isSelected, isMultiSelected, isDraggable, isResizable, lockAspectRatio, style, vertexConfig, selectionMenu, outlineOffset, onDoubleClick, onSelect, zIndex, resizeUI, vertexUI, selectionOutlineColor, customAnnotationRenderer, ...props }: AnnotationContainerProps<T>): JSX.Element;
|
|
32
39
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, CSSProperties } from '../../react/adapter.ts';
|
|
2
|
-
import { ResizeHandleUI, VertexHandleUI, CustomAnnotationRenderer, AnnotationSelectionMenuRenderFn } from './types';
|
|
2
|
+
import { ResizeHandleUI, VertexHandleUI, CustomAnnotationRenderer, AnnotationSelectionMenuRenderFn, GroupSelectionMenuRenderFn } from './types';
|
|
3
3
|
import { PdfAnnotationObject } from '@embedpdf/models';
|
|
4
4
|
type AnnotationLayerProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
5
5
|
/** The ID of the document that this layer displays annotations for */
|
|
@@ -9,6 +9,8 @@ type AnnotationLayerProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
|
9
9
|
rotation?: number;
|
|
10
10
|
/** Customize selection menu across all annotations on this layer */
|
|
11
11
|
selectionMenu?: AnnotationSelectionMenuRenderFn;
|
|
12
|
+
/** Customize group selection menu across all annotations on this layer */
|
|
13
|
+
groupSelectionMenu?: GroupSelectionMenuRenderFn;
|
|
12
14
|
style?: CSSProperties;
|
|
13
15
|
/** Customize resize handles */
|
|
14
16
|
resizeUI?: ResizeHandleUI;
|
|
@@ -19,5 +21,5 @@ type AnnotationLayerProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
|
19
21
|
/** Customize annotation renderer */
|
|
20
22
|
customAnnotationRenderer?: CustomAnnotationRenderer<PdfAnnotationObject>;
|
|
21
23
|
};
|
|
22
|
-
export declare function AnnotationLayer({ style, documentId, pageIndex, scale: overrideScale, rotation: overrideRotation, selectionMenu, resizeUI, vertexUI, selectionOutlineColor, customAnnotationRenderer, ...props }: AnnotationLayerProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function AnnotationLayer({ style, documentId, pageIndex, scale: overrideScale, rotation: overrideRotation, selectionMenu, groupSelectionMenu, resizeUI, vertexUI, selectionOutlineColor, customAnnotationRenderer, ...props }: AnnotationLayerProps): import("react/jsx-runtime").JSX.Element;
|
|
23
25
|
export {};
|
|
@@ -3,8 +3,8 @@ import { PdfInkListObject, Rect } from '@embedpdf/models';
|
|
|
3
3
|
interface InkProps {
|
|
4
4
|
/** Whether the annotation is selected */
|
|
5
5
|
isSelected: boolean;
|
|
6
|
-
/** Stroke
|
|
7
|
-
|
|
6
|
+
/** Stroke color */
|
|
7
|
+
strokeColor?: string;
|
|
8
8
|
/** 0 – 1 */
|
|
9
9
|
opacity?: number;
|
|
10
10
|
/** Line width in PDF units */
|
|
@@ -21,5 +21,5 @@ interface InkProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* Renders a PDF Ink annotation (free-hand drawing) as SVG.
|
|
23
23
|
*/
|
|
24
|
-
export declare function Ink({ isSelected,
|
|
24
|
+
export declare function Ink({ isSelected, strokeColor, opacity, strokeWidth, inkList, rect, scale, onClick, }: InkProps): JSX.Element;
|
|
25
25
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { MouseEvent, TouchEvent } from '../../../react/adapter.ts';
|
|
2
|
+
import { PdfAnnotationBorderStyle, Rect } from '@embedpdf/models';
|
|
3
|
+
interface LinkProps {
|
|
4
|
+
/** Whether the annotation is selected */
|
|
5
|
+
isSelected: boolean;
|
|
6
|
+
/** Stroke colour – defaults to blue when omitted */
|
|
7
|
+
strokeColor?: string;
|
|
8
|
+
/** Stroke width in PDF units */
|
|
9
|
+
strokeWidth?: number;
|
|
10
|
+
/** Stroke type – defaults to underline when omitted */
|
|
11
|
+
strokeStyle?: PdfAnnotationBorderStyle;
|
|
12
|
+
/** Stroke dash array – for dashed style */
|
|
13
|
+
strokeDashArray?: number[];
|
|
14
|
+
/** Bounding box of the annotation (PDF units) */
|
|
15
|
+
rect: Rect;
|
|
16
|
+
/** Current page zoom factor */
|
|
17
|
+
scale: number;
|
|
18
|
+
/** Click handler (used for selection) */
|
|
19
|
+
onClick?: (e: MouseEvent<SVGElement> | TouchEvent<SVGElement>) => void;
|
|
20
|
+
/** Whether this link has an IRT (In Reply To) reference - disables direct interaction */
|
|
21
|
+
hasIRT?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Renders a PDF Link annotation as SVG.
|
|
25
|
+
* Supports underline (default), solid, and dashed border styles.
|
|
26
|
+
*/
|
|
27
|
+
export declare function Link({ isSelected, strokeColor, strokeWidth, strokeStyle, strokeDashArray, rect, scale, onClick, hasIRT, }: LinkProps): JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PdfAnnotationObject } from '@embedpdf/models';
|
|
2
|
-
import { CustomAnnotationRenderer, ResizeHandleUI, AnnotationSelectionMenuRenderFn, VertexHandleUI } from './types';
|
|
2
|
+
import { CustomAnnotationRenderer, ResizeHandleUI, AnnotationSelectionMenuRenderFn, GroupSelectionMenuRenderFn, VertexHandleUI } from './types';
|
|
3
3
|
interface AnnotationsProps {
|
|
4
4
|
documentId: string;
|
|
5
5
|
pageIndex: number;
|
|
@@ -8,6 +8,7 @@ interface AnnotationsProps {
|
|
|
8
8
|
pageWidth: number;
|
|
9
9
|
pageHeight: number;
|
|
10
10
|
selectionMenu?: AnnotationSelectionMenuRenderFn;
|
|
11
|
+
groupSelectionMenu?: GroupSelectionMenuRenderFn;
|
|
11
12
|
resizeUI?: ResizeHandleUI;
|
|
12
13
|
vertexUI?: VertexHandleUI;
|
|
13
14
|
selectionOutlineColor?: string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TrackedAnnotation } from '../../lib/index.ts';
|
|
2
|
+
import { ResizeHandleUI, GroupSelectionMenuRenderFn } from './types';
|
|
3
|
+
interface GroupSelectionBoxProps {
|
|
4
|
+
documentId: string;
|
|
5
|
+
pageIndex: number;
|
|
6
|
+
scale: number;
|
|
7
|
+
rotation: number;
|
|
8
|
+
pageWidth: number;
|
|
9
|
+
pageHeight: number;
|
|
10
|
+
/** All selected annotations on this page */
|
|
11
|
+
selectedAnnotations: TrackedAnnotation[];
|
|
12
|
+
/** Whether the group is draggable (all annotations must be group-draggable) */
|
|
13
|
+
isDraggable: boolean;
|
|
14
|
+
/** Whether the group is resizable (all annotations must be group-resizable) */
|
|
15
|
+
isResizable: boolean;
|
|
16
|
+
/** Resize handle UI customization */
|
|
17
|
+
resizeUI?: ResizeHandleUI;
|
|
18
|
+
/** Selection outline color */
|
|
19
|
+
selectionOutlineColor?: string;
|
|
20
|
+
/** Outline offset */
|
|
21
|
+
outlineOffset?: number;
|
|
22
|
+
/** Z-index for the group box */
|
|
23
|
+
zIndex?: number;
|
|
24
|
+
/** Group selection menu render function */
|
|
25
|
+
groupSelectionMenu?: GroupSelectionMenuRenderFn;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* GroupSelectionBox renders a bounding box around all selected annotations
|
|
29
|
+
* with drag and resize handles for group manipulation.
|
|
30
|
+
*/
|
|
31
|
+
export declare function GroupSelectionBox({ documentId, pageIndex, scale, rotation, pageWidth, pageHeight, selectedAnnotations, isDraggable, isResizable, resizeUI, selectionOutlineColor, outlineOffset, zIndex, groupSelectionMenu, }: GroupSelectionBoxProps): JSX.Element | null;
|
|
32
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CSSProperties, MouseEvent, TouchEvent } from '../../../react/adapter.ts';
|
|
2
2
|
import { Rect } from '@embedpdf/models';
|
|
3
3
|
type HighlightProps = {
|
|
4
|
-
color
|
|
4
|
+
/** Stroke/markup color */
|
|
5
|
+
strokeColor?: string;
|
|
5
6
|
opacity?: number;
|
|
6
7
|
segmentRects: Rect[];
|
|
7
8
|
rect?: Rect;
|
|
@@ -9,5 +10,5 @@ type HighlightProps = {
|
|
|
9
10
|
onClick?: (e: MouseEvent<HTMLDivElement> | TouchEvent<HTMLDivElement>) => void;
|
|
10
11
|
style?: CSSProperties;
|
|
11
12
|
};
|
|
12
|
-
export declare function Highlight({
|
|
13
|
+
export declare function Highlight({ strokeColor, opacity, segmentRects, rect, scale, onClick, style, }: HighlightProps): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|