@embedpdf/plugin-annotation 2.1.2 → 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 +1232 -93
- 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 +867 -406
- 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 +867 -406
- 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 +912 -258
- 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 +962 -409
- package/dist/vue/index.js.map +1 -1
- package/dist/vue/types.d.ts +7 -0
- package/package.json +10 -10
package/dist/svelte/types.d.ts
CHANGED
|
@@ -8,8 +8,15 @@ export interface AnnotationSelectionContext {
|
|
|
8
8
|
annotation: TrackedAnnotation;
|
|
9
9
|
pageIndex: number;
|
|
10
10
|
}
|
|
11
|
+
export interface GroupSelectionContext {
|
|
12
|
+
type: 'group';
|
|
13
|
+
annotations: TrackedAnnotation[];
|
|
14
|
+
pageIndex: number;
|
|
15
|
+
}
|
|
11
16
|
export type AnnotationSelectionMenuProps = SelectionMenuPropsBase<AnnotationSelectionContext>;
|
|
12
17
|
export type AnnotationSelectionMenuRenderFn = SelectionMenuRenderFn<AnnotationSelectionContext>;
|
|
18
|
+
export type GroupSelectionMenuProps = SelectionMenuPropsBase<GroupSelectionContext>;
|
|
19
|
+
export type GroupSelectionMenuRenderFn = SelectionMenuRenderFn<GroupSelectionContext>;
|
|
13
20
|
export interface HandleProps {
|
|
14
21
|
backgroundColor?: string;
|
|
15
22
|
[key: string]: any;
|
|
@@ -15,6 +15,8 @@ declare const __VLS_export: <T extends PdfAnnotationObject>(__VLS_props: NonNull
|
|
|
15
15
|
pageHeight: number;
|
|
16
16
|
trackedAnnotation: TrackedAnnotation<T>;
|
|
17
17
|
isSelected: boolean;
|
|
18
|
+
/** Whether multiple annotations are selected (container becomes passive) */
|
|
19
|
+
isMultiSelected?: boolean;
|
|
18
20
|
isDraggable: boolean;
|
|
19
21
|
isResizable: boolean;
|
|
20
22
|
lockAspectRatio?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnnotationSelectionMenuRenderFn, ResizeHandleUI, VertexHandleUI } from '../types';
|
|
1
|
+
import { AnnotationSelectionMenuRenderFn, GroupSelectionMenuRenderFn, ResizeHandleUI, VertexHandleUI } from '../types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
/** The ID of the document that this layer displays annotations for */
|
|
4
4
|
documentId: string;
|
|
@@ -13,6 +13,8 @@ type __VLS_Props = {
|
|
|
13
13
|
selectionOutlineColor?: string;
|
|
14
14
|
/** Customize selection menu */
|
|
15
15
|
selectionMenu?: AnnotationSelectionMenuRenderFn;
|
|
16
|
+
/** Customize group selection menu */
|
|
17
|
+
groupSelectionMenu?: GroupSelectionMenuRenderFn;
|
|
16
18
|
};
|
|
17
19
|
declare var __VLS_8: {
|
|
18
20
|
context: import('..').AnnotationSelectionContext;
|
|
@@ -34,14 +36,33 @@ declare var __VLS_8: {
|
|
|
34
36
|
onTouchstart: (e: TouchEvent) => void;
|
|
35
37
|
};
|
|
36
38
|
}, __VLS_11: {
|
|
37
|
-
|
|
39
|
+
context: import('..').GroupSelectionContext;
|
|
40
|
+
selected: boolean;
|
|
41
|
+
rect: {
|
|
42
|
+
origin: {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
};
|
|
46
|
+
size: {
|
|
47
|
+
width: number;
|
|
48
|
+
height: number;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
placement: import('@embedpdf/utils/vue').SelectionMenuPlacement;
|
|
52
|
+
menuWrapperProps: {
|
|
53
|
+
style: import('vue').CSSProperties;
|
|
54
|
+
onPointerdown: (e: PointerEvent) => void;
|
|
55
|
+
onTouchstart: (e: TouchEvent) => void;
|
|
56
|
+
};
|
|
57
|
+
}, __VLS_14: {
|
|
58
|
+
backgroundColor: string;
|
|
38
59
|
onPointerdown: (e: PointerEvent) => void;
|
|
39
60
|
onPointermove: (e: PointerEvent) => void;
|
|
40
61
|
onPointerup: (e: PointerEvent) => void;
|
|
41
62
|
onPointercancel: (e: PointerEvent) => void;
|
|
42
63
|
key: string | number;
|
|
43
64
|
style: import('vue').CSSProperties;
|
|
44
|
-
},
|
|
65
|
+
}, __VLS_17: {
|
|
45
66
|
backgroundColor: "#007ACC";
|
|
46
67
|
onPointerdown: (e: PointerEvent) => void;
|
|
47
68
|
onPointermove: (e: PointerEvent) => void;
|
|
@@ -53,9 +74,11 @@ declare var __VLS_8: {
|
|
|
53
74
|
type __VLS_Slots = {} & {
|
|
54
75
|
'selection-menu'?: (props: typeof __VLS_8) => any;
|
|
55
76
|
} & {
|
|
56
|
-
'
|
|
77
|
+
'group-selection-menu'?: (props: typeof __VLS_11) => any;
|
|
78
|
+
} & {
|
|
79
|
+
'resize-handle'?: (props: typeof __VLS_14) => any;
|
|
57
80
|
} & {
|
|
58
|
-
'vertex-handle'?: (props: typeof
|
|
81
|
+
'vertex-handle'?: (props: typeof __VLS_17) => any;
|
|
59
82
|
};
|
|
60
83
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
61
84
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -2,6 +2,7 @@ export { default as Circle } from './circle.vue';
|
|
|
2
2
|
export { default as FreeText } from './free-text.vue';
|
|
3
3
|
export { default as Ink } from './ink.vue';
|
|
4
4
|
export { default as Line } from './line.vue';
|
|
5
|
+
export { default as Link } from './link.vue';
|
|
5
6
|
export { default as Polygon } from './polygon.vue';
|
|
6
7
|
export { default as Polyline } from './polyline.vue';
|
|
7
8
|
export { default as Square } from './square.vue';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PdfInkListObject, Rect } from '@embedpdf/models';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
isSelected: boolean;
|
|
4
|
-
color
|
|
4
|
+
/** Stroke color */
|
|
5
|
+
strokeColor?: string;
|
|
5
6
|
opacity?: number;
|
|
6
7
|
strokeWidth: number;
|
|
7
8
|
inkList: PdfInkListObject[];
|
|
@@ -10,7 +11,6 @@ type __VLS_Props = {
|
|
|
10
11
|
onClick?: (e: PointerEvent | TouchEvent) => void;
|
|
11
12
|
};
|
|
12
13
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
13
|
-
color: string;
|
|
14
14
|
opacity: number;
|
|
15
15
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
@@ -14,9 +14,9 @@ type __VLS_Props = {
|
|
|
14
14
|
isSelected: boolean;
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
17
|
+
strokeColor: string;
|
|
17
18
|
color: string;
|
|
18
19
|
opacity: number;
|
|
19
|
-
strokeColor: string;
|
|
20
20
|
strokeStyle: PdfAnnotationBorderStyle;
|
|
21
21
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PdfAnnotationBorderStyle, Rect } from '@embedpdf/models';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Whether the annotation is selected */
|
|
4
|
+
isSelected: boolean;
|
|
5
|
+
/** Stroke colour – defaults to blue when omitted */
|
|
6
|
+
strokeColor?: string;
|
|
7
|
+
/** Stroke width in PDF units */
|
|
8
|
+
strokeWidth?: number;
|
|
9
|
+
/** Stroke type – defaults to underline when omitted */
|
|
10
|
+
strokeStyle?: PdfAnnotationBorderStyle;
|
|
11
|
+
/** Stroke dash array – for dashed style */
|
|
12
|
+
strokeDashArray?: number[];
|
|
13
|
+
/** Bounding box of the annotation (PDF units) */
|
|
14
|
+
rect: Rect;
|
|
15
|
+
/** Current page zoom factor */
|
|
16
|
+
scale: number;
|
|
17
|
+
/** Click handler (used for selection) */
|
|
18
|
+
onClick?: (e: MouseEvent | TouchEvent) => void;
|
|
19
|
+
/** Whether this link has an IRT (In Reply To) reference - disables direct interaction */
|
|
20
|
+
hasIRT?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
23
|
+
strokeColor: string;
|
|
24
|
+
strokeWidth: number;
|
|
25
|
+
strokeStyle: PdfAnnotationBorderStyle;
|
|
26
|
+
hasIRT: boolean;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
@@ -15,9 +15,9 @@ type __VLS_Props = {
|
|
|
15
15
|
handleSize?: number;
|
|
16
16
|
};
|
|
17
17
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
strokeColor: string;
|
|
18
19
|
color: string;
|
|
19
20
|
opacity: number;
|
|
20
|
-
strokeColor: string;
|
|
21
21
|
strokeStyle: PdfAnnotationBorderStyle;
|
|
22
22
|
handleSize: number;
|
|
23
23
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -12,9 +12,9 @@ type __VLS_Props = {
|
|
|
12
12
|
lineEndings?: LineEndings;
|
|
13
13
|
};
|
|
14
14
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
strokeColor: string;
|
|
15
16
|
color: string;
|
|
16
17
|
opacity: number;
|
|
17
|
-
strokeColor: string;
|
|
18
18
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
declare const _default: typeof __VLS_export;
|
|
20
20
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnnotationSelectionMenuRenderFn, ResizeHandleUI, VertexHandleUI } from '../types';
|
|
1
|
+
import { AnnotationSelectionMenuRenderFn, GroupSelectionMenuRenderFn, ResizeHandleUI, VertexHandleUI } from '../types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
documentId: string;
|
|
4
4
|
pageIndex: number;
|
|
@@ -11,6 +11,8 @@ type __VLS_Props = {
|
|
|
11
11
|
selectionOutlineColor?: string;
|
|
12
12
|
/** Render function for selection menu (schema-driven approach) */
|
|
13
13
|
selectionMenu?: AnnotationSelectionMenuRenderFn;
|
|
14
|
+
/** Render function for group selection menu (schema-driven approach) */
|
|
15
|
+
groupSelectionMenu?: GroupSelectionMenuRenderFn;
|
|
14
16
|
};
|
|
15
17
|
declare var __VLS_14: {
|
|
16
18
|
context: import('..').AnnotationSelectionContext;
|
|
@@ -368,6 +370,60 @@ declare var __VLS_14: {
|
|
|
368
370
|
onPointerdown: (e: PointerEvent) => void;
|
|
369
371
|
onTouchstart: (e: TouchEvent) => void;
|
|
370
372
|
};
|
|
373
|
+
}, __VLS_242: {
|
|
374
|
+
context: import('..').AnnotationSelectionContext;
|
|
375
|
+
selected: boolean;
|
|
376
|
+
rect: {
|
|
377
|
+
origin: {
|
|
378
|
+
x: number;
|
|
379
|
+
y: number;
|
|
380
|
+
};
|
|
381
|
+
size: {
|
|
382
|
+
width: number;
|
|
383
|
+
height: number;
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
placement: import('@embedpdf/utils/vue').SelectionMenuPlacement;
|
|
387
|
+
menuWrapperProps: {
|
|
388
|
+
style: import('vue').CSSProperties;
|
|
389
|
+
onPointerdown: (e: PointerEvent) => void;
|
|
390
|
+
onTouchstart: (e: TouchEvent) => void;
|
|
391
|
+
};
|
|
392
|
+
}, __VLS_245: {
|
|
393
|
+
backgroundColor: "#007ACC";
|
|
394
|
+
onPointerdown: (e: PointerEvent) => void;
|
|
395
|
+
onPointermove: (e: PointerEvent) => void;
|
|
396
|
+
onPointerup: (e: PointerEvent) => void;
|
|
397
|
+
onPointercancel: (e: PointerEvent) => void;
|
|
398
|
+
key: string | number;
|
|
399
|
+
style: import('vue').CSSProperties;
|
|
400
|
+
}, __VLS_254: {
|
|
401
|
+
context: import('..').GroupSelectionContext;
|
|
402
|
+
selected: boolean;
|
|
403
|
+
rect: {
|
|
404
|
+
origin: {
|
|
405
|
+
x: number;
|
|
406
|
+
y: number;
|
|
407
|
+
};
|
|
408
|
+
size: {
|
|
409
|
+
width: number;
|
|
410
|
+
height: number;
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
placement: import('@embedpdf/utils/vue').SelectionMenuPlacement;
|
|
414
|
+
menuWrapperProps: {
|
|
415
|
+
style: import('vue').CSSProperties;
|
|
416
|
+
onPointerdown: (e: PointerEvent) => void;
|
|
417
|
+
onTouchstart: (e: TouchEvent) => void;
|
|
418
|
+
};
|
|
419
|
+
}, __VLS_257: {
|
|
420
|
+
backgroundColor: string;
|
|
421
|
+
onPointerdown: (e: PointerEvent) => void;
|
|
422
|
+
onPointermove: (e: PointerEvent) => void;
|
|
423
|
+
onPointerup: (e: PointerEvent) => void;
|
|
424
|
+
onPointercancel: (e: PointerEvent) => void;
|
|
425
|
+
key: string | number;
|
|
426
|
+
style: import('vue').CSSProperties;
|
|
371
427
|
};
|
|
372
428
|
type __VLS_Slots = {} & {
|
|
373
429
|
'selection-menu'?: (props: typeof __VLS_14) => any;
|
|
@@ -425,6 +481,14 @@ type __VLS_Slots = {} & {
|
|
|
425
481
|
'selection-menu'?: (props: typeof __VLS_212) => any;
|
|
426
482
|
} & {
|
|
427
483
|
'selection-menu'?: (props: typeof __VLS_227) => any;
|
|
484
|
+
} & {
|
|
485
|
+
'selection-menu'?: (props: typeof __VLS_242) => any;
|
|
486
|
+
} & {
|
|
487
|
+
'resize-handle'?: (props: typeof __VLS_245) => any;
|
|
488
|
+
} & {
|
|
489
|
+
'group-selection-menu'?: (props: typeof __VLS_254) => any;
|
|
490
|
+
} & {
|
|
491
|
+
'resize-handle'?: (props: typeof __VLS_257) => any;
|
|
428
492
|
};
|
|
429
493
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
430
494
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { SelectionMenuPlacement } from '@embedpdf/utils/vue';
|
|
2
|
+
import { TrackedAnnotation } from '../../lib/index.ts';
|
|
3
|
+
import { GroupSelectionContext, GroupSelectionMenuRenderFn, ResizeHandleUI } from '../types';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
documentId: string;
|
|
6
|
+
pageIndex: number;
|
|
7
|
+
scale: number;
|
|
8
|
+
rotation: number;
|
|
9
|
+
pageWidth: number;
|
|
10
|
+
pageHeight: number;
|
|
11
|
+
/** All selected annotations on this page */
|
|
12
|
+
selectedAnnotations: TrackedAnnotation[];
|
|
13
|
+
/** Whether the group is draggable (all annotations must be group-draggable) */
|
|
14
|
+
isDraggable: boolean;
|
|
15
|
+
/** Whether the group is resizable (all annotations must be group-resizable) */
|
|
16
|
+
isResizable: boolean;
|
|
17
|
+
/** Resize handle UI customization */
|
|
18
|
+
resizeUI?: ResizeHandleUI;
|
|
19
|
+
/** Selection outline color */
|
|
20
|
+
selectionOutlineColor?: string;
|
|
21
|
+
/** Outline offset */
|
|
22
|
+
outlineOffset?: number;
|
|
23
|
+
/** Z-index for the group box */
|
|
24
|
+
zIndex?: number;
|
|
25
|
+
/** Group selection menu render function */
|
|
26
|
+
groupSelectionMenu?: GroupSelectionMenuRenderFn;
|
|
27
|
+
};
|
|
28
|
+
declare var __VLS_1: {
|
|
29
|
+
backgroundColor: string;
|
|
30
|
+
onPointerdown: (e: PointerEvent) => void;
|
|
31
|
+
onPointermove: (e: PointerEvent) => void;
|
|
32
|
+
onPointerup: (e: PointerEvent) => void;
|
|
33
|
+
onPointercancel: (e: PointerEvent) => void;
|
|
34
|
+
key: string | number;
|
|
35
|
+
style: import('vue').CSSProperties;
|
|
36
|
+
}, __VLS_15: {
|
|
37
|
+
context: GroupSelectionContext;
|
|
38
|
+
selected: boolean;
|
|
39
|
+
rect: {
|
|
40
|
+
origin: {
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
};
|
|
44
|
+
size: {
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
placement: SelectionMenuPlacement;
|
|
50
|
+
menuWrapperProps: {
|
|
51
|
+
style: import('vue').CSSProperties;
|
|
52
|
+
onPointerdown: (e: PointerEvent) => void;
|
|
53
|
+
onTouchstart: (e: TouchEvent) => void;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
type __VLS_Slots = {} & {
|
|
57
|
+
'resize-handle'?: (props: typeof __VLS_1) => any;
|
|
58
|
+
} & {
|
|
59
|
+
'group-selection-menu'?: (props: typeof __VLS_15) => any;
|
|
60
|
+
};
|
|
61
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
62
|
+
outlineOffset: number;
|
|
63
|
+
zIndex: number;
|
|
64
|
+
selectionOutlineColor: string;
|
|
65
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
66
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
67
|
+
declare const _default: typeof __VLS_export;
|
|
68
|
+
export default _default;
|
|
69
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
70
|
+
new (): {
|
|
71
|
+
$slots: S;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
@@ -2,6 +2,7 @@ export { default as AnnotationContainer } from './annotation-container.vue';
|
|
|
2
2
|
export { default as AnnotationLayer } from './annotation-layer.vue';
|
|
3
3
|
export { default as AnnotationPaintLayer } from './annotation-paint-layer.vue';
|
|
4
4
|
export { default as Annotations } from './annotations.vue';
|
|
5
|
+
export { default as GroupSelectionBox } from './group-selection-box.vue';
|
|
5
6
|
export { default as PreviewRenderer } from './preview-renderer.vue';
|
|
6
7
|
export { default as RenderAnnotation } from './render-annotation.vue';
|
|
7
8
|
export { default as TextMarkup } from './text-markup.vue';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Rect } from '@embedpdf/models';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
color
|
|
3
|
+
/** Stroke/markup color */
|
|
4
|
+
strokeColor?: string;
|
|
4
5
|
opacity?: number;
|
|
5
6
|
segmentRects: Rect[];
|
|
6
7
|
rect?: Rect;
|
|
@@ -8,7 +9,6 @@ type __VLS_Props = {
|
|
|
8
9
|
onClick?: (e: PointerEvent | TouchEvent) => void;
|
|
9
10
|
};
|
|
10
11
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
-
color: string;
|
|
12
12
|
opacity: number;
|
|
13
13
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Rect } from '@embedpdf/models';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
color
|
|
3
|
+
/** Stroke/markup color */
|
|
4
|
+
strokeColor?: string;
|
|
4
5
|
opacity?: number;
|
|
5
6
|
segmentRects: Rect[];
|
|
6
7
|
rect?: Rect;
|
|
@@ -8,7 +9,6 @@ type __VLS_Props = {
|
|
|
8
9
|
onClick?: (e: PointerEvent | TouchEvent) => void;
|
|
9
10
|
};
|
|
10
11
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
-
color: string;
|
|
12
12
|
opacity: number;
|
|
13
13
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Rect } from '@embedpdf/models';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
color
|
|
3
|
+
/** Stroke/markup color */
|
|
4
|
+
strokeColor?: string;
|
|
4
5
|
opacity?: number;
|
|
5
6
|
segmentRects: Rect[];
|
|
6
7
|
rect?: Rect;
|
|
@@ -8,7 +9,6 @@ type __VLS_Props = {
|
|
|
8
9
|
onClick?: (e: PointerEvent | TouchEvent) => void;
|
|
9
10
|
};
|
|
10
11
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
-
color: string;
|
|
12
12
|
opacity: number;
|
|
13
13
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Rect } from '@embedpdf/models';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
color
|
|
3
|
+
/** Stroke/markup color */
|
|
4
|
+
strokeColor?: string;
|
|
4
5
|
opacity?: number;
|
|
5
6
|
segmentRects: Rect[];
|
|
6
7
|
rect?: Rect;
|
|
@@ -8,7 +9,6 @@ type __VLS_Props = {
|
|
|
8
9
|
onClick?: (e: PointerEvent | TouchEvent) => void;
|
|
9
10
|
};
|
|
10
11
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
-
color: string;
|
|
12
12
|
opacity: number;
|
|
13
13
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const _default: typeof __VLS_export;
|
|
@@ -10,12 +10,14 @@ export declare const useAnnotation: (documentId: MaybeRefOrGetter<string>) => {
|
|
|
10
10
|
state: import('vue').Ref<{
|
|
11
11
|
pages: Record<number, string[]>;
|
|
12
12
|
byUid: Record<string, import('../../lib/index.ts').TrackedAnnotation>;
|
|
13
|
+
selectedUids: string[];
|
|
13
14
|
selectedUid: string | null;
|
|
14
15
|
activeToolId: string | null;
|
|
15
16
|
hasPendingChanges: boolean;
|
|
16
17
|
}, AnnotationDocumentState | {
|
|
17
18
|
pages: Record<number, string[]>;
|
|
18
19
|
byUid: Record<string, import('../../lib/index.ts').TrackedAnnotation>;
|
|
20
|
+
selectedUids: string[];
|
|
19
21
|
selectedUid: string | null;
|
|
20
22
|
activeToolId: string | null;
|
|
21
23
|
hasPendingChanges: boolean;
|