@embedpdf/plugin-annotation 2.8.0 → 2.9.1
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 +829 -148
- package/dist/index.js.map +1 -1
- package/dist/lib/geometry/cloudy-border.d.ts +90 -0
- package/dist/lib/geometry/index.d.ts +1 -0
- package/dist/lib/handlers/types.d.ts +2 -1
- package/dist/lib/tools/default-tools.d.ts +43 -88
- package/dist/lib/tools/types.d.ts +34 -1
- package/dist/lib/types.d.ts +3 -0
- package/dist/preact/index.cjs +1 -1
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.js +371 -242
- package/dist/preact/index.js.map +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +371 -242
- package/dist/react/index.js.map +1 -1
- package/dist/shared/components/annotation-container.d.ts +4 -2
- package/dist/shared/components/annotations/circle.d.ts +6 -2
- package/dist/shared/components/annotations/polygon.d.ts +3 -1
- package/dist/shared/components/annotations/square.d.ts +6 -2
- package/dist/shared/components/types.d.ts +6 -2
- package/dist/shared-preact/components/annotation-container.d.ts +4 -2
- package/dist/shared-preact/components/annotations/circle.d.ts +6 -2
- package/dist/shared-preact/components/annotations/polygon.d.ts +3 -1
- package/dist/shared-preact/components/annotations/square.d.ts +6 -2
- package/dist/shared-preact/components/types.d.ts +6 -2
- package/dist/shared-react/components/annotation-container.d.ts +4 -2
- package/dist/shared-react/components/annotations/circle.d.ts +6 -2
- package/dist/shared-react/components/annotations/polygon.d.ts +3 -1
- package/dist/shared-react/components/annotations/square.d.ts +6 -2
- package/dist/shared-react/components/types.d.ts +6 -2
- package/dist/svelte/components/annotations/Circle.svelte.d.ts +3 -1
- package/dist/svelte/components/annotations/Polygon.svelte.d.ts +1 -0
- package/dist/svelte/components/annotations/Square.svelte.d.ts +3 -1
- package/dist/svelte/components/types.d.ts +2 -1
- package/dist/svelte/context/types.d.ts +6 -2
- package/dist/svelte/index.cjs +1 -1
- package/dist/svelte/index.cjs.map +1 -1
- package/dist/svelte/index.js +525 -298
- package/dist/svelte/index.js.map +1 -1
- package/dist/vue/components/annotation-container.vue.d.ts +7 -6
- package/dist/vue/components/annotations/circle.vue.d.ts +5 -1
- package/dist/vue/components/annotations/polygon.vue.d.ts +2 -0
- package/dist/vue/components/annotations/square.vue.d.ts +5 -1
- package/dist/vue/components/annotations.vue.d.ts +8 -9
- package/dist/vue/context/types.d.ts +6 -2
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.js +289 -135
- package/dist/vue/index.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from 'vue';
|
|
2
|
-
import { PdfAnnotationObject, AnnotationAppearances } from '@embedpdf/models';
|
|
2
|
+
import { PdfAnnotationObject, AnnotationAppearances, CssBlendMode } from '@embedpdf/models';
|
|
3
3
|
import { SelectionMenuPlacement } from '@embedpdf/utils/vue';
|
|
4
4
|
import { TrackedAnnotation } from '../../lib';
|
|
5
5
|
import { VertexConfig } from '../../shared-vue/types';
|
|
@@ -43,6 +43,7 @@ declare const __VLS_export: <T extends PdfAnnotationObject>(__VLS_props: NonNull
|
|
|
43
43
|
vertexUi?: VertexHandleUI;
|
|
44
44
|
/** Customize rotation handle appearance */
|
|
45
45
|
rotationUi?: RotationHandleUI;
|
|
46
|
+
blendMode?: CssBlendMode;
|
|
46
47
|
style?: CSSProperties;
|
|
47
48
|
}> & (typeof globalThis extends {
|
|
48
49
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -50,6 +51,11 @@ declare const __VLS_export: <T extends PdfAnnotationObject>(__VLS_props: NonNull
|
|
|
50
51
|
expose: (exposed: {}) => void;
|
|
51
52
|
attrs: any;
|
|
52
53
|
slots: {
|
|
54
|
+
default?: (props: {
|
|
55
|
+
annotation: T;
|
|
56
|
+
appearanceActive: boolean;
|
|
57
|
+
}) => any;
|
|
58
|
+
} & {
|
|
53
59
|
'rotation-handle'?: (props: {
|
|
54
60
|
[key: string]: any;
|
|
55
61
|
key?: string | number;
|
|
@@ -63,11 +69,6 @@ declare const __VLS_export: <T extends PdfAnnotationObject>(__VLS_props: NonNull
|
|
|
63
69
|
} | {
|
|
64
70
|
[x: string]: never;
|
|
65
71
|
}) => any;
|
|
66
|
-
} & {
|
|
67
|
-
default?: (props: {
|
|
68
|
-
annotation: T;
|
|
69
|
-
appearanceActive: boolean;
|
|
70
|
-
}) => any;
|
|
71
72
|
} & {
|
|
72
73
|
'resize-handle'?: (props: {
|
|
73
74
|
backgroundColor: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PdfAnnotationBorderStyle, Rect } from '@embedpdf/models';
|
|
1
|
+
import { PdfAnnotationBorderStyle, PdfRectDifferences, Rect } from '@embedpdf/models';
|
|
2
2
|
declare const _default: typeof __VLS_export;
|
|
3
3
|
export default _default;
|
|
4
4
|
declare const __VLS_export: import('vue').DefineComponent<{
|
|
@@ -13,6 +13,8 @@ declare const __VLS_export: import('vue').DefineComponent<{
|
|
|
13
13
|
scale: number;
|
|
14
14
|
onClick?: (e: PointerEvent) => void;
|
|
15
15
|
appearanceActive?: boolean;
|
|
16
|
+
cloudyBorderIntensity?: number;
|
|
17
|
+
rectangleDifferences?: PdfRectDifferences;
|
|
16
18
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
17
19
|
isSelected: boolean;
|
|
18
20
|
color?: string;
|
|
@@ -25,6 +27,8 @@ declare const __VLS_export: import('vue').DefineComponent<{
|
|
|
25
27
|
scale: number;
|
|
26
28
|
onClick?: (e: PointerEvent) => void;
|
|
27
29
|
appearanceActive?: boolean;
|
|
30
|
+
cloudyBorderIntensity?: number;
|
|
31
|
+
rectangleDifferences?: PdfRectDifferences;
|
|
28
32
|
}> & Readonly<{}>, {
|
|
29
33
|
color: string;
|
|
30
34
|
opacity: number;
|
|
@@ -16,6 +16,7 @@ declare const __VLS_export: import('vue').DefineComponent<{
|
|
|
16
16
|
currentVertex?: Position;
|
|
17
17
|
handleSize?: number;
|
|
18
18
|
appearanceActive?: boolean;
|
|
19
|
+
cloudyBorderIntensity?: number;
|
|
19
20
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
20
21
|
rect: Rect;
|
|
21
22
|
vertices: Position[];
|
|
@@ -31,6 +32,7 @@ declare const __VLS_export: import('vue').DefineComponent<{
|
|
|
31
32
|
currentVertex?: Position;
|
|
32
33
|
handleSize?: number;
|
|
33
34
|
appearanceActive?: boolean;
|
|
35
|
+
cloudyBorderIntensity?: number;
|
|
34
36
|
}> & Readonly<{}>, {
|
|
35
37
|
strokeColor: string;
|
|
36
38
|
color: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PdfAnnotationBorderStyle, Rect } from '@embedpdf/models';
|
|
1
|
+
import { PdfAnnotationBorderStyle, PdfRectDifferences, Rect } from '@embedpdf/models';
|
|
2
2
|
declare const _default: typeof __VLS_export;
|
|
3
3
|
export default _default;
|
|
4
4
|
declare const __VLS_export: import('vue').DefineComponent<{
|
|
@@ -13,6 +13,8 @@ declare const __VLS_export: import('vue').DefineComponent<{
|
|
|
13
13
|
scale: number;
|
|
14
14
|
onClick?: (e: PointerEvent) => void;
|
|
15
15
|
appearanceActive?: boolean;
|
|
16
|
+
cloudyBorderIntensity?: number;
|
|
17
|
+
rectangleDifferences?: PdfRectDifferences;
|
|
16
18
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
17
19
|
isSelected: boolean;
|
|
18
20
|
color?: string;
|
|
@@ -25,6 +27,8 @@ declare const __VLS_export: import('vue').DefineComponent<{
|
|
|
25
27
|
scale: number;
|
|
26
28
|
onClick?: (e: PointerEvent) => void;
|
|
27
29
|
appearanceActive?: boolean;
|
|
30
|
+
cloudyBorderIntensity?: number;
|
|
31
|
+
rectangleDifferences?: PdfRectDifferences;
|
|
28
32
|
}> & Readonly<{}>, {
|
|
29
33
|
color: string;
|
|
30
34
|
opacity: number;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CSSProperties } from 'vue';
|
|
2
1
|
import { AnnotationSelectionMenuRenderFn, GroupSelectionMenuRenderFn, ResizeHandleUI, VertexHandleUI, RotationHandleUI, SelectionOutline } from '../types';
|
|
3
2
|
import { BoxedAnnotationRenderer } from '../context';
|
|
4
3
|
type __VLS_Props = {
|
|
@@ -33,7 +32,7 @@ declare var __VLS_14: {
|
|
|
33
32
|
};
|
|
34
33
|
placement: import('@embedpdf/utils').SelectionMenuPlacement;
|
|
35
34
|
menuWrapperProps: {
|
|
36
|
-
style: CSSProperties;
|
|
35
|
+
style: import('vue').CSSProperties;
|
|
37
36
|
onPointerdown: (e: PointerEvent) => void;
|
|
38
37
|
onTouchstart: (e: TouchEvent) => void;
|
|
39
38
|
};
|
|
@@ -44,7 +43,7 @@ declare var __VLS_14: {
|
|
|
44
43
|
onPointerup: (e: PointerEvent) => void;
|
|
45
44
|
onPointercancel: (e: PointerEvent) => void;
|
|
46
45
|
key: string | number | undefined;
|
|
47
|
-
style: CSSProperties;
|
|
46
|
+
style: import('vue').CSSProperties;
|
|
48
47
|
}, __VLS_20: {
|
|
49
48
|
backgroundColor: string;
|
|
50
49
|
onPointerdown: (e: PointerEvent) => void;
|
|
@@ -52,14 +51,14 @@ declare var __VLS_14: {
|
|
|
52
51
|
onPointerup: (e: PointerEvent) => void;
|
|
53
52
|
onPointercancel: (e: PointerEvent) => void;
|
|
54
53
|
key: string | number | undefined;
|
|
55
|
-
style: CSSProperties;
|
|
54
|
+
style: import('vue').CSSProperties;
|
|
56
55
|
}, __VLS_23: {
|
|
57
56
|
[key: string]: any;
|
|
58
57
|
key?: string | number;
|
|
59
|
-
style: CSSProperties;
|
|
58
|
+
style: import('vue').CSSProperties;
|
|
60
59
|
backgroundColor: string;
|
|
61
60
|
iconColor: string;
|
|
62
|
-
connectorStyle: CSSProperties;
|
|
61
|
+
connectorStyle: import('vue').CSSProperties;
|
|
63
62
|
showConnector: boolean;
|
|
64
63
|
opacity: number;
|
|
65
64
|
border: import('..').RotationHandleBorder;
|
|
@@ -72,14 +71,14 @@ declare var __VLS_14: {
|
|
|
72
71
|
onPointerup: (e: PointerEvent) => void;
|
|
73
72
|
onPointercancel: (e: PointerEvent) => void;
|
|
74
73
|
key: string | number | undefined;
|
|
75
|
-
style: CSSProperties;
|
|
74
|
+
style: import('vue').CSSProperties;
|
|
76
75
|
}, __VLS_38: {
|
|
77
76
|
[key: string]: any;
|
|
78
77
|
key?: string | number;
|
|
79
|
-
style: CSSProperties;
|
|
78
|
+
style: import('vue').CSSProperties;
|
|
80
79
|
backgroundColor: string;
|
|
81
80
|
iconColor: string;
|
|
82
|
-
connectorStyle: CSSProperties;
|
|
81
|
+
connectorStyle: import('vue').CSSProperties;
|
|
83
82
|
showConnector: boolean;
|
|
84
83
|
opacity: number;
|
|
85
84
|
border: import('..').RotationHandleBorder;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, CSSProperties } from 'vue';
|
|
2
|
-
import { PdfAnnotationObject } from '@embedpdf/models';
|
|
2
|
+
import { PdfAnnotationObject, PdfBlendMode } from '@embedpdf/models';
|
|
3
3
|
import { TrackedAnnotation } from '../../lib';
|
|
4
4
|
import { VertexConfig } from '../../shared-vue/types';
|
|
5
5
|
/**
|
|
@@ -46,7 +46,9 @@ export interface AnnotationRendererEntry<T extends PdfAnnotationObject = PdfAnno
|
|
|
46
46
|
vertexConfig?: VertexConfig<T>;
|
|
47
47
|
/** z-index for the annotation container (default: 1, text markup uses 0) */
|
|
48
48
|
zIndex?: number;
|
|
49
|
-
/**
|
|
49
|
+
/** Default blend mode for this annotation type (used when the annotation object has no blendMode set) */
|
|
50
|
+
defaultBlendMode?: PdfBlendMode;
|
|
51
|
+
/** Style applied to the annotation container — overrides the default blend-mode style. */
|
|
50
52
|
containerStyle?: (annotation: T) => CSSProperties;
|
|
51
53
|
/** Type-specific interaction fallbacks used when the tool doesn't define a property */
|
|
52
54
|
interactionDefaults?: {
|
|
@@ -77,6 +79,8 @@ export interface BoxedAnnotationRenderer {
|
|
|
77
79
|
component: Component<AnnotationRendererProps>;
|
|
78
80
|
vertexConfig?: VertexConfig<PdfAnnotationObject>;
|
|
79
81
|
zIndex?: number;
|
|
82
|
+
defaultBlendMode?: PdfBlendMode;
|
|
83
|
+
/** Style applied to the annotation container — overrides the default blend-mode style. */
|
|
80
84
|
containerStyle?: (annotation: PdfAnnotationObject) => CSSProperties;
|
|
81
85
|
interactionDefaults?: {
|
|
82
86
|
isDraggable?: boolean;
|