@embedpdf/plugin-annotation 2.12.0 → 2.13.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 +1450 -1431
- package/dist/index.js.map +1 -1
- package/dist/lib/annotation-plugin.d.ts +1 -0
- package/dist/lib/patching/index.d.ts +1 -0
- package/dist/lib/types.d.ts +8 -0
- package/package.json +12 -12
|
@@ -48,6 +48,7 @@ export declare class AnnotationPlugin extends BasePlugin<AnnotationPluginConfig,
|
|
|
48
48
|
private getPageAnnotations;
|
|
49
49
|
private getSelectedAnnotation;
|
|
50
50
|
private getAnnotationById;
|
|
51
|
+
private getAnnotationsMethod;
|
|
51
52
|
private renderAnnotation;
|
|
52
53
|
/**
|
|
53
54
|
* Batch-fetch rendered appearance stream images for all annotations on a page.
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -264,6 +264,8 @@ export interface AnnotationScope<TTools extends AnnotationToolMap = AnnotationTo
|
|
|
264
264
|
/** Get the IDs of all selected annotations */
|
|
265
265
|
getSelectedAnnotationIds(): string[];
|
|
266
266
|
getAnnotationById(id: string): TrackedAnnotation | null;
|
|
267
|
+
/** Get all tracked annotations, optionally filtered by page */
|
|
268
|
+
getAnnotations(options?: GetAnnotationsOptions): TrackedAnnotation[];
|
|
267
269
|
/** Select a single annotation (clears previous selection) */
|
|
268
270
|
selectAnnotation(pageIndex: number, annotationId: string): void;
|
|
269
271
|
/** Toggle an annotation in/out of the current selection */
|
|
@@ -353,6 +355,8 @@ export interface AnnotationCapability<TTools extends AnnotationToolMap = Annotat
|
|
|
353
355
|
/** Get the IDs of all selected annotations */
|
|
354
356
|
getSelectedAnnotationIds: () => string[];
|
|
355
357
|
getAnnotationById(id: string): TrackedAnnotation | null;
|
|
358
|
+
/** Get all tracked annotations, optionally filtered by page */
|
|
359
|
+
getAnnotations: (options?: GetAnnotationsOptions) => TrackedAnnotation[];
|
|
356
360
|
/** Select a single annotation (clears previous selection) */
|
|
357
361
|
selectAnnotation: (pageIndex: number, annotationId: string) => void;
|
|
358
362
|
/** Toggle an annotation in/out of the current selection */
|
|
@@ -454,6 +458,10 @@ export interface AnnotationCapability<TTools extends AnnotationToolMap = Annotat
|
|
|
454
458
|
export interface GetPageAnnotationsOptions {
|
|
455
459
|
pageIndex: number;
|
|
456
460
|
}
|
|
461
|
+
export interface GetAnnotationsOptions {
|
|
462
|
+
/** Filter annotations by page index. Omit to get all annotations. */
|
|
463
|
+
pageIndex?: number;
|
|
464
|
+
}
|
|
457
465
|
export interface SidebarAnnotationEntry {
|
|
458
466
|
page: number;
|
|
459
467
|
annotation: TrackedAnnotation;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embedpdf/plugin-annotation",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@embedpdf/models": "2.
|
|
39
|
-
"@embedpdf/utils": "2.
|
|
38
|
+
"@embedpdf/models": "2.13.0",
|
|
39
|
+
"@embedpdf/utils": "2.13.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/react": "^18.2.0",
|
|
43
43
|
"@types/react-dom": "^18.2.0",
|
|
44
44
|
"typescript": "^5.0.0",
|
|
45
45
|
"@embedpdf/build": "1.1.0",
|
|
46
|
-
"@embedpdf/plugin-
|
|
47
|
-
"@embedpdf/plugin-
|
|
48
|
-
"@embedpdf/plugin-scroll": "2.
|
|
49
|
-
"@embedpdf/plugin-
|
|
46
|
+
"@embedpdf/plugin-interaction-manager": "2.13.0",
|
|
47
|
+
"@embedpdf/plugin-selection": "2.13.0",
|
|
48
|
+
"@embedpdf/plugin-scroll": "2.13.0",
|
|
49
|
+
"@embedpdf/plugin-history": "2.13.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": ">=16.8.0",
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
"preact": "^10.26.4",
|
|
55
55
|
"vue": ">=3.2.0",
|
|
56
56
|
"svelte": ">=5 <6",
|
|
57
|
-
"@embedpdf/core": "2.
|
|
58
|
-
"@embedpdf/plugin-
|
|
59
|
-
"@embedpdf/plugin-
|
|
60
|
-
"@embedpdf/plugin-
|
|
61
|
-
"@embedpdf/plugin-
|
|
57
|
+
"@embedpdf/core": "2.13.0",
|
|
58
|
+
"@embedpdf/plugin-selection": "2.13.0",
|
|
59
|
+
"@embedpdf/plugin-scroll": "2.13.0",
|
|
60
|
+
"@embedpdf/plugin-interaction-manager": "2.13.0",
|
|
61
|
+
"@embedpdf/plugin-history": "2.13.0"
|
|
62
62
|
},
|
|
63
63
|
"files": [
|
|
64
64
|
"dist",
|