@embedpdf/plugin-annotation 2.2.0 → 2.4.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 +1232 -101
- package/dist/index.js.map +1 -1
- package/dist/lib/actions.d.ts +33 -3
- package/dist/lib/annotation-plugin.d.ts +178 -2
- package/dist/lib/handlers/types.d.ts +1 -1
- package/dist/lib/helpers.d.ts +8 -2
- package/dist/lib/selectors.d.ts +97 -8
- package/dist/lib/tools/default-tools.d.ts +39 -11
- package/dist/lib/tools/types.d.ts +22 -4
- package/dist/lib/types.d.ts +278 -1
- package/dist/preact/adapter.d.ts +3 -3
- package/dist/preact/index.cjs +1 -1
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.js +1133 -403
- package/dist/preact/index.js.map +1 -1
- package/dist/react/adapter.d.ts +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +1132 -402
- package/dist/react/index.js.map +1 -1
- package/dist/shared/components/annotation-container.d.ts +13 -2
- package/dist/shared/components/annotation-layer.d.ts +6 -2
- package/dist/shared/components/annotations/ink.d.ts +3 -3
- package/dist/shared/components/annotations/link.d.ts +28 -0
- package/dist/shared/components/annotations.d.ts +4 -1
- package/dist/shared/components/group-selection-box.d.ts +32 -0
- package/dist/shared/components/index.d.ts +1 -0
- package/dist/shared/components/text-markup/highlight.d.ts +3 -2
- package/dist/shared/components/text-markup/squiggly.d.ts +3 -2
- package/dist/shared/components/text-markup/strikeout.d.ts +3 -2
- package/dist/shared/components/text-markup/underline.d.ts +3 -2
- package/dist/shared/components/types.d.ts +50 -1
- package/dist/shared/context/index.d.ts +1 -0
- package/dist/shared/context/renderer-registry.d.ts +21 -0
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared-preact/components/annotation-container.d.ts +13 -2
- package/dist/shared-preact/components/annotation-layer.d.ts +6 -2
- package/dist/shared-preact/components/annotations/ink.d.ts +3 -3
- package/dist/shared-preact/components/annotations/link.d.ts +28 -0
- package/dist/shared-preact/components/annotations.d.ts +4 -1
- package/dist/shared-preact/components/group-selection-box.d.ts +32 -0
- package/dist/shared-preact/components/index.d.ts +1 -0
- package/dist/shared-preact/components/text-markup/highlight.d.ts +3 -2
- package/dist/shared-preact/components/text-markup/squiggly.d.ts +3 -2
- package/dist/shared-preact/components/text-markup/strikeout.d.ts +3 -2
- package/dist/shared-preact/components/text-markup/underline.d.ts +3 -2
- package/dist/shared-preact/components/types.d.ts +50 -1
- package/dist/shared-preact/context/index.d.ts +1 -0
- package/dist/shared-preact/context/renderer-registry.d.ts +21 -0
- package/dist/shared-preact/index.d.ts +2 -0
- package/dist/shared-react/components/annotation-container.d.ts +13 -2
- package/dist/shared-react/components/annotation-layer.d.ts +6 -2
- package/dist/shared-react/components/annotations/ink.d.ts +3 -3
- package/dist/shared-react/components/annotations/link.d.ts +28 -0
- package/dist/shared-react/components/annotations.d.ts +4 -1
- package/dist/shared-react/components/group-selection-box.d.ts +32 -0
- package/dist/shared-react/components/index.d.ts +1 -0
- package/dist/shared-react/components/text-markup/highlight.d.ts +3 -2
- package/dist/shared-react/components/text-markup/squiggly.d.ts +3 -2
- package/dist/shared-react/components/text-markup/strikeout.d.ts +3 -2
- package/dist/shared-react/components/text-markup/underline.d.ts +3 -2
- package/dist/shared-react/components/types.d.ts +50 -1
- package/dist/shared-react/context/index.d.ts +1 -0
- package/dist/shared-react/context/renderer-registry.d.ts +21 -0
- package/dist/shared-react/index.d.ts +2 -0
- package/dist/svelte/components/AnnotationLayer.svelte.d.ts +8 -1
- package/dist/svelte/components/Annotations.svelte.d.ts +8 -1
- package/dist/svelte/components/GroupSelectionBox.svelte.d.ts +32 -0
- package/dist/svelte/components/RendererRegistryProvider.svelte.d.ts +7 -0
- package/dist/svelte/components/annotations/Ink.svelte.d.ts +2 -1
- package/dist/svelte/components/annotations/Link.svelte.d.ts +24 -0
- package/dist/svelte/components/annotations/index.d.ts +1 -0
- package/dist/svelte/components/index.d.ts +2 -0
- package/dist/svelte/components/text-markup/Highlight.svelte.d.ts +2 -1
- package/dist/svelte/components/text-markup/Squiggly.svelte.d.ts +2 -1
- package/dist/svelte/components/text-markup/Strikeout.svelte.d.ts +2 -1
- package/dist/svelte/components/text-markup/Underline.svelte.d.ts +2 -1
- package/dist/svelte/components/types.d.ts +2 -0
- package/dist/svelte/context/index.d.ts +2 -0
- package/dist/svelte/context/renderer-registry.svelte.d.ts +20 -0
- package/dist/svelte/context/types.d.ts +33 -0
- package/dist/svelte/index.cjs +1 -1
- package/dist/svelte/index.cjs.map +1 -1
- package/dist/svelte/index.d.ts +2 -0
- package/dist/svelte/index.js +1215 -394
- package/dist/svelte/index.js.map +1 -1
- package/dist/svelte/types.d.ts +7 -0
- package/dist/vue/components/annotation-container.vue.d.ts +3 -1
- package/dist/vue/components/annotation-layer.vue.d.ts +31 -5
- package/dist/vue/components/annotations/free-text.vue.d.ts +1 -1
- package/dist/vue/components/annotations/index.d.ts +1 -0
- package/dist/vue/components/annotations/ink.vue.d.ts +2 -2
- package/dist/vue/components/annotations/line.vue.d.ts +1 -1
- package/dist/vue/components/annotations/link.vue.d.ts +29 -0
- package/dist/vue/components/annotations/polygon.vue.d.ts +1 -1
- package/dist/vue/components/annotations/polyline.vue.d.ts +1 -1
- package/dist/vue/components/annotations/stamp.vue.d.ts +1 -1
- package/dist/vue/components/annotations.vue.d.ts +151 -53
- package/dist/vue/components/group-selection-box.vue.d.ts +73 -0
- package/dist/vue/components/index.d.ts +2 -0
- package/dist/vue/components/preview-renderer.vue.d.ts +1 -1
- package/dist/vue/components/renderer-registry-provider.vue.d.ts +13 -0
- package/dist/vue/components/text-markup/highlight.vue.d.ts +2 -2
- package/dist/vue/components/text-markup/squiggly.vue.d.ts +2 -2
- package/dist/vue/components/text-markup/strikeout.vue.d.ts +2 -2
- package/dist/vue/components/text-markup/underline.vue.d.ts +2 -2
- package/dist/vue/context/index.d.ts +2 -0
- package/dist/vue/context/renderer-registry.d.ts +26 -0
- package/dist/vue/context/types.d.ts +33 -0
- package/dist/vue/hooks/use-annotation.d.ts +7 -5
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.d.ts +3 -1
- package/dist/vue/index.js +1124 -459
- package/dist/vue/index.js.map +1 -1
- package/dist/vue/types.d.ts +8 -1
- package/package.json +10 -10
package/dist/lib/actions.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ export declare const SET_ACTIVE_DOCUMENT = "ANNOTATION/SET_ACTIVE_DOCUMENT";
|
|
|
8
8
|
export declare const SET_ANNOTATIONS = "ANNOTATION/SET_ANNOTATIONS";
|
|
9
9
|
export declare const SELECT_ANNOTATION = "ANNOTATION/SELECT_ANNOTATION";
|
|
10
10
|
export declare const DESELECT_ANNOTATION = "ANNOTATION/DESELECT_ANNOTATION";
|
|
11
|
+
export declare const ADD_TO_SELECTION = "ANNOTATION/ADD_TO_SELECTION";
|
|
12
|
+
export declare const REMOVE_FROM_SELECTION = "ANNOTATION/REMOVE_FROM_SELECTION";
|
|
13
|
+
export declare const SET_SELECTION = "ANNOTATION/SET_SELECTION";
|
|
11
14
|
export declare const SET_ACTIVE_TOOL_ID = "ANNOTATION/SET_ACTIVE_TOOL_ID";
|
|
12
15
|
export declare const CREATE_ANNOTATION = "ANNOTATION/CREATE_ANNOTATION";
|
|
13
16
|
export declare const PATCH_ANNOTATION = "ANNOTATION/PATCH_ANNOTATION";
|
|
@@ -53,6 +56,28 @@ export interface DeselectAnnotationAction extends Action {
|
|
|
53
56
|
documentId: string;
|
|
54
57
|
};
|
|
55
58
|
}
|
|
59
|
+
export interface AddToSelectionAction extends Action {
|
|
60
|
+
type: typeof ADD_TO_SELECTION;
|
|
61
|
+
payload: {
|
|
62
|
+
documentId: string;
|
|
63
|
+
pageIndex: number;
|
|
64
|
+
id: string;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export interface RemoveFromSelectionAction extends Action {
|
|
68
|
+
type: typeof REMOVE_FROM_SELECTION;
|
|
69
|
+
payload: {
|
|
70
|
+
documentId: string;
|
|
71
|
+
id: string;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export interface SetSelectionAction extends Action {
|
|
75
|
+
type: typeof SET_SELECTION;
|
|
76
|
+
payload: {
|
|
77
|
+
documentId: string;
|
|
78
|
+
ids: string[];
|
|
79
|
+
};
|
|
80
|
+
}
|
|
56
81
|
export interface SetActiveToolIdAction extends Action {
|
|
57
82
|
type: typeof SET_ACTIVE_TOOL_ID;
|
|
58
83
|
payload: {
|
|
@@ -89,12 +114,14 @@ export interface CommitAction extends Action {
|
|
|
89
114
|
type: typeof COMMIT_PENDING_CHANGES;
|
|
90
115
|
payload: {
|
|
91
116
|
documentId: string;
|
|
117
|
+
committedUids: string[];
|
|
92
118
|
};
|
|
93
119
|
}
|
|
94
120
|
export interface PurgeAnnotationAction extends Action {
|
|
95
121
|
type: typeof PURGE_ANNOTATION;
|
|
96
122
|
payload: {
|
|
97
123
|
documentId: string;
|
|
124
|
+
pageIndex: number;
|
|
98
125
|
uid: string;
|
|
99
126
|
};
|
|
100
127
|
}
|
|
@@ -113,19 +140,22 @@ export interface AddToolAction extends Action {
|
|
|
113
140
|
type: typeof ADD_TOOL;
|
|
114
141
|
payload: AnnotationTool;
|
|
115
142
|
}
|
|
116
|
-
export type AnnotationAction = InitAnnotationStateAction | CleanupAnnotationStateAction | SetActiveDocumentAction | SetAnnotationsAction | SelectAnnotationAction | DeselectAnnotationAction | SetActiveToolIdAction | CreateAnnotationAction | PatchAnnotationAction | DeleteAnnotationAction | CommitAction | PurgeAnnotationAction | AddColorPresetAction | SetToolDefaultsAction | AddToolAction;
|
|
143
|
+
export type AnnotationAction = InitAnnotationStateAction | CleanupAnnotationStateAction | SetActiveDocumentAction | SetAnnotationsAction | SelectAnnotationAction | DeselectAnnotationAction | AddToSelectionAction | RemoveFromSelectionAction | SetSelectionAction | SetActiveToolIdAction | CreateAnnotationAction | PatchAnnotationAction | DeleteAnnotationAction | CommitAction | PurgeAnnotationAction | AddColorPresetAction | SetToolDefaultsAction | AddToolAction;
|
|
117
144
|
export declare function initAnnotationState(documentId: string, state: AnnotationDocumentState): InitAnnotationStateAction;
|
|
118
145
|
export declare function cleanupAnnotationState(documentId: string): CleanupAnnotationStateAction;
|
|
119
146
|
export declare function setActiveDocument(documentId: string | null): SetActiveDocumentAction;
|
|
120
147
|
export declare const setAnnotations: (documentId: string, annotations: Record<number, PdfAnnotationObject[]>) => SetAnnotationsAction;
|
|
121
148
|
export declare const selectAnnotation: (documentId: string, pageIndex: number, id: string) => SelectAnnotationAction;
|
|
122
149
|
export declare const deselectAnnotation: (documentId: string) => DeselectAnnotationAction;
|
|
150
|
+
export declare const addToSelection: (documentId: string, pageIndex: number, id: string) => AddToSelectionAction;
|
|
151
|
+
export declare const removeFromSelection: (documentId: string, id: string) => RemoveFromSelectionAction;
|
|
152
|
+
export declare const setSelection: (documentId: string, ids: string[]) => SetSelectionAction;
|
|
123
153
|
export declare const setActiveToolId: (documentId: string, toolId: string | null) => SetActiveToolIdAction;
|
|
124
154
|
export declare const createAnnotation: (documentId: string, pageIndex: number, annotation: PdfAnnotationObject) => CreateAnnotationAction;
|
|
125
155
|
export declare const patchAnnotation: (documentId: string, pageIndex: number, id: string, patch: Partial<PdfAnnotationObject>) => PatchAnnotationAction;
|
|
126
156
|
export declare const deleteAnnotation: (documentId: string, pageIndex: number, id: string) => DeleteAnnotationAction;
|
|
127
|
-
export declare const commitPendingChanges: (documentId: string) => CommitAction;
|
|
128
|
-
export declare const purgeAnnotation: (documentId: string, uid: string) => PurgeAnnotationAction;
|
|
157
|
+
export declare const commitPendingChanges: (documentId: string, committedUids: string[]) => CommitAction;
|
|
158
|
+
export declare const purgeAnnotation: (documentId: string, pageIndex: number, uid: string) => PurgeAnnotationAction;
|
|
129
159
|
export declare const addColorPreset: (c: string) => AddColorPresetAction;
|
|
130
160
|
export declare const setToolDefaults: (toolId: string, patch: Partial<any>) => SetToolDefaultsAction;
|
|
131
161
|
export declare const addTool: (tool: AnnotationTool) => AddToolAction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BasePlugin, PluginRegistry } from '@embedpdf/core';
|
|
2
|
-
import { PdfAnnotationObject } from '@embedpdf/models';
|
|
3
|
-
import { AnnotationCapability, AnnotationPluginConfig, AnnotationState } from './types';
|
|
2
|
+
import { PdfAnnotationObject, Position, Rect } from '@embedpdf/models';
|
|
3
|
+
import { AnnotationCapability, AnnotationPluginConfig, AnnotationState, UnifiedDragOptions, UnifiedDragState, UnifiedDragEvent, UnifiedResizeOptions, UnifiedResizeState, UnifiedResizeEvent } from './types';
|
|
4
4
|
import { AnnotationAction } from './actions';
|
|
5
5
|
import { AnnotationTool } from './tools/types';
|
|
6
6
|
import { AnyPreviewState, HandlerServices } from './handlers/types';
|
|
@@ -15,11 +15,16 @@ export declare class AnnotationPlugin extends BasePlugin<AnnotationPluginConfig,
|
|
|
15
15
|
private pendingContexts;
|
|
16
16
|
private isInitialLoadComplete;
|
|
17
17
|
private importQueue;
|
|
18
|
+
private commitInProgress;
|
|
18
19
|
private handlerFactories;
|
|
19
20
|
private readonly activeTool$;
|
|
20
21
|
private readonly events$;
|
|
21
22
|
private readonly toolsChange$;
|
|
22
23
|
private readonly patchRegistry;
|
|
24
|
+
private readonly unifiedDragStates;
|
|
25
|
+
private readonly unifiedDrag$;
|
|
26
|
+
private readonly unifiedResizeStates;
|
|
27
|
+
private readonly unifiedResize$;
|
|
23
28
|
constructor(id: string, registry: PluginRegistry, config: AnnotationPluginConfig);
|
|
24
29
|
protected onDocumentLoadingStarted(documentId: string): void;
|
|
25
30
|
protected onDocumentLoaded(documentId: string): void;
|
|
@@ -50,12 +55,183 @@ export declare class AnnotationPlugin extends BasePlugin<AnnotationPluginConfig,
|
|
|
50
55
|
private buildPatch;
|
|
51
56
|
private updateAnnotation;
|
|
52
57
|
private deleteAnnotation;
|
|
58
|
+
private deleteAnnotationsMethod;
|
|
59
|
+
private purgeAnnotationMethod;
|
|
53
60
|
private selectAnnotation;
|
|
54
61
|
private deselectAnnotation;
|
|
62
|
+
private getSelectedAnnotationsMethod;
|
|
63
|
+
private getSelectedAnnotationIdsMethod;
|
|
64
|
+
private toggleSelectionMethod;
|
|
65
|
+
private addToSelectionMethod;
|
|
66
|
+
private removeFromSelectionMethod;
|
|
67
|
+
private setSelectionMethod;
|
|
68
|
+
private getAttachedLinksMethod;
|
|
69
|
+
private hasAttachedLinksMethod;
|
|
70
|
+
private deleteAttachedLinksMethod;
|
|
71
|
+
/**
|
|
72
|
+
* Group the currently selected annotations.
|
|
73
|
+
* The first selected annotation becomes the group leader.
|
|
74
|
+
* All other selected annotations get their IRT set to the leader's ID with RT = Group.
|
|
75
|
+
*/
|
|
76
|
+
private groupAnnotationsMethod;
|
|
77
|
+
/**
|
|
78
|
+
* Ungroup all annotations in the group containing the specified annotation.
|
|
79
|
+
* Clears IRT and RT from all group members (the leader doesn't have them).
|
|
80
|
+
*/
|
|
81
|
+
private ungroupAnnotationsMethod;
|
|
82
|
+
/**
|
|
83
|
+
* Get all annotations in the same group as the specified annotation.
|
|
84
|
+
*/
|
|
85
|
+
private getGroupMembersMethod;
|
|
86
|
+
/**
|
|
87
|
+
* Check if an annotation is part of a group.
|
|
88
|
+
*/
|
|
89
|
+
private isInGroupMethod;
|
|
90
|
+
/**
|
|
91
|
+
* Get the available grouping action for the current selection.
|
|
92
|
+
*/
|
|
93
|
+
private getGroupingActionMethod;
|
|
94
|
+
/**
|
|
95
|
+
* Compute combined constraints from all selected annotations.
|
|
96
|
+
* This finds the "weakest link" in each direction - the annotation with the least
|
|
97
|
+
* room to move determines the group's limit.
|
|
98
|
+
*/
|
|
99
|
+
private computeCombinedConstraints;
|
|
100
|
+
/**
|
|
101
|
+
* Clamp a delta to the combined constraints.
|
|
102
|
+
* Negative y = moving up, positive y = moving down
|
|
103
|
+
* Negative x = moving left, positive x = moving right
|
|
104
|
+
*/
|
|
105
|
+
private clampDelta;
|
|
106
|
+
/**
|
|
107
|
+
* Start a unified drag operation.
|
|
108
|
+
* The plugin automatically expands the selection to include attached links.
|
|
109
|
+
* Framework components should call this instead of building their own logic.
|
|
110
|
+
*
|
|
111
|
+
* @param documentId - The document ID
|
|
112
|
+
* @param options - Drag options (annotationIds and pageSize)
|
|
113
|
+
*/
|
|
114
|
+
startDrag(documentId: string, options: UnifiedDragOptions): void;
|
|
115
|
+
/**
|
|
116
|
+
* Compute preview patches for all drag participants.
|
|
117
|
+
* Uses transformAnnotation to properly handle vertices, inkList, etc.
|
|
118
|
+
*/
|
|
119
|
+
private computeDragPreviewPatches;
|
|
120
|
+
/**
|
|
121
|
+
* Update the drag delta during a unified drag operation.
|
|
122
|
+
* Returns the clamped delta synchronously for the caller's preview.
|
|
123
|
+
*
|
|
124
|
+
* @param documentId - The document ID
|
|
125
|
+
* @param rawDelta - The unconstrained delta from the drag gesture
|
|
126
|
+
* @returns The clamped delta
|
|
127
|
+
*/
|
|
128
|
+
updateDrag(documentId: string, rawDelta: Position): Position;
|
|
129
|
+
/**
|
|
130
|
+
* Commit the drag - plugin builds and applies ALL patches.
|
|
131
|
+
* This is the key method that centralizes patch building in the plugin.
|
|
132
|
+
*
|
|
133
|
+
* @param documentId - The document ID
|
|
134
|
+
*/
|
|
135
|
+
commitDrag(documentId: string): void;
|
|
136
|
+
/**
|
|
137
|
+
* Cancel the drag without committing.
|
|
138
|
+
*
|
|
139
|
+
* @param documentId - The document ID
|
|
140
|
+
*/
|
|
141
|
+
cancelDrag(documentId: string): void;
|
|
142
|
+
/**
|
|
143
|
+
* Get the current unified drag state for a document.
|
|
144
|
+
*/
|
|
145
|
+
getDragState(documentId: string): UnifiedDragState | null;
|
|
146
|
+
/**
|
|
147
|
+
* Subscribe to unified drag state changes.
|
|
148
|
+
* Framework components use this for preview updates.
|
|
149
|
+
*/
|
|
150
|
+
get onDragChange(): import('@embedpdf/core').EventHook<UnifiedDragEvent>;
|
|
151
|
+
/**
|
|
152
|
+
* Compute the union bounding box of multiple rects.
|
|
153
|
+
*/
|
|
154
|
+
private computeUnifiedGroupBoundingBox;
|
|
155
|
+
/**
|
|
156
|
+
* Compute relative positions for annotations within a group bounding box.
|
|
157
|
+
*/
|
|
158
|
+
private computeUnifiedRelativePositions;
|
|
159
|
+
/**
|
|
160
|
+
* Compute new rects for all annotations based on the new group bounding box.
|
|
161
|
+
*/
|
|
162
|
+
private computeUnifiedResizedRects;
|
|
163
|
+
/**
|
|
164
|
+
* Compute preview patches for all resize participants.
|
|
165
|
+
* Uses transformAnnotation to properly handle vertices, inkList, etc.
|
|
166
|
+
*/
|
|
167
|
+
private computeResizePreviewPatches;
|
|
168
|
+
/**
|
|
169
|
+
* Start a unified resize operation.
|
|
170
|
+
* The plugin automatically expands the selection to include attached links.
|
|
171
|
+
*
|
|
172
|
+
* @param documentId - The document ID
|
|
173
|
+
* @param options - Resize options
|
|
174
|
+
*/
|
|
175
|
+
startResize(documentId: string, options: UnifiedResizeOptions): void;
|
|
176
|
+
/**
|
|
177
|
+
* Update the resize with a new group bounding box.
|
|
178
|
+
* Returns the computed rects synchronously for immediate preview use.
|
|
179
|
+
*
|
|
180
|
+
* @param documentId - The document ID
|
|
181
|
+
* @param newGroupBox - The new group bounding box
|
|
182
|
+
* @returns Record of annotation ID to new rect
|
|
183
|
+
*/
|
|
184
|
+
updateResize(documentId: string, newGroupBox: Rect): Record<string, Rect>;
|
|
185
|
+
/**
|
|
186
|
+
* Commit the resize - plugin builds and applies ALL patches.
|
|
187
|
+
*
|
|
188
|
+
* @param documentId - The document ID
|
|
189
|
+
*/
|
|
190
|
+
commitResize(documentId: string): void;
|
|
191
|
+
/**
|
|
192
|
+
* Cancel the resize without committing.
|
|
193
|
+
*
|
|
194
|
+
* @param documentId - The document ID
|
|
195
|
+
*/
|
|
196
|
+
cancelResize(documentId: string): void;
|
|
197
|
+
/**
|
|
198
|
+
* Get the current unified resize state for a document.
|
|
199
|
+
*/
|
|
200
|
+
getResizeState(documentId: string): UnifiedResizeState | null;
|
|
201
|
+
/**
|
|
202
|
+
* Subscribe to unified resize state changes.
|
|
203
|
+
* Framework components use this for preview updates.
|
|
204
|
+
*/
|
|
205
|
+
get onResizeChange(): import('@embedpdf/core').EventHook<UnifiedResizeEvent>;
|
|
206
|
+
private updateAnnotationsMethod;
|
|
55
207
|
getActiveTool(documentId?: string): AnnotationTool | null;
|
|
56
208
|
setActiveTool(toolId: string | null, documentId?: string): void;
|
|
57
209
|
getTool<T extends AnnotationTool>(toolId: string): T | undefined;
|
|
58
210
|
findToolForAnnotation(annotation: PdfAnnotationObject): AnnotationTool | null;
|
|
211
|
+
/**
|
|
212
|
+
* Collects all pending annotation changes for a document into a batch.
|
|
213
|
+
* This separates the "what to commit" from "how to commit" for cleaner code.
|
|
214
|
+
*/
|
|
215
|
+
private collectPendingChanges;
|
|
216
|
+
/**
|
|
217
|
+
* Executes a batch of pending changes by creating engine tasks.
|
|
218
|
+
* Returns a task that resolves when all operations complete.
|
|
219
|
+
*/
|
|
220
|
+
private executeCommitBatch;
|
|
221
|
+
/**
|
|
222
|
+
* Emits commit events for all completed operations.
|
|
223
|
+
* Centralizes event emission for cleaner separation of concerns.
|
|
224
|
+
*/
|
|
225
|
+
private emitCommitEvents;
|
|
226
|
+
/**
|
|
227
|
+
* Attempts to acquire the commit lock for a document.
|
|
228
|
+
* Returns true if acquired, false if a commit is already in progress.
|
|
229
|
+
*/
|
|
230
|
+
private acquireCommitLock;
|
|
231
|
+
/**
|
|
232
|
+
* Releases the commit lock for a document.
|
|
233
|
+
*/
|
|
234
|
+
private releaseCommitLock;
|
|
59
235
|
private commit;
|
|
60
236
|
/**
|
|
61
237
|
* Gets the effective behavior setting for a tool, checking tool-specific config first,
|
package/dist/lib/helpers.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { PdfAnnotationSubtype, PdfAnnotationObject } from '@embedpdf/models';
|
|
1
|
+
import { PdfAnnotationSubtype, PdfAnnotationObject, Rect } from '@embedpdf/models';
|
|
2
2
|
import { TrackedAnnotation } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Check if two rectangles intersect
|
|
5
|
+
*/
|
|
6
|
+
export declare function rectsIntersect(a: Rect, b: Rect): boolean;
|
|
3
7
|
export type AnnoOf<S extends PdfAnnotationSubtype> = Extract<PdfAnnotationObject, {
|
|
4
8
|
type: S;
|
|
5
9
|
}>;
|
|
6
10
|
export type TextMarkupSubtype = PdfAnnotationSubtype.HIGHLIGHT | PdfAnnotationSubtype.UNDERLINE | PdfAnnotationSubtype.STRIKEOUT | PdfAnnotationSubtype.SQUIGGLY;
|
|
7
|
-
export type SidebarSubtype = TextMarkupSubtype | PdfAnnotationSubtype.INK | PdfAnnotationSubtype.SQUARE | PdfAnnotationSubtype.CIRCLE | PdfAnnotationSubtype.POLYGON | PdfAnnotationSubtype.LINE | PdfAnnotationSubtype.POLYLINE | PdfAnnotationSubtype.FREETEXT | PdfAnnotationSubtype.STAMP;
|
|
11
|
+
export type SidebarSubtype = TextMarkupSubtype | PdfAnnotationSubtype.INK | PdfAnnotationSubtype.SQUARE | PdfAnnotationSubtype.CIRCLE | PdfAnnotationSubtype.POLYGON | PdfAnnotationSubtype.LINE | PdfAnnotationSubtype.POLYLINE | PdfAnnotationSubtype.FREETEXT | PdfAnnotationSubtype.STAMP | PdfAnnotationSubtype.REDACT;
|
|
8
12
|
/** True when `a.object.type === INK` – and narrows the generic. */
|
|
9
13
|
export declare function isInk(a: TrackedAnnotation): a is TrackedAnnotation<AnnoOf<PdfAnnotationSubtype.INK>>;
|
|
10
14
|
/** Example for Circle – create similar ones for Square, Line, etc. */
|
|
@@ -21,4 +25,6 @@ export declare function isTextMarkup(a: TrackedAnnotation): a is TrackedAnnotati
|
|
|
21
25
|
export declare function isFreeText(a: TrackedAnnotation): a is TrackedAnnotation<AnnoOf<PdfAnnotationSubtype.FREETEXT>>;
|
|
22
26
|
export declare function isStamp(a: TrackedAnnotation): a is TrackedAnnotation<AnnoOf<PdfAnnotationSubtype.STAMP>>;
|
|
23
27
|
export declare function isText(a: TrackedAnnotation): a is TrackedAnnotation<AnnoOf<PdfAnnotationSubtype.TEXT>>;
|
|
28
|
+
export declare function isLink(a: TrackedAnnotation): a is TrackedAnnotation<AnnoOf<PdfAnnotationSubtype.LINK>>;
|
|
29
|
+
export declare function isRedact(a: TrackedAnnotation): a is TrackedAnnotation<AnnoOf<PdfAnnotationSubtype.REDACT>>;
|
|
24
30
|
export declare function isSidebarAnnotation(a: TrackedAnnotation): a is TrackedAnnotation<AnnoOf<SidebarSubtype>>;
|
package/dist/lib/selectors.d.ts
CHANGED
|
@@ -1,16 +1,32 @@
|
|
|
1
|
-
import { AnnotationState, AnnotationDocumentState, SidebarAnnotationEntry, TrackedAnnotation } from './types';
|
|
1
|
+
import { AnnotationState, AnnotationDocumentState, SidebarAnnotationEntry, TrackedAnnotation, GroupingAction } from './types';
|
|
2
|
+
import { PdfAnnotationSubtype, PdfAnnotationObject } from '@embedpdf/models';
|
|
2
3
|
import { ToolMap } from './tools/tools-utils';
|
|
3
4
|
/** All annotations _objects_ on a single page (order preserved). */
|
|
4
|
-
export declare const getAnnotationsByPageIndex: (s: AnnotationDocumentState, page: number) => TrackedAnnotation<
|
|
5
|
+
export declare const getAnnotationsByPageIndex: (s: AnnotationDocumentState, page: number) => TrackedAnnotation<PdfAnnotationObject>[];
|
|
5
6
|
/** Shortcut: every page → list of annotation objects. */
|
|
6
|
-
export declare const getAnnotations: (s: AnnotationDocumentState) => Record<number, TrackedAnnotation<
|
|
7
|
-
/**
|
|
8
|
-
|
|
7
|
+
export declare const getAnnotations: (s: AnnotationDocumentState) => Record<number, TrackedAnnotation<PdfAnnotationObject>[]>;
|
|
8
|
+
/**
|
|
9
|
+
* The full `TrackedAnnotation` for the current selection.
|
|
10
|
+
* @deprecated Use getSelectedAnnotations() for multi-select support. Returns first selected or null.
|
|
11
|
+
*/
|
|
12
|
+
export declare const getSelectedAnnotation: (s: AnnotationDocumentState) => TrackedAnnotation | null;
|
|
13
|
+
/** Get all selected TrackedAnnotations */
|
|
14
|
+
export declare const getSelectedAnnotations: (s: AnnotationDocumentState) => TrackedAnnotation[];
|
|
15
|
+
/** Get the IDs of all selected annotations */
|
|
16
|
+
export declare const getSelectedAnnotationIds: (s: AnnotationDocumentState) => string[];
|
|
9
17
|
/** Get a tracked annotation by its ID */
|
|
10
|
-
export declare const getAnnotationByUid: (s: AnnotationDocumentState, uid: string) => TrackedAnnotation<
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
export declare const getAnnotationByUid: (s: AnnotationDocumentState, uid: string) => TrackedAnnotation<PdfAnnotationObject>;
|
|
19
|
+
/**
|
|
20
|
+
* Get selected annotation on a specific page (single, for backward compatibility)
|
|
21
|
+
* @deprecated Use getSelectedAnnotationsByPageIndex() for multi-select support.
|
|
22
|
+
*/
|
|
23
|
+
export declare const getSelectedAnnotationByPageIndex: (s: AnnotationDocumentState, pageIndex: number) => TrackedAnnotation | null;
|
|
24
|
+
/** Get all selected annotations on a specific page */
|
|
25
|
+
export declare const getSelectedAnnotationsByPageIndex: (s: AnnotationDocumentState, pageIndex: number) => TrackedAnnotation[];
|
|
26
|
+
/** Check if a given annotation is in the current selection. */
|
|
13
27
|
export declare const isAnnotationSelected: (s: AnnotationDocumentState, id: string) => boolean;
|
|
28
|
+
/** Check if multiple annotations are selected */
|
|
29
|
+
export declare const hasMultipleSelected: (s: AnnotationDocumentState) => boolean;
|
|
14
30
|
/**
|
|
15
31
|
* Returns the current defaults for a specific tool by its ID.
|
|
16
32
|
* This is fully type-safe and infers the correct return type.
|
|
@@ -43,3 +59,76 @@ export declare const getSidebarAnnotationsWithRepliesGroupedByPage: (s: Annotati
|
|
|
43
59
|
* ]
|
|
44
60
|
*/
|
|
45
61
|
export declare const getSidebarAnnotationsWithReplies: (s: AnnotationDocumentState) => SidebarAnnotationEntry[];
|
|
62
|
+
/**
|
|
63
|
+
* Get all IRT child annotation info for cascade delete.
|
|
64
|
+
* Returns array of { id, pageIndex } for each annotation that references parentId.
|
|
65
|
+
*/
|
|
66
|
+
export declare const getIRTChildIds: (s: AnnotationDocumentState, parentId: string) => {
|
|
67
|
+
id: string;
|
|
68
|
+
pageIndex: number;
|
|
69
|
+
}[];
|
|
70
|
+
/**
|
|
71
|
+
* Check if an annotation has any IRT children (links, replies, etc.)
|
|
72
|
+
*/
|
|
73
|
+
export declare const hasIRTChildren: (s: AnnotationDocumentState, parentId: string) => boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Get IRT children filtered by annotation type (e.g., only LINK).
|
|
76
|
+
* @param s - The annotation document state
|
|
77
|
+
* @param parentId - The parent annotation ID
|
|
78
|
+
* @param types - Array of annotation subtypes to include
|
|
79
|
+
*/
|
|
80
|
+
export declare const getIRTChildrenByType: (s: AnnotationDocumentState, parentId: string, types: PdfAnnotationSubtype[]) => TrackedAnnotation[];
|
|
81
|
+
/**
|
|
82
|
+
* Get link annotations attached to a parent annotation via IRT relationship.
|
|
83
|
+
* @param s - The annotation document state
|
|
84
|
+
* @param parentId - The parent annotation ID
|
|
85
|
+
*/
|
|
86
|
+
export declare const getAttachedLinks: (s: AnnotationDocumentState, parentId: string) => TrackedAnnotation[];
|
|
87
|
+
/**
|
|
88
|
+
* Check if an annotation has attached link children.
|
|
89
|
+
* @param s - The annotation document state
|
|
90
|
+
* @param parentId - The parent annotation ID
|
|
91
|
+
*/
|
|
92
|
+
export declare const hasAttachedLinks: (s: AnnotationDocumentState, parentId: string) => boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Get the leader ID of a group.
|
|
95
|
+
* If the annotation has inReplyToId with replyType = Group, return the inReplyToId.
|
|
96
|
+
* Otherwise, the annotation itself is the leader.
|
|
97
|
+
*
|
|
98
|
+
* @param s - The annotation document state
|
|
99
|
+
* @param annotationId - The annotation ID to find the group leader for
|
|
100
|
+
* @returns The leader annotation ID, or undefined if annotation not found
|
|
101
|
+
*/
|
|
102
|
+
export declare const getGroupLeaderId: (s: AnnotationDocumentState, annotationId: string) => string | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Get all annotations in the same group as the given annotation.
|
|
105
|
+
* Returns the leader plus all annotations with inReplyToId pointing to leader and replyType = Group.
|
|
106
|
+
* Note: LINK annotations are excluded - they use IRT/Group for attachment but are not "group members"
|
|
107
|
+
* in the user-facing sense.
|
|
108
|
+
*
|
|
109
|
+
* @param s - The annotation document state
|
|
110
|
+
* @param annotationId - Any annotation ID in the group
|
|
111
|
+
* @returns Array of TrackedAnnotations in the group (including the annotation itself)
|
|
112
|
+
*/
|
|
113
|
+
export declare const getGroupMembers: (s: AnnotationDocumentState, annotationId: string) => TrackedAnnotation<PdfAnnotationObject>[];
|
|
114
|
+
/**
|
|
115
|
+
* Check if an annotation is part of a group.
|
|
116
|
+
* An annotation is in a group if:
|
|
117
|
+
* - It has inReplyToId with replyType = Group (it's a group member), OR
|
|
118
|
+
* - It has at least one other annotation pointing to it with replyType = Group (it's a group leader)
|
|
119
|
+
*
|
|
120
|
+
* Note: LINK annotations are excluded - they use IRT/Group for attachment but are not "group members"
|
|
121
|
+
* in the user-facing sense. An annotation with only attached links is NOT considered "in a group".
|
|
122
|
+
*
|
|
123
|
+
* @param s - The annotation document state
|
|
124
|
+
* @param annotationId - The annotation ID to check
|
|
125
|
+
* @returns true if the annotation is part of a group
|
|
126
|
+
*/
|
|
127
|
+
export declare const isInGroup: (s: AnnotationDocumentState, annotationId: string) => boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Determine what grouping action is available for the current selection.
|
|
130
|
+
*
|
|
131
|
+
* @param s - The annotation document state
|
|
132
|
+
* @returns The available grouping action
|
|
133
|
+
*/
|
|
134
|
+
export declare const getSelectionGroupingAction: (s: AnnotationDocumentState) => GroupingAction;
|
|
@@ -8,17 +8,19 @@ export declare const defaultTools: ({
|
|
|
8
8
|
textSelection: true;
|
|
9
9
|
isDraggable: false;
|
|
10
10
|
isResizable: false;
|
|
11
|
+
isGroupDraggable: false;
|
|
12
|
+
isGroupResizable: false;
|
|
11
13
|
cursor?: undefined;
|
|
12
14
|
lockAspectRatio?: undefined;
|
|
13
15
|
};
|
|
14
16
|
defaults: {
|
|
15
17
|
type: PdfAnnotationSubtype.HIGHLIGHT;
|
|
18
|
+
strokeColor: string;
|
|
16
19
|
color: string;
|
|
17
20
|
opacity: number;
|
|
18
21
|
blendMode: PdfBlendMode.Multiply;
|
|
19
22
|
strokeWidth?: undefined;
|
|
20
23
|
intent?: undefined;
|
|
21
|
-
strokeColor?: undefined;
|
|
22
24
|
strokeStyle?: undefined;
|
|
23
25
|
lineEndings?: undefined;
|
|
24
26
|
contents?: undefined;
|
|
@@ -39,17 +41,19 @@ export declare const defaultTools: ({
|
|
|
39
41
|
textSelection: true;
|
|
40
42
|
isDraggable: false;
|
|
41
43
|
isResizable: false;
|
|
44
|
+
isGroupDraggable: false;
|
|
45
|
+
isGroupResizable: false;
|
|
42
46
|
cursor?: undefined;
|
|
43
47
|
lockAspectRatio?: undefined;
|
|
44
48
|
};
|
|
45
49
|
defaults: {
|
|
46
50
|
type: PdfAnnotationSubtype.UNDERLINE;
|
|
51
|
+
strokeColor: string;
|
|
47
52
|
color: string;
|
|
48
53
|
opacity: number;
|
|
49
54
|
blendMode?: undefined;
|
|
50
55
|
strokeWidth?: undefined;
|
|
51
56
|
intent?: undefined;
|
|
52
|
-
strokeColor?: undefined;
|
|
53
57
|
strokeStyle?: undefined;
|
|
54
58
|
lineEndings?: undefined;
|
|
55
59
|
contents?: undefined;
|
|
@@ -68,19 +72,21 @@ export declare const defaultTools: ({
|
|
|
68
72
|
interaction: {
|
|
69
73
|
exclusive: false;
|
|
70
74
|
textSelection: true;
|
|
71
|
-
isDraggable
|
|
72
|
-
isResizable
|
|
75
|
+
isDraggable: false;
|
|
76
|
+
isResizable: false;
|
|
77
|
+
isGroupDraggable: false;
|
|
78
|
+
isGroupResizable: false;
|
|
73
79
|
cursor?: undefined;
|
|
74
80
|
lockAspectRatio?: undefined;
|
|
75
81
|
};
|
|
76
82
|
defaults: {
|
|
77
83
|
type: PdfAnnotationSubtype.STRIKEOUT;
|
|
84
|
+
strokeColor: string;
|
|
78
85
|
color: string;
|
|
79
86
|
opacity: number;
|
|
80
87
|
blendMode?: undefined;
|
|
81
88
|
strokeWidth?: undefined;
|
|
82
89
|
intent?: undefined;
|
|
83
|
-
strokeColor?: undefined;
|
|
84
90
|
strokeStyle?: undefined;
|
|
85
91
|
lineEndings?: undefined;
|
|
86
92
|
contents?: undefined;
|
|
@@ -101,17 +107,19 @@ export declare const defaultTools: ({
|
|
|
101
107
|
textSelection: true;
|
|
102
108
|
isDraggable: false;
|
|
103
109
|
isResizable: false;
|
|
110
|
+
isGroupDraggable: false;
|
|
111
|
+
isGroupResizable: false;
|
|
104
112
|
cursor?: undefined;
|
|
105
113
|
lockAspectRatio?: undefined;
|
|
106
114
|
};
|
|
107
115
|
defaults: {
|
|
108
116
|
type: PdfAnnotationSubtype.SQUIGGLY;
|
|
117
|
+
strokeColor: string;
|
|
109
118
|
color: string;
|
|
110
119
|
opacity: number;
|
|
111
120
|
blendMode?: undefined;
|
|
112
121
|
strokeWidth?: undefined;
|
|
113
122
|
intent?: undefined;
|
|
114
|
-
strokeColor?: undefined;
|
|
115
123
|
strokeStyle?: undefined;
|
|
116
124
|
lineEndings?: undefined;
|
|
117
125
|
contents?: undefined;
|
|
@@ -134,15 +142,17 @@ export declare const defaultTools: ({
|
|
|
134
142
|
isResizable: true;
|
|
135
143
|
lockAspectRatio: false;
|
|
136
144
|
textSelection?: undefined;
|
|
145
|
+
isGroupDraggable?: undefined;
|
|
146
|
+
isGroupResizable?: undefined;
|
|
137
147
|
};
|
|
138
148
|
defaults: {
|
|
139
149
|
type: PdfAnnotationSubtype.INK;
|
|
150
|
+
strokeColor: string;
|
|
140
151
|
color: string;
|
|
141
152
|
opacity: number;
|
|
142
153
|
strokeWidth: number;
|
|
143
154
|
blendMode?: undefined;
|
|
144
155
|
intent?: undefined;
|
|
145
|
-
strokeColor?: undefined;
|
|
146
156
|
strokeStyle?: undefined;
|
|
147
157
|
lineEndings?: undefined;
|
|
148
158
|
contents?: undefined;
|
|
@@ -165,15 +175,17 @@ export declare const defaultTools: ({
|
|
|
165
175
|
isResizable: true;
|
|
166
176
|
lockAspectRatio: false;
|
|
167
177
|
textSelection?: undefined;
|
|
178
|
+
isGroupDraggable?: undefined;
|
|
179
|
+
isGroupResizable?: undefined;
|
|
168
180
|
};
|
|
169
181
|
defaults: {
|
|
170
182
|
type: PdfAnnotationSubtype.INK;
|
|
171
183
|
intent: string;
|
|
184
|
+
strokeColor: string;
|
|
172
185
|
color: string;
|
|
173
186
|
opacity: number;
|
|
174
187
|
strokeWidth: number;
|
|
175
188
|
blendMode: PdfBlendMode.Multiply;
|
|
176
|
-
strokeColor?: undefined;
|
|
177
189
|
strokeStyle?: undefined;
|
|
178
190
|
lineEndings?: undefined;
|
|
179
191
|
contents?: undefined;
|
|
@@ -196,6 +208,8 @@ export declare const defaultTools: ({
|
|
|
196
208
|
isResizable: true;
|
|
197
209
|
lockAspectRatio: false;
|
|
198
210
|
textSelection?: undefined;
|
|
211
|
+
isGroupDraggable?: undefined;
|
|
212
|
+
isGroupResizable?: undefined;
|
|
199
213
|
};
|
|
200
214
|
defaults: {
|
|
201
215
|
type: PdfAnnotationSubtype.CIRCLE;
|
|
@@ -236,6 +250,8 @@ export declare const defaultTools: ({
|
|
|
236
250
|
isResizable: true;
|
|
237
251
|
lockAspectRatio: false;
|
|
238
252
|
textSelection?: undefined;
|
|
253
|
+
isGroupDraggable?: undefined;
|
|
254
|
+
isGroupResizable?: undefined;
|
|
239
255
|
};
|
|
240
256
|
defaults: {
|
|
241
257
|
type: PdfAnnotationSubtype.SQUARE;
|
|
@@ -275,7 +291,9 @@ export declare const defaultTools: ({
|
|
|
275
291
|
isDraggable: true;
|
|
276
292
|
isResizable: false;
|
|
277
293
|
lockAspectRatio: false;
|
|
294
|
+
isGroupResizable: true;
|
|
278
295
|
textSelection?: undefined;
|
|
296
|
+
isGroupDraggable?: undefined;
|
|
279
297
|
};
|
|
280
298
|
defaults: {
|
|
281
299
|
type: PdfAnnotationSubtype.LINE;
|
|
@@ -312,7 +330,9 @@ export declare const defaultTools: ({
|
|
|
312
330
|
isDraggable: true;
|
|
313
331
|
isResizable: false;
|
|
314
332
|
lockAspectRatio: false;
|
|
333
|
+
isGroupResizable: true;
|
|
315
334
|
textSelection?: undefined;
|
|
335
|
+
isGroupDraggable?: undefined;
|
|
316
336
|
};
|
|
317
337
|
defaults: {
|
|
318
338
|
type: PdfAnnotationSubtype.LINE;
|
|
@@ -352,7 +372,9 @@ export declare const defaultTools: ({
|
|
|
352
372
|
isDraggable: true;
|
|
353
373
|
isResizable: false;
|
|
354
374
|
lockAspectRatio: false;
|
|
375
|
+
isGroupResizable: true;
|
|
355
376
|
textSelection?: undefined;
|
|
377
|
+
isGroupDraggable?: undefined;
|
|
356
378
|
};
|
|
357
379
|
defaults: {
|
|
358
380
|
type: PdfAnnotationSubtype.POLYLINE;
|
|
@@ -383,7 +405,9 @@ export declare const defaultTools: ({
|
|
|
383
405
|
isDraggable: true;
|
|
384
406
|
isResizable: false;
|
|
385
407
|
lockAspectRatio: false;
|
|
408
|
+
isGroupResizable: true;
|
|
386
409
|
textSelection?: undefined;
|
|
410
|
+
isGroupDraggable?: undefined;
|
|
387
411
|
};
|
|
388
412
|
defaults: {
|
|
389
413
|
type: PdfAnnotationSubtype.POLYGON;
|
|
@@ -415,6 +439,8 @@ export declare const defaultTools: ({
|
|
|
415
439
|
isResizable: true;
|
|
416
440
|
lockAspectRatio: false;
|
|
417
441
|
textSelection?: undefined;
|
|
442
|
+
isGroupDraggable?: undefined;
|
|
443
|
+
isGroupResizable?: undefined;
|
|
418
444
|
};
|
|
419
445
|
defaults: {
|
|
420
446
|
type: PdfAnnotationSubtype.FREETEXT;
|
|
@@ -424,13 +450,13 @@ export declare const defaultTools: ({
|
|
|
424
450
|
fontFamily: PdfStandardFont.Helvetica;
|
|
425
451
|
textAlign: PdfTextAlignment.Left;
|
|
426
452
|
verticalAlign: PdfVerticalAlignment.Top;
|
|
453
|
+
color: string;
|
|
427
454
|
backgroundColor: string;
|
|
428
455
|
opacity: number;
|
|
429
|
-
|
|
456
|
+
strokeColor?: undefined;
|
|
430
457
|
blendMode?: undefined;
|
|
431
458
|
strokeWidth?: undefined;
|
|
432
459
|
intent?: undefined;
|
|
433
|
-
strokeColor?: undefined;
|
|
434
460
|
strokeStyle?: undefined;
|
|
435
461
|
lineEndings?: undefined;
|
|
436
462
|
};
|
|
@@ -455,15 +481,17 @@ export declare const defaultTools: ({
|
|
|
455
481
|
isResizable: true;
|
|
456
482
|
lockAspectRatio: true;
|
|
457
483
|
textSelection?: undefined;
|
|
484
|
+
isGroupDraggable?: undefined;
|
|
485
|
+
isGroupResizable?: undefined;
|
|
458
486
|
};
|
|
459
487
|
defaults: {
|
|
460
488
|
type: PdfAnnotationSubtype.STAMP;
|
|
489
|
+
strokeColor?: undefined;
|
|
461
490
|
color?: undefined;
|
|
462
491
|
opacity?: undefined;
|
|
463
492
|
blendMode?: undefined;
|
|
464
493
|
strokeWidth?: undefined;
|
|
465
494
|
intent?: undefined;
|
|
466
|
-
strokeColor?: undefined;
|
|
467
495
|
strokeStyle?: undefined;
|
|
468
496
|
lineEndings?: undefined;
|
|
469
497
|
contents?: undefined;
|