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