annotate-image 2.0.0-beta.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.
- package/LICENSE +338 -0
- package/dist/core.js +739 -0
- package/dist/core.min.js +1 -0
- package/dist/css/annotate.min.css +1 -0
- package/dist/jquery.js +746 -0
- package/dist/jquery.min.js +1 -0
- package/dist/react.js +794 -0
- package/dist/types/annotate-edit.d.ts +29 -0
- package/dist/types/annotate-image.d.ts +70 -0
- package/dist/types/annotate-view.d.ts +43 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/interactions.d.ts +7 -0
- package/dist/types/jquery.annotate.d.ts +6 -0
- package/dist/types/react.d.ts +43 -0
- package/dist/types/types.d.ts +119 -0
- package/dist/types/vue.d.ts +79 -0
- package/dist/vue.js +810 -0
- package/package.json +117 -0
- package/readme.md +389 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AnnotationNote } from './types';
|
|
2
|
+
import type { AnnotateImage } from './annotate-image';
|
|
3
|
+
import { AnnotateView } from './annotate-view';
|
|
4
|
+
/**
|
|
5
|
+
* Edit mode controller for a single annotation.
|
|
6
|
+
*
|
|
7
|
+
* Creates a draggable/resizable area with a text form, and handles
|
|
8
|
+
* save, delete, and cancel actions through the parent AnnotateImage.
|
|
9
|
+
*/
|
|
10
|
+
export declare class AnnotateEdit {
|
|
11
|
+
readonly image: AnnotateImage;
|
|
12
|
+
readonly area: HTMLElement;
|
|
13
|
+
readonly form: HTMLDivElement;
|
|
14
|
+
readonly textarea: HTMLTextAreaElement;
|
|
15
|
+
note: AnnotationNote;
|
|
16
|
+
private handlers;
|
|
17
|
+
private busy;
|
|
18
|
+
/**
|
|
19
|
+
* @param image - The parent AnnotateImage controller.
|
|
20
|
+
* @param note - Existing note to edit, or omit to create a new annotation.
|
|
21
|
+
* @param existingView - The view being edited (for updates); omit for new annotations.
|
|
22
|
+
*/
|
|
23
|
+
constructor(image: AnnotateImage, note?: AnnotationNote, existingView?: AnnotateView);
|
|
24
|
+
/** Tear down the edit form and interaction handlers. */
|
|
25
|
+
destroy(): void;
|
|
26
|
+
private addSaveButton;
|
|
27
|
+
private addDeleteButton;
|
|
28
|
+
private addCancelButton;
|
|
29
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { AnnotationNote, AnnotateImageOptions, AnnotateApi, NormalizedApi, NoteData, InteractionHandlers, AnnotateErrorContext } from './types';
|
|
2
|
+
import { AnnotateEdit } from './annotate-edit';
|
|
3
|
+
/** Strip internal fields (view, editable) before passing to callbacks. */
|
|
4
|
+
export declare function stripInternals(note: AnnotationNote): NoteData;
|
|
5
|
+
/** Normalize api config: convert string URLs to default fetch functions. */
|
|
6
|
+
export declare function normalizeApi(api: AnnotateApi): NormalizedApi;
|
|
7
|
+
/**
|
|
8
|
+
* Core annotation controller for a single image.
|
|
9
|
+
*
|
|
10
|
+
* Wraps the target image in a canvas overlay, manages annotation views
|
|
11
|
+
* and edit mode, and coordinates persistence through the configured API.
|
|
12
|
+
*/
|
|
13
|
+
export declare class AnnotateImage {
|
|
14
|
+
readonly img: HTMLImageElement;
|
|
15
|
+
readonly canvas: HTMLDivElement;
|
|
16
|
+
readonly viewOverlay: HTMLDivElement;
|
|
17
|
+
readonly editOverlay: HTMLDivElement;
|
|
18
|
+
button: HTMLButtonElement | undefined;
|
|
19
|
+
notes: AnnotationNote[];
|
|
20
|
+
private _mode;
|
|
21
|
+
options: AnnotateImageOptions;
|
|
22
|
+
/** Normalized transport API — all functions, no strings. */
|
|
23
|
+
api: NormalizedApi;
|
|
24
|
+
handlers: InteractionHandlers;
|
|
25
|
+
activeEdit: AnnotateEdit | null;
|
|
26
|
+
private destroyed;
|
|
27
|
+
/**
|
|
28
|
+
* @param img - Image element to annotate. Must be in the DOM with non-zero dimensions.
|
|
29
|
+
* @param options - Plugin configuration.
|
|
30
|
+
*/
|
|
31
|
+
constructor(img: HTMLImageElement, options: AnnotateImageOptions);
|
|
32
|
+
/** Current interaction mode — 'view' for browsing, 'edit' when an annotation is being created or modified. */
|
|
33
|
+
get mode(): 'view' | 'edit';
|
|
34
|
+
/** Switch between view and edit mode, toggling overlay visibility. */
|
|
35
|
+
setMode(newMode: 'view' | 'edit'): void;
|
|
36
|
+
/** Return current notes with internal fields stripped. */
|
|
37
|
+
getNotes(): NoteData[];
|
|
38
|
+
/** @internal Notify that the notes collection changed. */
|
|
39
|
+
notifyChange(): void;
|
|
40
|
+
/** @internal Notify that a note was saved, then fire onChange. */
|
|
41
|
+
notifySave(note: NoteData): void;
|
|
42
|
+
/** @internal Notify that a note was deleted, then fire onChange. */
|
|
43
|
+
notifyDelete(note: NoteData): void;
|
|
44
|
+
/** @internal Notify that notes were loaded, then fire onChange. */
|
|
45
|
+
notifyLoad(): void;
|
|
46
|
+
private destroyViews;
|
|
47
|
+
private createViews;
|
|
48
|
+
/** Rebuild annotation views from the current notes array. */
|
|
49
|
+
load(): void;
|
|
50
|
+
/** Remove all annotations and their views. */
|
|
51
|
+
clear(): void;
|
|
52
|
+
/** Tear down the plugin: remove canvas, restore the original image. Idempotent. */
|
|
53
|
+
destroy(): void;
|
|
54
|
+
/** Cancel the active edit (if any) and return to view mode. */
|
|
55
|
+
cancelEdit(): void;
|
|
56
|
+
/** Replace all annotations with new data. Does not fire lifecycle callbacks. */
|
|
57
|
+
setNotes(notes: AnnotationNote[]): void;
|
|
58
|
+
/** Toggle editing mode. Creates or removes Add Note button and rebuilds views. Does not fire lifecycle callbacks. */
|
|
59
|
+
setEditable(editable: boolean): void;
|
|
60
|
+
private createButton;
|
|
61
|
+
/** Report an API error via the onError callback, or log to console if none configured. */
|
|
62
|
+
reportError(context: AnnotateErrorContext): void;
|
|
63
|
+
/** Load annotations from the server via api.load. */
|
|
64
|
+
private loadFromApi;
|
|
65
|
+
/**
|
|
66
|
+
* Enter edit mode to create a new annotation.
|
|
67
|
+
* @returns true if edit mode was entered, false if already editing.
|
|
68
|
+
*/
|
|
69
|
+
add(): boolean;
|
|
70
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AnnotationNote } from './types';
|
|
2
|
+
import type { AnnotateImage } from './annotate-image';
|
|
3
|
+
/** Read position from inline styles (jsdom has no layout engine). */
|
|
4
|
+
export declare function readInlinePosition(el: HTMLElement): {
|
|
5
|
+
left: number;
|
|
6
|
+
top: number;
|
|
7
|
+
};
|
|
8
|
+
/** Read dimensions from inline styles, falling back to offsetWidth/offsetHeight. */
|
|
9
|
+
export declare function readInlineSize(el: HTMLElement): {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Renders a single annotation as a positioned area with a hover tooltip.
|
|
15
|
+
* Editable annotations support click-to-edit to open the edit form.
|
|
16
|
+
*/
|
|
17
|
+
export declare class AnnotateView {
|
|
18
|
+
readonly image: AnnotateImage;
|
|
19
|
+
readonly area: HTMLDivElement;
|
|
20
|
+
readonly tooltip: HTMLDivElement;
|
|
21
|
+
note: AnnotationNote;
|
|
22
|
+
editable: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* @param image - The parent AnnotateImage controller.
|
|
25
|
+
* @param note - Annotation data to display.
|
|
26
|
+
*/
|
|
27
|
+
constructor(image: AnnotateImage, note: AnnotationNote);
|
|
28
|
+
/** Apply the note's position and dimensions to the area element. */
|
|
29
|
+
setPosition(): void;
|
|
30
|
+
/** Update the view's position, size, and text from the edit area after a save. */
|
|
31
|
+
resetPosition(editable: {
|
|
32
|
+
area: HTMLElement;
|
|
33
|
+
note: AnnotationNote;
|
|
34
|
+
}, text: string): void;
|
|
35
|
+
/** Show the tooltip and apply hover styling. */
|
|
36
|
+
show(): void;
|
|
37
|
+
/** Hide the tooltip and remove hover styling. */
|
|
38
|
+
hide(): void;
|
|
39
|
+
/** Remove the annotation's DOM elements. */
|
|
40
|
+
destroy(): void;
|
|
41
|
+
/** Open the edit form for this annotation (only if in view mode). */
|
|
42
|
+
edit(): void;
|
|
43
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AnnotateImage } from './annotate-image';
|
|
2
|
+
import { DEFAULT_LABELS } from './types';
|
|
3
|
+
import type { AnnotationNote, AnnotateImageOptions, AnnotateApi, AnnotateErrorContext, SaveResult, NoteData, Labels } from './types';
|
|
4
|
+
export { AnnotateImage, DEFAULT_LABELS };
|
|
5
|
+
export type { AnnotationNote, AnnotateImageOptions, AnnotateApi, AnnotateErrorContext, SaveResult, NoteData, Labels };
|
|
6
|
+
/**
|
|
7
|
+
* Create an annotation layer on an image element.
|
|
8
|
+
*
|
|
9
|
+
* The image must already be loaded and have non-zero dimensions.
|
|
10
|
+
* Returns the AnnotateImage instance that manages the annotation lifecycle.
|
|
11
|
+
*
|
|
12
|
+
* @param img - The image element to annotate. Must be in the DOM with non-zero dimensions.
|
|
13
|
+
* @param options - Plugin configuration (editable, notes, api callbacks, etc.).
|
|
14
|
+
* @returns The AnnotateImage instance.
|
|
15
|
+
*/
|
|
16
|
+
export declare function annotate(img: HTMLImageElement, options?: Partial<AnnotateImageOptions>): AnnotateImage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DragCallbacks, ResizeCallbacks, InteractionHandlers } from './types';
|
|
2
|
+
export declare function makeDraggable(el: HTMLElement, opts: DragCallbacks): void;
|
|
3
|
+
export declare function destroyDraggable(el: HTMLElement): void;
|
|
4
|
+
export declare function makeResizable(el: HTMLElement, opts: ResizeCallbacks): void;
|
|
5
|
+
export declare function destroyResizable(el: HTMLElement): void;
|
|
6
|
+
/** Returns an InteractionHandlers object using vanilla pointer events. */
|
|
7
|
+
export declare function createDefaultHandlers(): InteractionHandlers;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AnnotationNote, NoteData, AnnotateErrorContext } from './types';
|
|
2
|
+
/** Props for the AnnotateImage React component. */
|
|
3
|
+
export interface AnnotateImageProps {
|
|
4
|
+
/** Image source URL. */
|
|
5
|
+
src: string;
|
|
6
|
+
/** Image width in pixels. Required if image may not be loaded yet. */
|
|
7
|
+
width?: number;
|
|
8
|
+
/** Image height in pixels. Required if image may not be loaded yet. */
|
|
9
|
+
height?: number;
|
|
10
|
+
/** Image alt text for accessibility. */
|
|
11
|
+
alt?: string;
|
|
12
|
+
/** Annotations to render. */
|
|
13
|
+
notes?: AnnotationNote[];
|
|
14
|
+
/** Enable annotation editing. Default: true. */
|
|
15
|
+
editable?: boolean;
|
|
16
|
+
/** Called after any notes mutation. */
|
|
17
|
+
onChange?: (notes: NoteData[]) => void;
|
|
18
|
+
/** Called after a note is saved (new or edited). */
|
|
19
|
+
onSave?: (note: NoteData) => void;
|
|
20
|
+
/** Called after a note is deleted. */
|
|
21
|
+
onDelete?: (note: NoteData) => void;
|
|
22
|
+
/** Called after notes are loaded. */
|
|
23
|
+
onLoad?: (notes: NoteData[]) => void;
|
|
24
|
+
/** Called when an operation fails. */
|
|
25
|
+
onError?: (context: AnnotateErrorContext) => void;
|
|
26
|
+
}
|
|
27
|
+
/** Imperative methods exposed via ref. */
|
|
28
|
+
export interface AnnotateImageRef {
|
|
29
|
+
/** Enter add-note mode. */
|
|
30
|
+
add(): void;
|
|
31
|
+
/** Remove all annotations. */
|
|
32
|
+
clear(): void;
|
|
33
|
+
/** Return current annotations (internal fields stripped). */
|
|
34
|
+
getNotes(): NoteData[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* React component for image annotation.
|
|
38
|
+
* Wraps the vanilla AnnotateImage core with reactive state and event callbacks.
|
|
39
|
+
*
|
|
40
|
+
* @remarks SSR-safe — renders a plain `<img>` on the server. DOM manipulation
|
|
41
|
+
* only runs in useEffect (client-side).
|
|
42
|
+
*/
|
|
43
|
+
export declare const AnnotateImage: import("react").ForwardRefExoticComponent<AnnotateImageProps & import("react").RefAttributes<AnnotateImageRef>>;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type { AnnotateView } from './annotate-view';
|
|
2
|
+
export interface AnnotationNote {
|
|
3
|
+
id: string;
|
|
4
|
+
top: number;
|
|
5
|
+
left: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
text: string;
|
|
9
|
+
editable: boolean;
|
|
10
|
+
view?: AnnotateView;
|
|
11
|
+
}
|
|
12
|
+
/** Response from a save operation. */
|
|
13
|
+
export interface SaveResult {
|
|
14
|
+
annotation_id?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Per-note data passed to save/delete callbacks.
|
|
18
|
+
* AnnotationNote without internal fields (view, editable).
|
|
19
|
+
*/
|
|
20
|
+
export type NoteData = Omit<AnnotationNote, 'view' | 'editable'>;
|
|
21
|
+
export interface AnnotateErrorContext {
|
|
22
|
+
type: 'load' | 'save' | 'delete';
|
|
23
|
+
error: Error;
|
|
24
|
+
note?: AnnotationNote;
|
|
25
|
+
}
|
|
26
|
+
/** Transport configuration for server persistence. */
|
|
27
|
+
export interface AnnotateApi {
|
|
28
|
+
/**
|
|
29
|
+
* Load annotations from the server.
|
|
30
|
+
* - String: GET request to this URL, expects AnnotationNote[] JSON response.
|
|
31
|
+
* - Function: called on init, must resolve with the annotations array.
|
|
32
|
+
*/
|
|
33
|
+
load?: string | (() => Promise<AnnotationNote[]>);
|
|
34
|
+
/**
|
|
35
|
+
* Persist an annotation to the server.
|
|
36
|
+
* - String: POST request to this URL with JSON body, expects SaveResult response.
|
|
37
|
+
* - Function: called with note data, must resolve with SaveResult on success.
|
|
38
|
+
*/
|
|
39
|
+
save?: string | ((note: NoteData) => Promise<SaveResult>);
|
|
40
|
+
/**
|
|
41
|
+
* Delete an annotation from the server.
|
|
42
|
+
* - String: POST request to this URL with JSON body.
|
|
43
|
+
* - Function: called with note data, must resolve on success.
|
|
44
|
+
*/
|
|
45
|
+
delete?: string | ((note: NoteData) => Promise<void>);
|
|
46
|
+
}
|
|
47
|
+
/** Normalized transport — all functions, no strings. Used internally. */
|
|
48
|
+
export interface NormalizedApi {
|
|
49
|
+
load?: () => Promise<AnnotationNote[]>;
|
|
50
|
+
save?: (note: NoteData) => Promise<SaveResult>;
|
|
51
|
+
delete?: (note: NoteData) => Promise<void>;
|
|
52
|
+
}
|
|
53
|
+
/** Configurable UI labels. All fields optional; missing fields use defaults. */
|
|
54
|
+
export interface Labels {
|
|
55
|
+
/** "Add Note" button text and tooltip. Default: "Add Note". */
|
|
56
|
+
addNote?: string;
|
|
57
|
+
/** Save button text. Default: "OK". */
|
|
58
|
+
save?: string;
|
|
59
|
+
/** Delete button text. Default: "Delete". */
|
|
60
|
+
delete?: string;
|
|
61
|
+
/** Cancel button text. Default: "Cancel". */
|
|
62
|
+
cancel?: string;
|
|
63
|
+
/** Textarea placeholder text. Default: "" (no placeholder). */
|
|
64
|
+
placeholder?: string;
|
|
65
|
+
}
|
|
66
|
+
/** Built-in defaults for all UI labels. */
|
|
67
|
+
export declare const DEFAULT_LABELS: Required<Labels>;
|
|
68
|
+
export interface AnnotateImageOptions {
|
|
69
|
+
/** Enable annotation editing. Default: true. */
|
|
70
|
+
editable: boolean;
|
|
71
|
+
/** Static annotation data to render on init. Default: []. */
|
|
72
|
+
notes: AnnotationNote[];
|
|
73
|
+
/** Server persistence configuration. Omit for static-only mode. */
|
|
74
|
+
api?: AnnotateApi;
|
|
75
|
+
/** Called when a load/save/delete operation fails. */
|
|
76
|
+
onError?: (context: AnnotateErrorContext) => void;
|
|
77
|
+
/** Called after any notes mutation (load, save, delete, clear). */
|
|
78
|
+
onChange?: (notes: NoteData[]) => void;
|
|
79
|
+
/** Called after a note is saved (new or edited). */
|
|
80
|
+
onSave?: (note: NoteData) => void;
|
|
81
|
+
/** Called after a note is deleted. */
|
|
82
|
+
onDelete?: (note: NoteData) => void;
|
|
83
|
+
/** Called after notes are loaded (initial or via api.load). */
|
|
84
|
+
onLoad?: (notes: NoteData[]) => void;
|
|
85
|
+
/** UI label overrides. Missing fields use built-in defaults. */
|
|
86
|
+
labels?: Labels;
|
|
87
|
+
}
|
|
88
|
+
export interface DragCallbacks {
|
|
89
|
+
containment?: HTMLElement;
|
|
90
|
+
onDrag?: (pos: {
|
|
91
|
+
left: number;
|
|
92
|
+
top: number;
|
|
93
|
+
}) => void;
|
|
94
|
+
onStop?: (pos: {
|
|
95
|
+
left: number;
|
|
96
|
+
top: number;
|
|
97
|
+
}) => void;
|
|
98
|
+
}
|
|
99
|
+
export interface ResizeCallbacks {
|
|
100
|
+
containment?: HTMLElement;
|
|
101
|
+
onResize?: (rect: {
|
|
102
|
+
left: number;
|
|
103
|
+
top: number;
|
|
104
|
+
width: number;
|
|
105
|
+
height: number;
|
|
106
|
+
}) => void;
|
|
107
|
+
onStop?: (rect: {
|
|
108
|
+
left: number;
|
|
109
|
+
top: number;
|
|
110
|
+
width: number;
|
|
111
|
+
height: number;
|
|
112
|
+
}) => void;
|
|
113
|
+
}
|
|
114
|
+
export interface InteractionHandlers {
|
|
115
|
+
makeDraggable: (el: HTMLElement, opts: DragCallbacks) => void;
|
|
116
|
+
makeResizable: (el: HTMLElement, opts: ResizeCallbacks) => void;
|
|
117
|
+
destroyDraggable: (el: HTMLElement) => void;
|
|
118
|
+
destroyResizable: (el: HTMLElement) => void;
|
|
119
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { AnnotationNote, NoteData, AnnotateErrorContext } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Vue component for image annotation.
|
|
4
|
+
* Wraps the vanilla AnnotateImage core with reactive state and Vue events.
|
|
5
|
+
*
|
|
6
|
+
* @remarks SSR-safe — renders a plain `<img>` on the server. DOM manipulation
|
|
7
|
+
* only runs in onMounted (client-side).
|
|
8
|
+
*/
|
|
9
|
+
export declare const AnnotateImage: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
|
+
/** Image source URL. */
|
|
11
|
+
src: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
/** Image width in pixels. Required if image may not be loaded yet. */
|
|
16
|
+
width: {
|
|
17
|
+
type: NumberConstructor;
|
|
18
|
+
};
|
|
19
|
+
/** Image height in pixels. Required if image may not be loaded yet. */
|
|
20
|
+
height: {
|
|
21
|
+
type: NumberConstructor;
|
|
22
|
+
};
|
|
23
|
+
/** Image alt text for accessibility. */
|
|
24
|
+
alt: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
};
|
|
27
|
+
/** Annotations to render. */
|
|
28
|
+
notes: {
|
|
29
|
+
type: () => AnnotationNote[];
|
|
30
|
+
};
|
|
31
|
+
/** Enable annotation editing. Default: true. */
|
|
32
|
+
editable: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
save: (_note: NoteData) => true;
|
|
40
|
+
delete: (_note: NoteData) => true;
|
|
41
|
+
load: (_notes: NoteData[]) => true;
|
|
42
|
+
change: (_notes: NoteData[]) => true;
|
|
43
|
+
error: (_context: AnnotateErrorContext) => true;
|
|
44
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
45
|
+
/** Image source URL. */
|
|
46
|
+
src: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
required: true;
|
|
49
|
+
};
|
|
50
|
+
/** Image width in pixels. Required if image may not be loaded yet. */
|
|
51
|
+
width: {
|
|
52
|
+
type: NumberConstructor;
|
|
53
|
+
};
|
|
54
|
+
/** Image height in pixels. Required if image may not be loaded yet. */
|
|
55
|
+
height: {
|
|
56
|
+
type: NumberConstructor;
|
|
57
|
+
};
|
|
58
|
+
/** Image alt text for accessibility. */
|
|
59
|
+
alt: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
};
|
|
62
|
+
/** Annotations to render. */
|
|
63
|
+
notes: {
|
|
64
|
+
type: () => AnnotationNote[];
|
|
65
|
+
};
|
|
66
|
+
/** Enable annotation editing. Default: true. */
|
|
67
|
+
editable: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
}>> & Readonly<{
|
|
72
|
+
onChange?: ((_notes: NoteData[]) => any) | undefined;
|
|
73
|
+
onError?: ((_context: AnnotateErrorContext) => any) | undefined;
|
|
74
|
+
onLoad?: ((_notes: NoteData[]) => any) | undefined;
|
|
75
|
+
onSave?: ((_note: NoteData) => any) | undefined;
|
|
76
|
+
onDelete?: ((_note: NoteData) => any) | undefined;
|
|
77
|
+
}>, {
|
|
78
|
+
editable: boolean;
|
|
79
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|