@embedpdf/plugin-annotation 1.3.12 → 1.3.14
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 +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/preact/index.cjs +1 -1
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.js +21 -5
- 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 +21 -5
- package/dist/react/index.js.map +1 -1
- package/dist/shared-preact/components/annotation-container.d.ts +2 -1
- package/dist/shared-preact/components/annotation-layer.d.ts +1 -1
- package/dist/shared-preact/components/annotations.d.ts +1 -1
- package/dist/shared-preact/components/types.d.ts +51 -0
- package/dist/shared-preact/hooks/use-annotation.d.ts +5 -1
- package/dist/shared-preact/types.d.ts +1 -50
- package/dist/shared-react/components/annotation-container.d.ts +2 -1
- package/dist/shared-react/components/annotation-layer.d.ts +1 -1
- package/dist/shared-react/components/annotations.d.ts +1 -1
- package/dist/shared-react/components/types.d.ts +51 -0
- package/dist/shared-react/hooks/use-annotation.d.ts +5 -1
- package/dist/shared-react/types.d.ts +1 -50
- package/dist/vue/components/annotation-container.vue.d.ts +48 -0
- package/dist/vue/components/annotation-layer.vue.d.ts +27 -0
- package/dist/vue/components/annotation-paint-layer.vue.d.ts +6 -0
- package/dist/vue/components/annotations/circle.vue.d.ts +19 -0
- package/dist/vue/components/annotations/free-text.vue.d.ts +12 -0
- package/dist/vue/components/annotations/index.d.ts +8 -0
- package/dist/vue/components/annotations/ink.vue.d.ts +16 -0
- package/dist/vue/components/annotations/line.vue.d.ts +22 -0
- package/dist/vue/components/annotations/polygon.vue.d.ts +24 -0
- package/dist/vue/components/annotations/polyline.vue.d.ts +19 -0
- package/dist/vue/components/annotations/square.vue.d.ts +19 -0
- package/dist/vue/components/annotations/stamp.vue.d.ts +11 -0
- package/dist/vue/components/annotations.vue.d.ts +77 -0
- package/dist/vue/components/index.d.ts +9 -0
- package/dist/vue/components/preview-renderer.vue.d.ts +7 -0
- package/dist/vue/components/render-annotation.vue.d.ts +12 -0
- package/dist/vue/components/text-markup/highlight.vue.d.ts +14 -0
- package/dist/vue/components/text-markup/index.d.ts +4 -0
- package/dist/vue/components/text-markup/squiggly.vue.d.ts +14 -0
- package/dist/vue/components/text-markup/strikeout.vue.d.ts +14 -0
- package/dist/vue/components/text-markup/underline.vue.d.ts +14 -0
- package/dist/vue/components/text-markup.vue.d.ts +6 -0
- package/dist/vue/hooks/use-annotation.d.ts +2682 -0
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.js +1935 -1
- package/dist/vue/index.js.map +1 -1
- package/package.json +11 -11
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { PdfAnnotationObject, Rect } from '@embedpdf/models';
|
|
2
|
+
import { TrackedAnnotation } from '../../lib/index.ts';
|
|
3
|
+
import { HandleElementProps, MenuWrapperProps } from '../../preact/utils.ts';
|
|
4
|
+
import { JSX } from '../../preact/adapter.ts';
|
|
5
|
+
export type ResizeDirection = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'none';
|
|
6
|
+
export interface SelectionMenuProps {
|
|
7
|
+
annotation: TrackedAnnotation;
|
|
8
|
+
selected: boolean;
|
|
9
|
+
rect: Rect;
|
|
10
|
+
menuWrapperProps: MenuWrapperProps;
|
|
11
|
+
}
|
|
12
|
+
export type SelectionMenu = (props: SelectionMenuProps) => JSX.Element;
|
|
13
|
+
export type HandleProps = HandleElementProps & {
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
};
|
|
16
|
+
/** UI customization for resize handles */
|
|
17
|
+
export interface ResizeHandleUI {
|
|
18
|
+
/** Handle size in CSS px (default: 12) */
|
|
19
|
+
size?: number;
|
|
20
|
+
/** Default background color for the handle (used by default renderer) */
|
|
21
|
+
color?: string;
|
|
22
|
+
/** Custom renderer for each handle (overrides default) */
|
|
23
|
+
component?: (p: HandleProps) => JSX.Element;
|
|
24
|
+
}
|
|
25
|
+
/** UI customization for vertex handles */
|
|
26
|
+
export interface VertexHandleUI {
|
|
27
|
+
/** Handle size in CSS px (default: 12) */
|
|
28
|
+
size?: number;
|
|
29
|
+
/** Default background color for the handle (used by default renderer) */
|
|
30
|
+
color?: string;
|
|
31
|
+
/** Custom renderer for each vertex (overrides default) */
|
|
32
|
+
component?: (p: HandleProps) => JSX.Element;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Props for the custom annotation renderer
|
|
36
|
+
*/
|
|
37
|
+
export interface CustomAnnotationRendererProps<T extends PdfAnnotationObject> {
|
|
38
|
+
annotation: T;
|
|
39
|
+
children: JSX.Element;
|
|
40
|
+
isSelected: boolean;
|
|
41
|
+
scale: number;
|
|
42
|
+
rotation: number;
|
|
43
|
+
pageWidth: number;
|
|
44
|
+
pageHeight: number;
|
|
45
|
+
pageIndex: number;
|
|
46
|
+
onSelect: (event: any) => void;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Custom renderer for an annotation
|
|
50
|
+
*/
|
|
51
|
+
export type CustomAnnotationRenderer<T extends PdfAnnotationObject> = (props: CustomAnnotationRendererProps<T>) => JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnnotationPlugin } from '../../lib/index.ts';
|
|
1
|
+
import { AnnotationPlugin, AnnotationState } from '../../lib/index.ts';
|
|
2
2
|
export declare const useAnnotationPlugin: () => {
|
|
3
3
|
plugin: AnnotationPlugin | null;
|
|
4
4
|
isLoading: boolean;
|
|
@@ -9,3 +9,7 @@ export declare const useAnnotationCapability: () => {
|
|
|
9
9
|
isLoading: boolean;
|
|
10
10
|
ready: Promise<void>;
|
|
11
11
|
};
|
|
12
|
+
export declare const useAnnotation: () => {
|
|
13
|
+
state: AnnotationState;
|
|
14
|
+
provides: Readonly<import('../../lib/index.ts').AnnotationCapability> | null;
|
|
15
|
+
};
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
import { PdfAnnotationObject, Position
|
|
2
|
-
import { TrackedAnnotation } from '../lib/index.ts';
|
|
3
|
-
import { HandleElementProps, MenuWrapperProps } from '../preact/utils.ts';
|
|
4
|
-
import { JSX } from '../preact/adapter.ts';
|
|
5
|
-
export type ResizeDirection = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'none';
|
|
6
|
-
export interface SelectionMenuProps {
|
|
7
|
-
annotation: TrackedAnnotation;
|
|
8
|
-
selected: boolean;
|
|
9
|
-
rect: Rect;
|
|
10
|
-
menuWrapperProps: MenuWrapperProps;
|
|
11
|
-
}
|
|
12
|
-
export type SelectionMenu = (props: SelectionMenuProps) => JSX.Element;
|
|
1
|
+
import { PdfAnnotationObject, Position } from '@embedpdf/models';
|
|
13
2
|
/**
|
|
14
3
|
* Interface for vertex configuration - handles annotation-specific vertex logic
|
|
15
4
|
*/
|
|
@@ -19,41 +8,3 @@ export interface VertexConfig<T extends PdfAnnotationObject> {
|
|
|
19
8
|
/** Transform annotation when vertices change */
|
|
20
9
|
transformAnnotation: (annotation: T, vertices: Position[]) => Partial<T>;
|
|
21
10
|
}
|
|
22
|
-
export type HandleProps = HandleElementProps & {
|
|
23
|
-
backgroundColor?: string;
|
|
24
|
-
};
|
|
25
|
-
/** UI customization for resize handles */
|
|
26
|
-
export interface ResizeHandleUI {
|
|
27
|
-
/** Handle size in CSS px (default: 12) */
|
|
28
|
-
size?: number;
|
|
29
|
-
/** Default background color for the handle (used by default renderer) */
|
|
30
|
-
color?: string;
|
|
31
|
-
/** Custom renderer for each handle (overrides default) */
|
|
32
|
-
component?: (p: HandleProps) => JSX.Element;
|
|
33
|
-
}
|
|
34
|
-
/** UI customization for vertex handles */
|
|
35
|
-
export interface VertexHandleUI {
|
|
36
|
-
/** Handle size in CSS px (default: 12) */
|
|
37
|
-
size?: number;
|
|
38
|
-
/** Default background color for the handle (used by default renderer) */
|
|
39
|
-
color?: string;
|
|
40
|
-
/** Custom renderer for each vertex (overrides default) */
|
|
41
|
-
component?: (p: HandleProps) => JSX.Element;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Props for the custom annotation renderer
|
|
45
|
-
*/
|
|
46
|
-
export interface CustomAnnotationRendererProps<T extends PdfAnnotationObject> {
|
|
47
|
-
annotation: T;
|
|
48
|
-
isSelected: boolean;
|
|
49
|
-
scale: number;
|
|
50
|
-
rotation: number;
|
|
51
|
-
pageWidth: number;
|
|
52
|
-
pageHeight: number;
|
|
53
|
-
pageIndex: number;
|
|
54
|
-
onSelect: (event: any) => void;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Custom renderer for an annotation
|
|
58
|
-
*/
|
|
59
|
-
export type CustomAnnotationRenderer<T extends PdfAnnotationObject> = (props: CustomAnnotationRendererProps<T>) => JSX.Element | null;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PdfAnnotationObject } from '@embedpdf/models';
|
|
2
2
|
import { TrackedAnnotation } from '../../lib/index.ts';
|
|
3
3
|
import { JSX, CSSProperties } from '../../react/adapter.ts';
|
|
4
|
-
import { CustomAnnotationRenderer, ResizeHandleUI, SelectionMenuProps,
|
|
4
|
+
import { CustomAnnotationRenderer, ResizeHandleUI, SelectionMenuProps, VertexHandleUI } from './types';
|
|
5
|
+
import { VertexConfig } from '../types';
|
|
5
6
|
interface AnnotationContainerProps<T extends PdfAnnotationObject> {
|
|
6
7
|
scale: number;
|
|
7
8
|
pageIndex: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, CSSProperties } from '../../react/adapter.ts';
|
|
2
|
-
import { SelectionMenu, ResizeHandleUI, VertexHandleUI, CustomAnnotationRenderer } from '
|
|
2
|
+
import { SelectionMenu, ResizeHandleUI, VertexHandleUI, CustomAnnotationRenderer } from './types';
|
|
3
3
|
import { PdfAnnotationObject } from '@embedpdf/models';
|
|
4
4
|
type AnnotationLayerProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
5
5
|
pageIndex: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PdfAnnotationObject } from '@embedpdf/models';
|
|
2
|
-
import { CustomAnnotationRenderer, ResizeHandleUI, SelectionMenu, VertexHandleUI } from '
|
|
2
|
+
import { CustomAnnotationRenderer, ResizeHandleUI, SelectionMenu, VertexHandleUI } from './types';
|
|
3
3
|
interface AnnotationsProps {
|
|
4
4
|
pageIndex: number;
|
|
5
5
|
scale: number;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { PdfAnnotationObject, Rect } from '@embedpdf/models';
|
|
2
|
+
import { TrackedAnnotation } from '../../lib/index.ts';
|
|
3
|
+
import { HandleElementProps, MenuWrapperProps } from '../../react/utils.ts';
|
|
4
|
+
import { JSX } from '../../react/adapter.ts';
|
|
5
|
+
export type ResizeDirection = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'none';
|
|
6
|
+
export interface SelectionMenuProps {
|
|
7
|
+
annotation: TrackedAnnotation;
|
|
8
|
+
selected: boolean;
|
|
9
|
+
rect: Rect;
|
|
10
|
+
menuWrapperProps: MenuWrapperProps;
|
|
11
|
+
}
|
|
12
|
+
export type SelectionMenu = (props: SelectionMenuProps) => JSX.Element;
|
|
13
|
+
export type HandleProps = HandleElementProps & {
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
};
|
|
16
|
+
/** UI customization for resize handles */
|
|
17
|
+
export interface ResizeHandleUI {
|
|
18
|
+
/** Handle size in CSS px (default: 12) */
|
|
19
|
+
size?: number;
|
|
20
|
+
/** Default background color for the handle (used by default renderer) */
|
|
21
|
+
color?: string;
|
|
22
|
+
/** Custom renderer for each handle (overrides default) */
|
|
23
|
+
component?: (p: HandleProps) => JSX.Element;
|
|
24
|
+
}
|
|
25
|
+
/** UI customization for vertex handles */
|
|
26
|
+
export interface VertexHandleUI {
|
|
27
|
+
/** Handle size in CSS px (default: 12) */
|
|
28
|
+
size?: number;
|
|
29
|
+
/** Default background color for the handle (used by default renderer) */
|
|
30
|
+
color?: string;
|
|
31
|
+
/** Custom renderer for each vertex (overrides default) */
|
|
32
|
+
component?: (p: HandleProps) => JSX.Element;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Props for the custom annotation renderer
|
|
36
|
+
*/
|
|
37
|
+
export interface CustomAnnotationRendererProps<T extends PdfAnnotationObject> {
|
|
38
|
+
annotation: T;
|
|
39
|
+
children: JSX.Element;
|
|
40
|
+
isSelected: boolean;
|
|
41
|
+
scale: number;
|
|
42
|
+
rotation: number;
|
|
43
|
+
pageWidth: number;
|
|
44
|
+
pageHeight: number;
|
|
45
|
+
pageIndex: number;
|
|
46
|
+
onSelect: (event: any) => void;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Custom renderer for an annotation
|
|
50
|
+
*/
|
|
51
|
+
export type CustomAnnotationRenderer<T extends PdfAnnotationObject> = (props: CustomAnnotationRendererProps<T>) => JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnnotationPlugin } from '../../lib/index.ts';
|
|
1
|
+
import { AnnotationPlugin, AnnotationState } from '../../lib/index.ts';
|
|
2
2
|
export declare const useAnnotationPlugin: () => {
|
|
3
3
|
plugin: AnnotationPlugin | null;
|
|
4
4
|
isLoading: boolean;
|
|
@@ -9,3 +9,7 @@ export declare const useAnnotationCapability: () => {
|
|
|
9
9
|
isLoading: boolean;
|
|
10
10
|
ready: Promise<void>;
|
|
11
11
|
};
|
|
12
|
+
export declare const useAnnotation: () => {
|
|
13
|
+
state: AnnotationState;
|
|
14
|
+
provides: Readonly<import('../../lib/index.ts').AnnotationCapability> | null;
|
|
15
|
+
};
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
import { PdfAnnotationObject, Position
|
|
2
|
-
import { TrackedAnnotation } from '../lib/index.ts';
|
|
3
|
-
import { HandleElementProps, MenuWrapperProps } from '../react/utils.ts';
|
|
4
|
-
import { JSX } from '../react/adapter.ts';
|
|
5
|
-
export type ResizeDirection = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'none';
|
|
6
|
-
export interface SelectionMenuProps {
|
|
7
|
-
annotation: TrackedAnnotation;
|
|
8
|
-
selected: boolean;
|
|
9
|
-
rect: Rect;
|
|
10
|
-
menuWrapperProps: MenuWrapperProps;
|
|
11
|
-
}
|
|
12
|
-
export type SelectionMenu = (props: SelectionMenuProps) => JSX.Element;
|
|
1
|
+
import { PdfAnnotationObject, Position } from '@embedpdf/models';
|
|
13
2
|
/**
|
|
14
3
|
* Interface for vertex configuration - handles annotation-specific vertex logic
|
|
15
4
|
*/
|
|
@@ -19,41 +8,3 @@ export interface VertexConfig<T extends PdfAnnotationObject> {
|
|
|
19
8
|
/** Transform annotation when vertices change */
|
|
20
9
|
transformAnnotation: (annotation: T, vertices: Position[]) => Partial<T>;
|
|
21
10
|
}
|
|
22
|
-
export type HandleProps = HandleElementProps & {
|
|
23
|
-
backgroundColor?: string;
|
|
24
|
-
};
|
|
25
|
-
/** UI customization for resize handles */
|
|
26
|
-
export interface ResizeHandleUI {
|
|
27
|
-
/** Handle size in CSS px (default: 12) */
|
|
28
|
-
size?: number;
|
|
29
|
-
/** Default background color for the handle (used by default renderer) */
|
|
30
|
-
color?: string;
|
|
31
|
-
/** Custom renderer for each handle (overrides default) */
|
|
32
|
-
component?: (p: HandleProps) => JSX.Element;
|
|
33
|
-
}
|
|
34
|
-
/** UI customization for vertex handles */
|
|
35
|
-
export interface VertexHandleUI {
|
|
36
|
-
/** Handle size in CSS px (default: 12) */
|
|
37
|
-
size?: number;
|
|
38
|
-
/** Default background color for the handle (used by default renderer) */
|
|
39
|
-
color?: string;
|
|
40
|
-
/** Custom renderer for each vertex (overrides default) */
|
|
41
|
-
component?: (p: HandleProps) => JSX.Element;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Props for the custom annotation renderer
|
|
45
|
-
*/
|
|
46
|
-
export interface CustomAnnotationRendererProps<T extends PdfAnnotationObject> {
|
|
47
|
-
annotation: T;
|
|
48
|
-
isSelected: boolean;
|
|
49
|
-
scale: number;
|
|
50
|
-
rotation: number;
|
|
51
|
-
pageWidth: number;
|
|
52
|
-
pageHeight: number;
|
|
53
|
-
pageIndex: number;
|
|
54
|
-
onSelect: (event: any) => void;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Custom renderer for an annotation
|
|
58
|
-
*/
|
|
59
|
-
export type CustomAnnotationRenderer<T extends PdfAnnotationObject> = (props: CustomAnnotationRendererProps<T>) => JSX.Element | null;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PdfAnnotationObject } from '@embedpdf/models';
|
|
2
|
+
import { TrackedAnnotation } from '../../lib/index.ts';
|
|
3
|
+
import { VertexConfig } from '../../shared-vue/types';
|
|
4
|
+
declare const _default: <T extends PdfAnnotationObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & {
|
|
6
|
+
scale: number;
|
|
7
|
+
pageIndex: number;
|
|
8
|
+
rotation: number;
|
|
9
|
+
pageWidth: number;
|
|
10
|
+
pageHeight: number;
|
|
11
|
+
trackedAnnotation: TrackedAnnotation<T>;
|
|
12
|
+
isSelected: boolean;
|
|
13
|
+
isDraggable: boolean;
|
|
14
|
+
isResizable: boolean;
|
|
15
|
+
lockAspectRatio?: boolean;
|
|
16
|
+
vertexConfig?: VertexConfig<T>;
|
|
17
|
+
outlineOffset?: number;
|
|
18
|
+
onDoubleClick?: (event: PointerEvent | MouseEvent) => void;
|
|
19
|
+
onSelect: (event: TouchEvent | MouseEvent) => void;
|
|
20
|
+
zIndex?: number;
|
|
21
|
+
selectionOutlineColor?: string;
|
|
22
|
+
} & {}> & import('vue').PublicProps;
|
|
23
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
24
|
+
attrs: any;
|
|
25
|
+
slots: {
|
|
26
|
+
default?: (props: {
|
|
27
|
+
annotation: any;
|
|
28
|
+
}) => any;
|
|
29
|
+
} & {
|
|
30
|
+
'resize-handle'?: (props: any) => any;
|
|
31
|
+
} & {
|
|
32
|
+
'vertex-handle'?: (props: any) => any;
|
|
33
|
+
} & {
|
|
34
|
+
'selection-menu'?: (props: {
|
|
35
|
+
annotation: any;
|
|
36
|
+
selected: any;
|
|
37
|
+
rect: any;
|
|
38
|
+
menuWrapperProps: any;
|
|
39
|
+
}) => any;
|
|
40
|
+
};
|
|
41
|
+
emit: {};
|
|
42
|
+
}>) => import('vue').VNode & {
|
|
43
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
44
|
+
};
|
|
45
|
+
export default _default;
|
|
46
|
+
type __VLS_PrettifyLocal<T> = {
|
|
47
|
+
[K in keyof T as K]: T[K];
|
|
48
|
+
} & {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ResizeHandleUI, VertexHandleUI } from '../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
pageIndex: number;
|
|
4
|
+
scale: number;
|
|
5
|
+
pageWidth: number;
|
|
6
|
+
pageHeight: number;
|
|
7
|
+
rotation: number;
|
|
8
|
+
resizeUI?: ResizeHandleUI;
|
|
9
|
+
vertexUI?: VertexHandleUI;
|
|
10
|
+
selectionOutlineColor?: string;
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_6: any, __VLS_9: any, __VLS_12: any;
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
'selection-menu'?: (props: typeof __VLS_6) => any;
|
|
15
|
+
} & {
|
|
16
|
+
'resize-handle'?: (props: typeof __VLS_9) => any;
|
|
17
|
+
} & {
|
|
18
|
+
'vertex-handle'?: (props: typeof __VLS_12) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_component: 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>;
|
|
21
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
pageIndex: number;
|
|
3
|
+
scale: number;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: 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>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PdfAnnotationBorderStyle, Rect } from '@embedpdf/models';
|
|
2
|
+
interface CircleProps {
|
|
3
|
+
isSelected: boolean;
|
|
4
|
+
color?: string;
|
|
5
|
+
strokeColor?: string;
|
|
6
|
+
opacity?: number;
|
|
7
|
+
strokeWidth: number;
|
|
8
|
+
strokeStyle?: PdfAnnotationBorderStyle;
|
|
9
|
+
strokeDashArray?: number[];
|
|
10
|
+
rect: Rect;
|
|
11
|
+
scale: number;
|
|
12
|
+
onClick?: (e: PointerEvent | TouchEvent) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: import('vue').DefineComponent<CircleProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CircleProps> & Readonly<{}>, {
|
|
15
|
+
color: string;
|
|
16
|
+
opacity: number;
|
|
17
|
+
strokeStyle: PdfAnnotationBorderStyle;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PdfFreeTextAnnoObject } from '@embedpdf/models';
|
|
2
|
+
import { TrackedAnnotation } from '../../../lib/index.ts';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
isSelected: boolean;
|
|
5
|
+
isEditing: boolean;
|
|
6
|
+
annotation: TrackedAnnotation<PdfFreeTextAnnoObject>;
|
|
7
|
+
pageIndex: number;
|
|
8
|
+
scale: number;
|
|
9
|
+
onClick?: (e: PointerEvent | TouchEvent) => void;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: 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>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Circle } from './circle.vue';
|
|
2
|
+
export { default as FreeText } from './free-text.vue';
|
|
3
|
+
export { default as Ink } from './ink.vue';
|
|
4
|
+
export { default as Line } from './line.vue';
|
|
5
|
+
export { default as Polygon } from './polygon.vue';
|
|
6
|
+
export { default as Polyline } from './polyline.vue';
|
|
7
|
+
export { default as Square } from './square.vue';
|
|
8
|
+
export { default as Stamp } from './stamp.vue';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PdfInkListObject, Rect } from '@embedpdf/models';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
isSelected: boolean;
|
|
4
|
+
color?: string;
|
|
5
|
+
opacity?: number;
|
|
6
|
+
strokeWidth: number;
|
|
7
|
+
inkList: PdfInkListObject[];
|
|
8
|
+
rect: Rect;
|
|
9
|
+
scale: number;
|
|
10
|
+
onClick?: (e: PointerEvent | TouchEvent) => void;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
13
|
+
color: string;
|
|
14
|
+
opacity: number;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Rect, LinePoints, LineEndings, PdfAnnotationBorderStyle } from '@embedpdf/models';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
color?: string;
|
|
4
|
+
opacity?: number;
|
|
5
|
+
strokeWidth: number;
|
|
6
|
+
strokeColor?: string;
|
|
7
|
+
strokeStyle?: PdfAnnotationBorderStyle;
|
|
8
|
+
strokeDashArray?: number[];
|
|
9
|
+
rect: Rect;
|
|
10
|
+
linePoints: LinePoints;
|
|
11
|
+
lineEndings?: LineEndings;
|
|
12
|
+
scale: number;
|
|
13
|
+
onClick?: (e: PointerEvent | TouchEvent) => void;
|
|
14
|
+
isSelected: boolean;
|
|
15
|
+
};
|
|
16
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
17
|
+
color: string;
|
|
18
|
+
opacity: number;
|
|
19
|
+
strokeColor: string;
|
|
20
|
+
strokeStyle: PdfAnnotationBorderStyle;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Rect, Position, PdfAnnotationBorderStyle } from '@embedpdf/models';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
rect: Rect;
|
|
4
|
+
vertices: Position[];
|
|
5
|
+
color?: string;
|
|
6
|
+
strokeColor?: string;
|
|
7
|
+
opacity?: number;
|
|
8
|
+
strokeWidth: number;
|
|
9
|
+
strokeStyle?: PdfAnnotationBorderStyle;
|
|
10
|
+
strokeDashArray?: number[];
|
|
11
|
+
scale: number;
|
|
12
|
+
isSelected: boolean;
|
|
13
|
+
onClick?: (e: PointerEvent | TouchEvent) => void;
|
|
14
|
+
currentVertex?: Position;
|
|
15
|
+
handleSize?: number;
|
|
16
|
+
};
|
|
17
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
color: string;
|
|
19
|
+
opacity: number;
|
|
20
|
+
strokeColor: string;
|
|
21
|
+
strokeStyle: PdfAnnotationBorderStyle;
|
|
22
|
+
handleSize: number;
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Rect, Position, LineEndings } from '@embedpdf/models';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
rect: Rect;
|
|
4
|
+
vertices: Position[];
|
|
5
|
+
color?: string;
|
|
6
|
+
strokeColor?: string;
|
|
7
|
+
opacity?: number;
|
|
8
|
+
strokeWidth: number;
|
|
9
|
+
scale: number;
|
|
10
|
+
isSelected: boolean;
|
|
11
|
+
onClick?: (e: PointerEvent | TouchEvent) => void;
|
|
12
|
+
lineEndings?: LineEndings;
|
|
13
|
+
};
|
|
14
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
color: string;
|
|
16
|
+
opacity: number;
|
|
17
|
+
strokeColor: string;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PdfAnnotationBorderStyle, Rect } from '@embedpdf/models';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
isSelected: boolean;
|
|
4
|
+
color?: string;
|
|
5
|
+
strokeColor?: string;
|
|
6
|
+
opacity?: number;
|
|
7
|
+
strokeWidth: number;
|
|
8
|
+
strokeStyle?: PdfAnnotationBorderStyle;
|
|
9
|
+
strokeDashArray?: number[];
|
|
10
|
+
rect: Rect;
|
|
11
|
+
scale: number;
|
|
12
|
+
onClick?: (e: PointerEvent | TouchEvent) => void;
|
|
13
|
+
};
|
|
14
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
color: string;
|
|
16
|
+
opacity: number;
|
|
17
|
+
strokeStyle: PdfAnnotationBorderStyle;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PdfStampAnnoObject } from '@embedpdf/models';
|
|
2
|
+
import { TrackedAnnotation } from '../../../lib/index.ts';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
isSelected: boolean;
|
|
5
|
+
annotation: TrackedAnnotation<PdfStampAnnoObject>;
|
|
6
|
+
pageIndex: number;
|
|
7
|
+
scale: number;
|
|
8
|
+
onClick: (e: PointerEvent | TouchEvent) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: 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>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ResizeHandleUI, VertexHandleUI } from '../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
pageIndex: number;
|
|
4
|
+
scale: number;
|
|
5
|
+
rotation: number;
|
|
6
|
+
pageWidth: number;
|
|
7
|
+
pageHeight: number;
|
|
8
|
+
resizeUI?: ResizeHandleUI;
|
|
9
|
+
vertexUI?: VertexHandleUI;
|
|
10
|
+
selectionOutlineColor?: string;
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_12: any, __VLS_15: any, __VLS_18: any, __VLS_31: any, __VLS_34: any, __VLS_37: any, __VLS_50: any, __VLS_53: any, __VLS_56: any, __VLS_69: any, __VLS_72: any, __VLS_75: any, __VLS_88: any, __VLS_91: any, __VLS_94: any, __VLS_107: any, __VLS_110: any, __VLS_113: any, __VLS_126: any, __VLS_129: any, __VLS_132: any, __VLS_145: any, __VLS_148: any, __VLS_151: any, __VLS_164: any, __VLS_177: any, __VLS_190: any, __VLS_203: any;
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
'selection-menu'?: (props: typeof __VLS_12) => any;
|
|
15
|
+
} & {
|
|
16
|
+
'resize-handle'?: (props: typeof __VLS_15) => any;
|
|
17
|
+
} & {
|
|
18
|
+
'vertex-handle'?: (props: typeof __VLS_18) => any;
|
|
19
|
+
} & {
|
|
20
|
+
'selection-menu'?: (props: typeof __VLS_31) => any;
|
|
21
|
+
} & {
|
|
22
|
+
'resize-handle'?: (props: typeof __VLS_34) => any;
|
|
23
|
+
} & {
|
|
24
|
+
'vertex-handle'?: (props: typeof __VLS_37) => any;
|
|
25
|
+
} & {
|
|
26
|
+
'selection-menu'?: (props: typeof __VLS_50) => any;
|
|
27
|
+
} & {
|
|
28
|
+
'resize-handle'?: (props: typeof __VLS_53) => any;
|
|
29
|
+
} & {
|
|
30
|
+
'vertex-handle'?: (props: typeof __VLS_56) => any;
|
|
31
|
+
} & {
|
|
32
|
+
'selection-menu'?: (props: typeof __VLS_69) => any;
|
|
33
|
+
} & {
|
|
34
|
+
'resize-handle'?: (props: typeof __VLS_72) => any;
|
|
35
|
+
} & {
|
|
36
|
+
'vertex-handle'?: (props: typeof __VLS_75) => any;
|
|
37
|
+
} & {
|
|
38
|
+
'selection-menu'?: (props: typeof __VLS_88) => any;
|
|
39
|
+
} & {
|
|
40
|
+
'resize-handle'?: (props: typeof __VLS_91) => any;
|
|
41
|
+
} & {
|
|
42
|
+
'vertex-handle'?: (props: typeof __VLS_94) => any;
|
|
43
|
+
} & {
|
|
44
|
+
'selection-menu'?: (props: typeof __VLS_107) => any;
|
|
45
|
+
} & {
|
|
46
|
+
'resize-handle'?: (props: typeof __VLS_110) => any;
|
|
47
|
+
} & {
|
|
48
|
+
'vertex-handle'?: (props: typeof __VLS_113) => any;
|
|
49
|
+
} & {
|
|
50
|
+
'selection-menu'?: (props: typeof __VLS_126) => any;
|
|
51
|
+
} & {
|
|
52
|
+
'resize-handle'?: (props: typeof __VLS_129) => any;
|
|
53
|
+
} & {
|
|
54
|
+
'vertex-handle'?: (props: typeof __VLS_132) => any;
|
|
55
|
+
} & {
|
|
56
|
+
'selection-menu'?: (props: typeof __VLS_145) => any;
|
|
57
|
+
} & {
|
|
58
|
+
'resize-handle'?: (props: typeof __VLS_148) => any;
|
|
59
|
+
} & {
|
|
60
|
+
'vertex-handle'?: (props: typeof __VLS_151) => any;
|
|
61
|
+
} & {
|
|
62
|
+
'selection-menu'?: (props: typeof __VLS_164) => any;
|
|
63
|
+
} & {
|
|
64
|
+
'selection-menu'?: (props: typeof __VLS_177) => any;
|
|
65
|
+
} & {
|
|
66
|
+
'selection-menu'?: (props: typeof __VLS_190) => any;
|
|
67
|
+
} & {
|
|
68
|
+
'selection-menu'?: (props: typeof __VLS_203) => any;
|
|
69
|
+
};
|
|
70
|
+
declare const __VLS_component: 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>;
|
|
71
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
72
|
+
export default _default;
|
|
73
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
74
|
+
new (): {
|
|
75
|
+
$slots: S;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as AnnotationContainer } from './annotation-container.vue';
|
|
2
|
+
export { default as AnnotationLayer } from './annotation-layer.vue';
|
|
3
|
+
export { default as AnnotationPaintLayer } from './annotation-paint-layer.vue';
|
|
4
|
+
export { default as Annotations } from './annotations.vue';
|
|
5
|
+
export { default as PreviewRenderer } from './preview-renderer.vue';
|
|
6
|
+
export { default as RenderAnnotation } from './render-annotation.vue';
|
|
7
|
+
export { default as TextMarkup } from './text-markup.vue';
|
|
8
|
+
export * from './annotations';
|
|
9
|
+
export * from './text-markup';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AnyPreviewState } from '../../lib/index.ts';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
preview: AnyPreviewState;
|
|
4
|
+
scale: number;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: 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>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { PdfAnnotationObject } from '@embedpdf/models';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
pageIndex: number;
|
|
5
|
+
annotation: PdfAnnotationObject;
|
|
6
|
+
scaleFactor?: number;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
+
scaleFactor: number;
|
|
11
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Rect } from '@embedpdf/models';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
color?: string;
|
|
4
|
+
opacity?: number;
|
|
5
|
+
segmentRects: Rect[];
|
|
6
|
+
rect?: Rect;
|
|
7
|
+
scale: number;
|
|
8
|
+
onClick?: (e: PointerEvent | TouchEvent) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
color: string;
|
|
12
|
+
opacity: number;
|
|
13
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export default _default;
|