@embedpdf/plugin-annotation 2.9.0 → 2.10.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 +3082 -2656
- package/dist/index.js.map +1 -1
- package/dist/lib/actions.d.ts +25 -6
- package/dist/lib/annotation-plugin.d.ts +15 -12
- package/dist/lib/handlers/index.d.ts +1 -0
- package/dist/lib/handlers/link.handler.d.ts +3 -0
- package/dist/lib/handlers/types.d.ts +9 -1
- package/dist/lib/helpers.d.ts +12 -5
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/reducer.d.ts +1 -1
- package/dist/lib/tools/default-tools.d.ts +149 -299
- package/dist/lib/tools/tools-utils.d.ts +448 -22
- package/dist/lib/tools/types.d.ts +37 -2
- package/dist/lib/types.d.ts +108 -24
- package/dist/preact/index.cjs +1 -1
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.js +213 -92
- 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 +213 -92
- package/dist/react/index.js.map +1 -1
- package/dist/shared/components/annotation-navigation-handler.d.ts +1 -0
- package/dist/shared/components/annotations/link-locked.d.ts +3 -0
- package/dist/shared/components/annotations/stamp.d.ts +1 -1
- package/dist/shared/components/preview-renderer.d.ts +4 -3
- package/dist/shared/components/types.d.ts +21 -4
- package/dist/shared/hooks/index.d.ts +1 -0
- package/dist/shared/hooks/use-annotation.d.ts +2 -2
- package/dist/shared/hooks/use-ios-zoom-prevention.d.ts +16 -0
- package/dist/shared-preact/components/annotation-navigation-handler.d.ts +1 -0
- package/dist/shared-preact/components/annotations/link-locked.d.ts +3 -0
- package/dist/shared-preact/components/annotations/stamp.d.ts +1 -1
- package/dist/shared-preact/components/preview-renderer.d.ts +4 -3
- package/dist/shared-preact/components/types.d.ts +21 -4
- package/dist/shared-preact/hooks/index.d.ts +1 -0
- package/dist/shared-preact/hooks/use-annotation.d.ts +2 -2
- package/dist/shared-preact/hooks/use-ios-zoom-prevention.d.ts +15 -0
- package/dist/shared-react/components/annotation-navigation-handler.d.ts +1 -0
- package/dist/shared-react/components/annotations/link-locked.d.ts +3 -0
- package/dist/shared-react/components/annotations/stamp.d.ts +1 -1
- package/dist/shared-react/components/preview-renderer.d.ts +4 -3
- package/dist/shared-react/components/types.d.ts +21 -4
- package/dist/shared-react/hooks/index.d.ts +1 -0
- package/dist/shared-react/hooks/use-annotation.d.ts +2 -2
- package/dist/shared-react/hooks/use-ios-zoom-prevention.d.ts +16 -0
- package/dist/svelte/components/AnnotationNavigationHandler.svelte.d.ts +3 -0
- package/dist/svelte/components/PreviewRenderer.svelte.d.ts +3 -2
- package/dist/svelte/components/annotations/LinkLockedMode.svelte.d.ts +5 -0
- package/dist/svelte/components/annotations/LinkPreview.svelte.d.ts +10 -0
- package/dist/svelte/components/annotations/Stamp.svelte.d.ts +1 -1
- package/dist/svelte/context/renderer-registry.svelte.d.ts +1 -1
- package/dist/svelte/context/types.d.ts +20 -3
- package/dist/svelte/hooks/index.d.ts +1 -0
- package/dist/svelte/hooks/use-annotation.svelte.d.ts +1 -1
- package/dist/svelte/hooks/use-ios-zoom-prevention.svelte.d.ts +6 -0
- package/dist/svelte/index.cjs +1 -1
- package/dist/svelte/index.cjs.map +1 -1
- package/dist/svelte/index.js +422 -234
- package/dist/svelte/index.js.map +1 -1
- package/dist/vue/components/annotation-navigation-handler.vue.d.ts +3 -0
- package/dist/vue/components/annotations/link-locked.vue.d.ts +5 -0
- package/dist/vue/components/annotations/link-preview.vue.d.ts +10 -0
- package/dist/vue/components/annotations/stamp.vue.d.ts +2 -2
- package/dist/vue/components/preview-renderer.vue.d.ts +3 -2
- package/dist/vue/context/renderer-registry.d.ts +1 -1
- package/dist/vue/context/types.d.ts +20 -3
- package/dist/vue/hooks/index.d.ts +1 -0
- package/dist/vue/hooks/use-annotation.d.ts +24 -2
- package/dist/vue/hooks/use-ios-zoom-prevention.d.ts +7 -0
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.js +433 -277
- package/dist/vue/index.js.map +1 -1
- package/package.json +12 -10
|
@@ -1,32 +1,10 @@
|
|
|
1
1
|
import { PdfAnnotationBorderStyle, PdfAnnotationLineEnding, PdfAnnotationSubtype, PdfBlendMode, PdfStandardFont, PdfTextAlignment, PdfVerticalAlignment } from '@embedpdf/models';
|
|
2
|
+
import { ToolMapFromList } from './types';
|
|
2
3
|
export declare const defaultTools: ({
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
matchScore: (annotation: import('@embedpdf/models').PdfAnnotationObject) => number;
|
|
6
|
-
defaults: Partial<import('@embedpdf/models').PdfInkAnnoObject>;
|
|
7
|
-
interaction: {
|
|
8
|
-
mode?: string;
|
|
9
|
-
exclusive: boolean;
|
|
10
|
-
cursor?: string;
|
|
11
|
-
textSelection?: boolean;
|
|
12
|
-
showSelectionRects?: boolean;
|
|
13
|
-
isDraggable?: import('./types').DynamicBooleanProp;
|
|
14
|
-
isResizable?: import('./types').DynamicBooleanProp;
|
|
15
|
-
isRotatable?: import('./types').DynamicBooleanProp;
|
|
16
|
-
lockAspectRatio?: import('./types').DynamicBooleanProp;
|
|
17
|
-
lockGroupAspectRatio?: import('./types').DynamicBooleanProp;
|
|
18
|
-
isGroupDraggable?: import('./types').DynamicBooleanProp;
|
|
19
|
-
isGroupResizable?: import('./types').DynamicBooleanProp;
|
|
20
|
-
isGroupRotatable?: import('./types').DynamicBooleanProp;
|
|
21
|
-
};
|
|
22
|
-
behavior?: ({
|
|
23
|
-
deactivateToolAfterCreate?: boolean;
|
|
24
|
-
selectAfterCreate?: boolean;
|
|
25
|
-
useAppearanceStream?: boolean;
|
|
26
|
-
} & import('./types').InkBehavior) | undefined;
|
|
27
|
-
} | {
|
|
28
4
|
id: "highlight";
|
|
29
5
|
name: string;
|
|
6
|
+
labelKey: string;
|
|
7
|
+
categories: string[];
|
|
30
8
|
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 1;
|
|
31
9
|
interaction: {
|
|
32
10
|
exclusive: false;
|
|
@@ -36,10 +14,6 @@ export declare const defaultTools: ({
|
|
|
36
14
|
isRotatable: false;
|
|
37
15
|
isGroupDraggable: false;
|
|
38
16
|
isGroupResizable: false;
|
|
39
|
-
showSelectionRects?: undefined;
|
|
40
|
-
cursor?: undefined;
|
|
41
|
-
lockAspectRatio?: undefined;
|
|
42
|
-
lockGroupAspectRatio?: undefined;
|
|
43
17
|
};
|
|
44
18
|
defaults: {
|
|
45
19
|
type: PdfAnnotationSubtype.HIGHLIGHT;
|
|
@@ -47,23 +21,12 @@ export declare const defaultTools: ({
|
|
|
47
21
|
color: string;
|
|
48
22
|
opacity: number;
|
|
49
23
|
blendMode: PdfBlendMode.Multiply;
|
|
50
|
-
|
|
51
|
-
strokeWidth?: undefined;
|
|
52
|
-
strokeStyle?: undefined;
|
|
53
|
-
lineEndings?: undefined;
|
|
54
|
-
contents?: undefined;
|
|
55
|
-
fontSize?: undefined;
|
|
56
|
-
fontColor?: undefined;
|
|
57
|
-
fontFamily?: undefined;
|
|
58
|
-
textAlign?: undefined;
|
|
59
|
-
verticalAlign?: undefined;
|
|
60
|
-
backgroundColor?: undefined;
|
|
61
|
-
};
|
|
62
|
-
clickBehavior?: undefined;
|
|
63
|
-
behavior?: undefined;
|
|
24
|
+
};
|
|
64
25
|
} | {
|
|
65
26
|
id: "underline";
|
|
66
27
|
name: string;
|
|
28
|
+
labelKey: string;
|
|
29
|
+
categories: string[];
|
|
67
30
|
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 1;
|
|
68
31
|
interaction: {
|
|
69
32
|
exclusive: false;
|
|
@@ -73,10 +36,6 @@ export declare const defaultTools: ({
|
|
|
73
36
|
isRotatable: false;
|
|
74
37
|
isGroupDraggable: false;
|
|
75
38
|
isGroupResizable: false;
|
|
76
|
-
showSelectionRects?: undefined;
|
|
77
|
-
cursor?: undefined;
|
|
78
|
-
lockAspectRatio?: undefined;
|
|
79
|
-
lockGroupAspectRatio?: undefined;
|
|
80
39
|
};
|
|
81
40
|
defaults: {
|
|
82
41
|
type: PdfAnnotationSubtype.UNDERLINE;
|
|
@@ -84,23 +43,12 @@ export declare const defaultTools: ({
|
|
|
84
43
|
color: string;
|
|
85
44
|
opacity: number;
|
|
86
45
|
blendMode?: undefined;
|
|
87
|
-
|
|
88
|
-
strokeWidth?: undefined;
|
|
89
|
-
strokeStyle?: undefined;
|
|
90
|
-
lineEndings?: undefined;
|
|
91
|
-
contents?: undefined;
|
|
92
|
-
fontSize?: undefined;
|
|
93
|
-
fontColor?: undefined;
|
|
94
|
-
fontFamily?: undefined;
|
|
95
|
-
textAlign?: undefined;
|
|
96
|
-
verticalAlign?: undefined;
|
|
97
|
-
backgroundColor?: undefined;
|
|
98
|
-
};
|
|
99
|
-
clickBehavior?: undefined;
|
|
100
|
-
behavior?: undefined;
|
|
46
|
+
};
|
|
101
47
|
} | {
|
|
102
48
|
id: "strikeout";
|
|
103
49
|
name: string;
|
|
50
|
+
labelKey: string;
|
|
51
|
+
categories: string[];
|
|
104
52
|
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 1;
|
|
105
53
|
interaction: {
|
|
106
54
|
exclusive: false;
|
|
@@ -110,10 +58,6 @@ export declare const defaultTools: ({
|
|
|
110
58
|
isRotatable: false;
|
|
111
59
|
isGroupDraggable: false;
|
|
112
60
|
isGroupResizable: false;
|
|
113
|
-
showSelectionRects?: undefined;
|
|
114
|
-
cursor?: undefined;
|
|
115
|
-
lockAspectRatio?: undefined;
|
|
116
|
-
lockGroupAspectRatio?: undefined;
|
|
117
61
|
};
|
|
118
62
|
defaults: {
|
|
119
63
|
type: PdfAnnotationSubtype.STRIKEOUT;
|
|
@@ -121,23 +65,12 @@ export declare const defaultTools: ({
|
|
|
121
65
|
color: string;
|
|
122
66
|
opacity: number;
|
|
123
67
|
blendMode?: undefined;
|
|
124
|
-
|
|
125
|
-
strokeWidth?: undefined;
|
|
126
|
-
strokeStyle?: undefined;
|
|
127
|
-
lineEndings?: undefined;
|
|
128
|
-
contents?: undefined;
|
|
129
|
-
fontSize?: undefined;
|
|
130
|
-
fontColor?: undefined;
|
|
131
|
-
fontFamily?: undefined;
|
|
132
|
-
textAlign?: undefined;
|
|
133
|
-
verticalAlign?: undefined;
|
|
134
|
-
backgroundColor?: undefined;
|
|
135
|
-
};
|
|
136
|
-
clickBehavior?: undefined;
|
|
137
|
-
behavior?: undefined;
|
|
68
|
+
};
|
|
138
69
|
} | {
|
|
139
70
|
id: "squiggly";
|
|
140
71
|
name: string;
|
|
72
|
+
labelKey: string;
|
|
73
|
+
categories: string[];
|
|
141
74
|
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 1;
|
|
142
75
|
interaction: {
|
|
143
76
|
exclusive: false;
|
|
@@ -147,10 +80,6 @@ export declare const defaultTools: ({
|
|
|
147
80
|
isRotatable: false;
|
|
148
81
|
isGroupDraggable: false;
|
|
149
82
|
isGroupResizable: false;
|
|
150
|
-
showSelectionRects?: undefined;
|
|
151
|
-
cursor?: undefined;
|
|
152
|
-
lockAspectRatio?: undefined;
|
|
153
|
-
lockGroupAspectRatio?: undefined;
|
|
154
83
|
};
|
|
155
84
|
defaults: {
|
|
156
85
|
type: PdfAnnotationSubtype.SQUIGGLY;
|
|
@@ -158,23 +87,12 @@ export declare const defaultTools: ({
|
|
|
158
87
|
color: string;
|
|
159
88
|
opacity: number;
|
|
160
89
|
blendMode?: undefined;
|
|
161
|
-
|
|
162
|
-
strokeWidth?: undefined;
|
|
163
|
-
strokeStyle?: undefined;
|
|
164
|
-
lineEndings?: undefined;
|
|
165
|
-
contents?: undefined;
|
|
166
|
-
fontSize?: undefined;
|
|
167
|
-
fontColor?: undefined;
|
|
168
|
-
fontFamily?: undefined;
|
|
169
|
-
textAlign?: undefined;
|
|
170
|
-
verticalAlign?: undefined;
|
|
171
|
-
backgroundColor?: undefined;
|
|
172
|
-
};
|
|
173
|
-
clickBehavior?: undefined;
|
|
174
|
-
behavior?: undefined;
|
|
90
|
+
};
|
|
175
91
|
} | {
|
|
176
92
|
id: "insertText";
|
|
177
93
|
name: string;
|
|
94
|
+
labelKey: string;
|
|
95
|
+
categories: string[];
|
|
178
96
|
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 1 | 2;
|
|
179
97
|
interaction: {
|
|
180
98
|
exclusive: false;
|
|
@@ -185,33 +103,19 @@ export declare const defaultTools: ({
|
|
|
185
103
|
isRotatable: false;
|
|
186
104
|
isGroupDraggable: false;
|
|
187
105
|
isGroupResizable: false;
|
|
188
|
-
cursor?: undefined;
|
|
189
|
-
lockAspectRatio?: undefined;
|
|
190
|
-
lockGroupAspectRatio?: undefined;
|
|
191
106
|
};
|
|
192
107
|
defaults: {
|
|
193
108
|
type: PdfAnnotationSubtype.CARET;
|
|
194
109
|
strokeColor: string;
|
|
195
110
|
opacity: number;
|
|
196
111
|
intent: string;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
strokeWidth?: undefined;
|
|
200
|
-
strokeStyle?: undefined;
|
|
201
|
-
lineEndings?: undefined;
|
|
202
|
-
contents?: undefined;
|
|
203
|
-
fontSize?: undefined;
|
|
204
|
-
fontColor?: undefined;
|
|
205
|
-
fontFamily?: undefined;
|
|
206
|
-
textAlign?: undefined;
|
|
207
|
-
verticalAlign?: undefined;
|
|
208
|
-
backgroundColor?: undefined;
|
|
209
|
-
};
|
|
210
|
-
clickBehavior?: undefined;
|
|
211
|
-
behavior?: undefined;
|
|
112
|
+
};
|
|
113
|
+
selectionHandler: import('..').SelectionHandlerFactory<import('@embedpdf/models').PdfCaretAnnoObject>;
|
|
212
114
|
} | {
|
|
213
115
|
id: "replaceText";
|
|
214
116
|
name: string;
|
|
117
|
+
labelKey: string;
|
|
118
|
+
categories: string[];
|
|
215
119
|
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 2;
|
|
216
120
|
interaction: {
|
|
217
121
|
exclusive: false;
|
|
@@ -221,34 +125,79 @@ export declare const defaultTools: ({
|
|
|
221
125
|
isRotatable: false;
|
|
222
126
|
isGroupDraggable: false;
|
|
223
127
|
isGroupResizable: false;
|
|
224
|
-
showSelectionRects?: undefined;
|
|
225
|
-
cursor?: undefined;
|
|
226
|
-
lockAspectRatio?: undefined;
|
|
227
|
-
lockGroupAspectRatio?: undefined;
|
|
228
128
|
};
|
|
229
129
|
defaults: {
|
|
230
130
|
type: PdfAnnotationSubtype.STRIKEOUT;
|
|
231
131
|
strokeColor: string;
|
|
232
132
|
opacity: number;
|
|
233
133
|
intent: string;
|
|
234
|
-
|
|
134
|
+
};
|
|
135
|
+
selectionHandler: import('..').SelectionHandlerFactory<import('@embedpdf/models').PdfStrikeOutAnnoObject>;
|
|
136
|
+
} | {
|
|
137
|
+
id: "ink";
|
|
138
|
+
name: string;
|
|
139
|
+
labelKey: string;
|
|
140
|
+
categories: string[];
|
|
141
|
+
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 5;
|
|
142
|
+
interaction: {
|
|
143
|
+
exclusive: false;
|
|
144
|
+
cursor: string;
|
|
145
|
+
isDraggable: true;
|
|
146
|
+
isResizable: true;
|
|
147
|
+
lockAspectRatio: false;
|
|
148
|
+
lockGroupAspectRatio?: undefined;
|
|
149
|
+
};
|
|
150
|
+
defaults: {
|
|
151
|
+
type: PdfAnnotationSubtype.INK;
|
|
152
|
+
strokeColor: string;
|
|
153
|
+
color: string;
|
|
154
|
+
opacity: number;
|
|
155
|
+
strokeWidth: number;
|
|
156
|
+
intent?: undefined;
|
|
235
157
|
blendMode?: undefined;
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
158
|
+
};
|
|
159
|
+
behavior: {
|
|
160
|
+
commitDelay: number;
|
|
161
|
+
smartLineRecognition?: undefined;
|
|
162
|
+
smartLineThreshold?: undefined;
|
|
163
|
+
};
|
|
164
|
+
transform: import('..').PatchFunction<import('@embedpdf/models').PdfInkAnnoObject>;
|
|
165
|
+
pointerHandler: import('..').HandlerFactory<import('@embedpdf/models').PdfInkAnnoObject>;
|
|
166
|
+
} | {
|
|
167
|
+
id: "inkHighlighter";
|
|
168
|
+
name: string;
|
|
169
|
+
labelKey: string;
|
|
170
|
+
categories: string[];
|
|
171
|
+
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 10;
|
|
172
|
+
interaction: {
|
|
173
|
+
exclusive: false;
|
|
174
|
+
cursor: string;
|
|
175
|
+
isDraggable: true;
|
|
176
|
+
isResizable: true;
|
|
177
|
+
lockAspectRatio: false;
|
|
178
|
+
lockGroupAspectRatio: (a: import('@embedpdf/models').PdfAnnotationObject) => boolean;
|
|
179
|
+
};
|
|
180
|
+
defaults: {
|
|
181
|
+
type: PdfAnnotationSubtype.INK;
|
|
182
|
+
intent: string;
|
|
183
|
+
strokeColor: string;
|
|
184
|
+
color: string;
|
|
185
|
+
opacity: number;
|
|
186
|
+
strokeWidth: number;
|
|
187
|
+
blendMode: PdfBlendMode.Multiply;
|
|
188
|
+
};
|
|
189
|
+
behavior: {
|
|
190
|
+
commitDelay: number;
|
|
191
|
+
smartLineRecognition: true;
|
|
192
|
+
smartLineThreshold: number;
|
|
193
|
+
};
|
|
194
|
+
transform: import('..').PatchFunction<import('@embedpdf/models').PdfInkAnnoObject>;
|
|
195
|
+
pointerHandler: import('..').HandlerFactory<import('@embedpdf/models').PdfInkAnnoObject>;
|
|
249
196
|
} | {
|
|
250
197
|
id: "circle";
|
|
251
198
|
name: string;
|
|
199
|
+
labelKey: string;
|
|
200
|
+
categories: string[];
|
|
252
201
|
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 1;
|
|
253
202
|
interaction: {
|
|
254
203
|
exclusive: false;
|
|
@@ -257,11 +206,6 @@ export declare const defaultTools: ({
|
|
|
257
206
|
isResizable: true;
|
|
258
207
|
lockAspectRatio: false;
|
|
259
208
|
lockGroupAspectRatio: (a: import('@embedpdf/models').PdfAnnotationObject) => boolean;
|
|
260
|
-
textSelection?: undefined;
|
|
261
|
-
isRotatable?: undefined;
|
|
262
|
-
isGroupDraggable?: undefined;
|
|
263
|
-
isGroupResizable?: undefined;
|
|
264
|
-
showSelectionRects?: undefined;
|
|
265
209
|
};
|
|
266
210
|
defaults: {
|
|
267
211
|
type: PdfAnnotationSubtype.CIRCLE;
|
|
@@ -270,16 +214,6 @@ export declare const defaultTools: ({
|
|
|
270
214
|
strokeWidth: number;
|
|
271
215
|
strokeColor: string;
|
|
272
216
|
strokeStyle: PdfAnnotationBorderStyle.SOLID;
|
|
273
|
-
blendMode?: undefined;
|
|
274
|
-
intent?: undefined;
|
|
275
|
-
lineEndings?: undefined;
|
|
276
|
-
contents?: undefined;
|
|
277
|
-
fontSize?: undefined;
|
|
278
|
-
fontColor?: undefined;
|
|
279
|
-
fontFamily?: undefined;
|
|
280
|
-
textAlign?: undefined;
|
|
281
|
-
verticalAlign?: undefined;
|
|
282
|
-
backgroundColor?: undefined;
|
|
283
217
|
};
|
|
284
218
|
clickBehavior: {
|
|
285
219
|
enabled: true;
|
|
@@ -287,14 +221,14 @@ export declare const defaultTools: ({
|
|
|
287
221
|
width: number;
|
|
288
222
|
height: number;
|
|
289
223
|
};
|
|
290
|
-
defaultLength?: undefined;
|
|
291
|
-
defaultAngle?: undefined;
|
|
292
|
-
defaultContent?: undefined;
|
|
293
224
|
};
|
|
294
|
-
|
|
225
|
+
transform: import('..').PatchFunction<import('@embedpdf/models').PdfCircleAnnoObject>;
|
|
226
|
+
pointerHandler: import('..').HandlerFactory<import('@embedpdf/models').PdfCircleAnnoObject>;
|
|
295
227
|
} | {
|
|
296
228
|
id: "square";
|
|
297
229
|
name: string;
|
|
230
|
+
labelKey: string;
|
|
231
|
+
categories: string[];
|
|
298
232
|
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 1;
|
|
299
233
|
interaction: {
|
|
300
234
|
exclusive: false;
|
|
@@ -303,11 +237,6 @@ export declare const defaultTools: ({
|
|
|
303
237
|
isResizable: true;
|
|
304
238
|
lockAspectRatio: false;
|
|
305
239
|
lockGroupAspectRatio: (a: import('@embedpdf/models').PdfAnnotationObject) => boolean;
|
|
306
|
-
textSelection?: undefined;
|
|
307
|
-
isRotatable?: undefined;
|
|
308
|
-
isGroupDraggable?: undefined;
|
|
309
|
-
isGroupResizable?: undefined;
|
|
310
|
-
showSelectionRects?: undefined;
|
|
311
240
|
};
|
|
312
241
|
defaults: {
|
|
313
242
|
type: PdfAnnotationSubtype.SQUARE;
|
|
@@ -316,16 +245,6 @@ export declare const defaultTools: ({
|
|
|
316
245
|
strokeWidth: number;
|
|
317
246
|
strokeColor: string;
|
|
318
247
|
strokeStyle: PdfAnnotationBorderStyle.SOLID;
|
|
319
|
-
blendMode?: undefined;
|
|
320
|
-
intent?: undefined;
|
|
321
|
-
lineEndings?: undefined;
|
|
322
|
-
contents?: undefined;
|
|
323
|
-
fontSize?: undefined;
|
|
324
|
-
fontColor?: undefined;
|
|
325
|
-
fontFamily?: undefined;
|
|
326
|
-
textAlign?: undefined;
|
|
327
|
-
verticalAlign?: undefined;
|
|
328
|
-
backgroundColor?: undefined;
|
|
329
248
|
};
|
|
330
249
|
clickBehavior: {
|
|
331
250
|
enabled: true;
|
|
@@ -333,15 +252,15 @@ export declare const defaultTools: ({
|
|
|
333
252
|
width: number;
|
|
334
253
|
height: number;
|
|
335
254
|
};
|
|
336
|
-
defaultLength?: undefined;
|
|
337
|
-
defaultAngle?: undefined;
|
|
338
|
-
defaultContent?: undefined;
|
|
339
255
|
};
|
|
340
|
-
|
|
256
|
+
transform: import('..').PatchFunction<import('@embedpdf/models').PdfSquareAnnoObject>;
|
|
257
|
+
pointerHandler: import('..').HandlerFactory<import('@embedpdf/models').PdfSquareAnnoObject>;
|
|
341
258
|
} | {
|
|
342
259
|
id: "line";
|
|
343
260
|
name: string;
|
|
344
|
-
|
|
261
|
+
labelKey: string;
|
|
262
|
+
categories: string[];
|
|
263
|
+
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 5;
|
|
345
264
|
interaction: {
|
|
346
265
|
exclusive: false;
|
|
347
266
|
cursor: string;
|
|
@@ -350,10 +269,6 @@ export declare const defaultTools: ({
|
|
|
350
269
|
lockAspectRatio: false;
|
|
351
270
|
isGroupResizable: true;
|
|
352
271
|
lockGroupAspectRatio: (a: import('@embedpdf/models').PdfAnnotationObject) => boolean;
|
|
353
|
-
textSelection?: undefined;
|
|
354
|
-
isRotatable?: undefined;
|
|
355
|
-
isGroupDraggable?: undefined;
|
|
356
|
-
showSelectionRects?: undefined;
|
|
357
272
|
};
|
|
358
273
|
defaults: {
|
|
359
274
|
type: PdfAnnotationSubtype.LINE;
|
|
@@ -361,29 +276,21 @@ export declare const defaultTools: ({
|
|
|
361
276
|
opacity: number;
|
|
362
277
|
strokeWidth: number;
|
|
363
278
|
strokeColor: string;
|
|
364
|
-
blendMode?: undefined;
|
|
365
279
|
intent?: undefined;
|
|
366
|
-
strokeStyle?: undefined;
|
|
367
280
|
lineEndings?: undefined;
|
|
368
|
-
contents?: undefined;
|
|
369
|
-
fontSize?: undefined;
|
|
370
|
-
fontColor?: undefined;
|
|
371
|
-
fontFamily?: undefined;
|
|
372
|
-
textAlign?: undefined;
|
|
373
|
-
verticalAlign?: undefined;
|
|
374
|
-
backgroundColor?: undefined;
|
|
375
281
|
};
|
|
376
282
|
clickBehavior: {
|
|
377
283
|
enabled: true;
|
|
378
284
|
defaultLength: number;
|
|
379
285
|
defaultAngle: number;
|
|
380
|
-
defaultSize?: undefined;
|
|
381
|
-
defaultContent?: undefined;
|
|
382
286
|
};
|
|
383
|
-
|
|
287
|
+
transform: import('..').PatchFunction<import('@embedpdf/models').PdfLineAnnoObject>;
|
|
288
|
+
pointerHandler: import('..').HandlerFactory<import('@embedpdf/models').PdfLineAnnoObject>;
|
|
384
289
|
} | {
|
|
385
290
|
id: "lineArrow";
|
|
386
291
|
name: string;
|
|
292
|
+
labelKey: string;
|
|
293
|
+
categories: string[];
|
|
387
294
|
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 10;
|
|
388
295
|
interaction: {
|
|
389
296
|
exclusive: false;
|
|
@@ -393,10 +300,6 @@ export declare const defaultTools: ({
|
|
|
393
300
|
lockAspectRatio: false;
|
|
394
301
|
isGroupResizable: true;
|
|
395
302
|
lockGroupAspectRatio: (a: import('@embedpdf/models').PdfAnnotationObject) => boolean;
|
|
396
|
-
textSelection?: undefined;
|
|
397
|
-
isRotatable?: undefined;
|
|
398
|
-
isGroupDraggable?: undefined;
|
|
399
|
-
showSelectionRects?: undefined;
|
|
400
303
|
};
|
|
401
304
|
defaults: {
|
|
402
305
|
type: PdfAnnotationSubtype.LINE;
|
|
@@ -409,27 +312,19 @@ export declare const defaultTools: ({
|
|
|
409
312
|
start: PdfAnnotationLineEnding.None;
|
|
410
313
|
end: PdfAnnotationLineEnding.OpenArrow;
|
|
411
314
|
};
|
|
412
|
-
blendMode?: undefined;
|
|
413
|
-
strokeStyle?: undefined;
|
|
414
|
-
contents?: undefined;
|
|
415
|
-
fontSize?: undefined;
|
|
416
|
-
fontColor?: undefined;
|
|
417
|
-
fontFamily?: undefined;
|
|
418
|
-
textAlign?: undefined;
|
|
419
|
-
verticalAlign?: undefined;
|
|
420
|
-
backgroundColor?: undefined;
|
|
421
315
|
};
|
|
422
316
|
clickBehavior: {
|
|
423
317
|
enabled: true;
|
|
424
318
|
defaultLength: number;
|
|
425
319
|
defaultAngle: number;
|
|
426
|
-
defaultSize?: undefined;
|
|
427
|
-
defaultContent?: undefined;
|
|
428
320
|
};
|
|
429
|
-
|
|
321
|
+
transform: import('..').PatchFunction<import('@embedpdf/models').PdfLineAnnoObject>;
|
|
322
|
+
pointerHandler: import('..').HandlerFactory<import('@embedpdf/models').PdfLineAnnoObject>;
|
|
430
323
|
} | {
|
|
431
324
|
id: "polyline";
|
|
432
325
|
name: string;
|
|
326
|
+
labelKey: string;
|
|
327
|
+
categories: string[];
|
|
433
328
|
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 1;
|
|
434
329
|
interaction: {
|
|
435
330
|
exclusive: false;
|
|
@@ -439,10 +334,6 @@ export declare const defaultTools: ({
|
|
|
439
334
|
lockAspectRatio: false;
|
|
440
335
|
isGroupResizable: true;
|
|
441
336
|
lockGroupAspectRatio: (a: import('@embedpdf/models').PdfAnnotationObject) => boolean;
|
|
442
|
-
textSelection?: undefined;
|
|
443
|
-
isRotatable?: undefined;
|
|
444
|
-
isGroupDraggable?: undefined;
|
|
445
|
-
showSelectionRects?: undefined;
|
|
446
337
|
};
|
|
447
338
|
defaults: {
|
|
448
339
|
type: PdfAnnotationSubtype.POLYLINE;
|
|
@@ -450,23 +341,14 @@ export declare const defaultTools: ({
|
|
|
450
341
|
opacity: number;
|
|
451
342
|
strokeWidth: number;
|
|
452
343
|
strokeColor: string;
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
lineEndings?: undefined;
|
|
457
|
-
contents?: undefined;
|
|
458
|
-
fontSize?: undefined;
|
|
459
|
-
fontColor?: undefined;
|
|
460
|
-
fontFamily?: undefined;
|
|
461
|
-
textAlign?: undefined;
|
|
462
|
-
verticalAlign?: undefined;
|
|
463
|
-
backgroundColor?: undefined;
|
|
464
|
-
};
|
|
465
|
-
clickBehavior?: undefined;
|
|
466
|
-
behavior?: undefined;
|
|
344
|
+
};
|
|
345
|
+
transform: import('..').PatchFunction<import('@embedpdf/models').PdfPolylineAnnoObject>;
|
|
346
|
+
pointerHandler: import('..').HandlerFactory<import('@embedpdf/models').PdfPolylineAnnoObject>;
|
|
467
347
|
} | {
|
|
468
348
|
id: "polygon";
|
|
469
349
|
name: string;
|
|
350
|
+
labelKey: string;
|
|
351
|
+
categories: string[];
|
|
470
352
|
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 1;
|
|
471
353
|
interaction: {
|
|
472
354
|
exclusive: false;
|
|
@@ -476,10 +358,6 @@ export declare const defaultTools: ({
|
|
|
476
358
|
lockAspectRatio: false;
|
|
477
359
|
isGroupResizable: true;
|
|
478
360
|
lockGroupAspectRatio: (a: import('@embedpdf/models').PdfAnnotationObject) => boolean;
|
|
479
|
-
textSelection?: undefined;
|
|
480
|
-
isRotatable?: undefined;
|
|
481
|
-
isGroupDraggable?: undefined;
|
|
482
|
-
showSelectionRects?: undefined;
|
|
483
361
|
};
|
|
484
362
|
defaults: {
|
|
485
363
|
type: PdfAnnotationSubtype.POLYGON;
|
|
@@ -487,23 +365,14 @@ export declare const defaultTools: ({
|
|
|
487
365
|
opacity: number;
|
|
488
366
|
strokeWidth: number;
|
|
489
367
|
strokeColor: string;
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
lineEndings?: undefined;
|
|
494
|
-
contents?: undefined;
|
|
495
|
-
fontSize?: undefined;
|
|
496
|
-
fontColor?: undefined;
|
|
497
|
-
fontFamily?: undefined;
|
|
498
|
-
textAlign?: undefined;
|
|
499
|
-
verticalAlign?: undefined;
|
|
500
|
-
backgroundColor?: undefined;
|
|
501
|
-
};
|
|
502
|
-
clickBehavior?: undefined;
|
|
503
|
-
behavior?: undefined;
|
|
368
|
+
};
|
|
369
|
+
transform: import('..').PatchFunction<import('@embedpdf/models').PdfPolygonAnnoObject>;
|
|
370
|
+
pointerHandler: import('..').HandlerFactory<import('@embedpdf/models').PdfPolygonAnnoObject>;
|
|
504
371
|
} | {
|
|
505
372
|
id: "textComment";
|
|
506
373
|
name: string;
|
|
374
|
+
labelKey: string;
|
|
375
|
+
categories: string[];
|
|
507
376
|
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 1;
|
|
508
377
|
interaction: {
|
|
509
378
|
exclusive: false;
|
|
@@ -511,40 +380,21 @@ export declare const defaultTools: ({
|
|
|
511
380
|
isDraggable: true;
|
|
512
381
|
isResizable: false;
|
|
513
382
|
isRotatable: false;
|
|
514
|
-
textSelection?: undefined;
|
|
515
|
-
isGroupDraggable?: undefined;
|
|
516
|
-
isGroupResizable?: undefined;
|
|
517
|
-
showSelectionRects?: undefined;
|
|
518
|
-
lockAspectRatio?: undefined;
|
|
519
|
-
lockGroupAspectRatio?: undefined;
|
|
520
383
|
};
|
|
521
384
|
defaults: {
|
|
522
385
|
type: PdfAnnotationSubtype.TEXT;
|
|
523
386
|
strokeColor: string;
|
|
524
387
|
opacity: number;
|
|
525
|
-
color?: undefined;
|
|
526
|
-
blendMode?: undefined;
|
|
527
|
-
intent?: undefined;
|
|
528
|
-
strokeWidth?: undefined;
|
|
529
|
-
strokeStyle?: undefined;
|
|
530
|
-
lineEndings?: undefined;
|
|
531
|
-
contents?: undefined;
|
|
532
|
-
fontSize?: undefined;
|
|
533
|
-
fontColor?: undefined;
|
|
534
|
-
fontFamily?: undefined;
|
|
535
|
-
textAlign?: undefined;
|
|
536
|
-
verticalAlign?: undefined;
|
|
537
|
-
backgroundColor?: undefined;
|
|
538
388
|
};
|
|
539
389
|
behavior: {
|
|
540
390
|
selectAfterCreate: true;
|
|
541
|
-
insertUpright?: undefined;
|
|
542
|
-
useAppearanceStream?: undefined;
|
|
543
391
|
};
|
|
544
|
-
|
|
392
|
+
pointerHandler: import('..').HandlerFactory<import('@embedpdf/models').PdfTextAnnoObject>;
|
|
545
393
|
} | {
|
|
546
394
|
id: "freeText";
|
|
547
395
|
name: string;
|
|
396
|
+
labelKey: string;
|
|
397
|
+
categories: string[];
|
|
548
398
|
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 1;
|
|
549
399
|
interaction: {
|
|
550
400
|
exclusive: false;
|
|
@@ -553,11 +403,6 @@ export declare const defaultTools: ({
|
|
|
553
403
|
isResizable: true;
|
|
554
404
|
lockAspectRatio: false;
|
|
555
405
|
lockGroupAspectRatio: (a: import('@embedpdf/models').PdfAnnotationObject) => boolean;
|
|
556
|
-
textSelection?: undefined;
|
|
557
|
-
isRotatable?: undefined;
|
|
558
|
-
isGroupDraggable?: undefined;
|
|
559
|
-
isGroupResizable?: undefined;
|
|
560
|
-
showSelectionRects?: undefined;
|
|
561
406
|
};
|
|
562
407
|
defaults: {
|
|
563
408
|
type: PdfAnnotationSubtype.FREETEXT;
|
|
@@ -570,12 +415,6 @@ export declare const defaultTools: ({
|
|
|
570
415
|
color: string;
|
|
571
416
|
backgroundColor: string;
|
|
572
417
|
opacity: number;
|
|
573
|
-
strokeColor?: undefined;
|
|
574
|
-
blendMode?: undefined;
|
|
575
|
-
intent?: undefined;
|
|
576
|
-
strokeWidth?: undefined;
|
|
577
|
-
strokeStyle?: undefined;
|
|
578
|
-
lineEndings?: undefined;
|
|
579
418
|
};
|
|
580
419
|
clickBehavior: {
|
|
581
420
|
enabled: true;
|
|
@@ -584,17 +423,19 @@ export declare const defaultTools: ({
|
|
|
584
423
|
height: number;
|
|
585
424
|
};
|
|
586
425
|
defaultContent: string;
|
|
587
|
-
defaultLength?: undefined;
|
|
588
|
-
defaultAngle?: undefined;
|
|
589
426
|
};
|
|
590
427
|
behavior: {
|
|
591
428
|
insertUpright: true;
|
|
592
|
-
|
|
593
|
-
|
|
429
|
+
editAfterCreate: true;
|
|
430
|
+
selectAfterCreate: true;
|
|
594
431
|
};
|
|
432
|
+
transform: import('..').PatchFunction<import('@embedpdf/models').PdfFreeTextAnnoObject>;
|
|
433
|
+
pointerHandler: import('..').HandlerFactory<import('@embedpdf/models').PdfFreeTextAnnoObject>;
|
|
595
434
|
} | {
|
|
596
435
|
id: "stamp";
|
|
597
436
|
name: string;
|
|
437
|
+
labelKey: string;
|
|
438
|
+
categories: string[];
|
|
598
439
|
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 1;
|
|
599
440
|
interaction: {
|
|
600
441
|
exclusive: false;
|
|
@@ -603,34 +444,43 @@ export declare const defaultTools: ({
|
|
|
603
444
|
isResizable: true;
|
|
604
445
|
lockAspectRatio: true;
|
|
605
446
|
lockGroupAspectRatio: true;
|
|
606
|
-
textSelection?: undefined;
|
|
607
|
-
isRotatable?: undefined;
|
|
608
|
-
isGroupDraggable?: undefined;
|
|
609
|
-
isGroupResizable?: undefined;
|
|
610
|
-
showSelectionRects?: undefined;
|
|
611
447
|
};
|
|
612
448
|
defaults: {
|
|
613
449
|
type: PdfAnnotationSubtype.STAMP;
|
|
614
|
-
strokeColor?: undefined;
|
|
615
|
-
color?: undefined;
|
|
616
|
-
opacity?: undefined;
|
|
617
|
-
blendMode?: undefined;
|
|
618
|
-
intent?: undefined;
|
|
619
|
-
strokeWidth?: undefined;
|
|
620
|
-
strokeStyle?: undefined;
|
|
621
|
-
lineEndings?: undefined;
|
|
622
|
-
contents?: undefined;
|
|
623
|
-
fontSize?: undefined;
|
|
624
|
-
fontColor?: undefined;
|
|
625
|
-
fontFamily?: undefined;
|
|
626
|
-
textAlign?: undefined;
|
|
627
|
-
verticalAlign?: undefined;
|
|
628
|
-
backgroundColor?: undefined;
|
|
629
450
|
};
|
|
630
451
|
behavior: {
|
|
631
452
|
insertUpright: true;
|
|
632
453
|
useAppearanceStream: false;
|
|
633
|
-
selectAfterCreate?: undefined;
|
|
634
454
|
};
|
|
635
|
-
|
|
455
|
+
transform: import('..').PatchFunction<import('@embedpdf/models').PdfStampAnnoObject>;
|
|
456
|
+
pointerHandler: import('..').HandlerFactory<import('@embedpdf/models').PdfStampAnnoObject>;
|
|
457
|
+
} | {
|
|
458
|
+
id: "link";
|
|
459
|
+
name: string;
|
|
460
|
+
labelKey: string;
|
|
461
|
+
categories: string[];
|
|
462
|
+
matchScore: (a: import('@embedpdf/models').PdfAnnotationObject) => 0 | 1;
|
|
463
|
+
interaction: {
|
|
464
|
+
exclusive: false;
|
|
465
|
+
cursor: string;
|
|
466
|
+
isDraggable: true;
|
|
467
|
+
isResizable: true;
|
|
468
|
+
isRotatable: false;
|
|
469
|
+
};
|
|
470
|
+
defaults: {
|
|
471
|
+
type: PdfAnnotationSubtype.LINK;
|
|
472
|
+
strokeColor: string;
|
|
473
|
+
strokeWidth: number;
|
|
474
|
+
strokeStyle: PdfAnnotationBorderStyle.UNDERLINE;
|
|
475
|
+
};
|
|
476
|
+
clickBehavior: {
|
|
477
|
+
enabled: true;
|
|
478
|
+
defaultSize: {
|
|
479
|
+
width: number;
|
|
480
|
+
height: number;
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
pointerHandler: import('..').HandlerFactory<import('@embedpdf/models').PdfLinkAnnoObject>;
|
|
636
484
|
})[];
|
|
485
|
+
export type DefaultAnnotationTool = (typeof defaultTools)[number];
|
|
486
|
+
export type DefaultAnnotationToolMap = ToolMapFromList<typeof defaultTools>;
|