@markerjs/markerjs3 3.0.0-alpha.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 ADDED
@@ -0,0 +1,25 @@
1
+ marker.js 3 Linkware License
2
+
3
+ Copyright (c) 2024 Alan Mendelevich
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ 1. The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ 2. Link back to the Software website displayed during operation of the Software
16
+ or an equivalent prominent public attribution must be retained. Alternative
17
+ commercial licenses can be obtained to remove this clause.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # marker.js 3 — Add image annotation to your web apps
2
+
3
+ > **Note**: marker.js 3 is in the early pre-release stage of its lifecycle and will have many additions and breaking changes before the official 3.0 release.
4
+ >
5
+ > If you need a stable image annotation library, consider using [marker.js 2](https://markerjs.com) for now.
6
+
7
+ marker.js 3 is a JavaScript browser library to enable image annotation in your web applications. Add marker.js 3 to your web app and instantly enable users to annotate and mark up images. You can save, share or otherwise process the results.
8
+
9
+ ## Installation
10
+
11
+ ```
12
+ npm install @markerjs/markerjs3
13
+ ```
14
+
15
+ or
16
+
17
+ ```
18
+ yarn add @markerjs/markerjs3
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ *coming soon...*
24
+
25
+ ## Demos
26
+
27
+ *coming soon...*
28
+
29
+ ## More docs and tutorials
30
+
31
+ *coming soon...*
32
+
33
+ ## License
34
+ Linkware (see [LICENSE](https://github.com/ailon/markerjs3/blob/master/LICENSE) for details) - the UI displays a small link back to the marker.js 3 website which should be retained.
35
+
36
+ Alternative licenses are available through the [marker.js website](https://markerjs.com).
package/markerjs3.d.ts ADDED
@@ -0,0 +1,620 @@
1
+ /**
2
+ * Describes point objects used internally
3
+ */
4
+ interface IPoint {
5
+ /**
6
+ * Horizontal (X) coordinate.
7
+ */
8
+ x: number;
9
+ /**
10
+ * Vertical (Y) coordinate.
11
+ */
12
+ y: number;
13
+ }
14
+
15
+ /**
16
+ * Utility class to simplify SVG operations.
17
+ */
18
+ declare class SvgHelper {
19
+ /**
20
+ * Creates SVG "defs".
21
+ */
22
+ static createDefs(): SVGDefsElement;
23
+ /**
24
+ * Sets attributes on an arbitrary SVG element
25
+ * @param el - target SVG element.
26
+ * @param attributes - set of name-value attribute pairs.
27
+ */
28
+ static setAttributes(el: SVGElement, attributes: Array<[string, string]>): void;
29
+ /**
30
+ * Creates an SVG rectangle with the specified width and height.
31
+ * @param width
32
+ * @param height
33
+ * @param attributes - additional attributes.
34
+ */
35
+ static createRect(width: number | string, height: number | string, attributes?: Array<[string, string]>): SVGRectElement;
36
+ /**
37
+ * Creates an SVG line with specified end-point coordinates.
38
+ * @param x1
39
+ * @param y1
40
+ * @param x2
41
+ * @param y2
42
+ * @param attributes - additional attributes.
43
+ */
44
+ static createLine(x1: number | string, y1: number | string, x2: number | string, y2: number | string, attributes?: Array<[string, string]>): SVGLineElement;
45
+ /**
46
+ * Creates an SVG polygon with specified points.
47
+ * @param points - points as string.
48
+ * @param attributes - additional attributes.
49
+ */
50
+ static createPolygon(points: string, attributes?: Array<[string, string]>): SVGPolygonElement;
51
+ /**
52
+ * Creates an SVG circle with the specified radius.
53
+ * @param radius
54
+ * @param attributes - additional attributes.
55
+ */
56
+ static createCircle(radius: number, attributes?: Array<[string, string]>): SVGCircleElement;
57
+ /**
58
+ * Creates an SVG ellipse with the specified horizontal and vertical radii.
59
+ * @param rx
60
+ * @param ry
61
+ * @param attributes - additional attributes.
62
+ */
63
+ static createEllipse(rx: number, ry: number, attributes?: Array<[string, string]>): SVGEllipseElement;
64
+ /**
65
+ * Creates an SVG group.
66
+ * @param attributes - additional attributes.
67
+ */
68
+ static createGroup(attributes?: Array<[string, string]>): SVGGElement;
69
+ /**
70
+ * Creates an SVG transform.
71
+ */
72
+ static createTransform(): SVGTransform;
73
+ /**
74
+ * Creates an SVG marker.
75
+ * @param id
76
+ * @param orient
77
+ * @param markerWidth
78
+ * @param markerHeight
79
+ * @param refX
80
+ * @param refY
81
+ * @param markerElement
82
+ */
83
+ static createMarker(id: string, orient: string, markerWidth: number | string, markerHeight: number | string, refX: number | string, refY: number | string, markerElement: SVGGraphicsElement): SVGMarkerElement;
84
+ /**
85
+ * Creates an SVG text element.
86
+ * @param attributes - additional attributes.
87
+ */
88
+ static createText(attributes?: Array<[string, string]>): SVGTextElement;
89
+ /**
90
+ * Creates an SVG TSpan.
91
+ * @param text - inner text.
92
+ * @param attributes - additional attributes.
93
+ */
94
+ static createTSpan(text: string, attributes?: Array<[string, string]>): SVGTSpanElement;
95
+ /**
96
+ * Creates an SVG image element.
97
+ * @param attributes - additional attributes.
98
+ */
99
+ static createImage(attributes?: Array<[string, string]>): SVGImageElement;
100
+ /**
101
+ * Creates an SVG point with the specified coordinates.
102
+ * @param x
103
+ * @param y
104
+ */
105
+ static createPoint(x: number, y: number): SVGPoint;
106
+ /**
107
+ * Creates an SVG path with the specified shape (d).
108
+ * @param d - path shape
109
+ * @param attributes - additional attributes.
110
+ */
111
+ static createPath(d: string, attributes?: Array<[string, string]>): SVGPathElement;
112
+ /**
113
+ * Creates an SVG text element.
114
+ * @param attributes - additional attributes.
115
+ */
116
+ static createForeignObject(attributes?: Array<[string, string]>): SVGForeignObjectElement;
117
+ /**
118
+ * Returns local coordinates relative to the provided `localRoot` of a client (screen) point.
119
+ * @param localRoot relative coordinate root
120
+ * @param x horizontal client coordinate
121
+ * @param y vertical client coordinate
122
+ * @param zoomLevel zoom level
123
+ * @returns local coordinates relative to `localRoot`
124
+ */
125
+ static clientToLocalCoordinates(localRoot: SVGElement | undefined, x: number, y: number, zoomLevel?: number): IPoint;
126
+ /**
127
+ * Creates an SVG image element from a supplied inner SVG markup string.
128
+ * @param stringSvg SVG markup (without the root svg tags)
129
+ * @returns SVG image element
130
+ */
131
+ static createSvgFromString(stringSvg: string): SVGSVGElement;
132
+ }
133
+
134
+ /**
135
+ * Represents marker's state used to save and restore state continue annotation in the future.
136
+ */
137
+ interface MarkerBaseState {
138
+ /**
139
+ * Marker's type name.
140
+ */
141
+ typeName: string;
142
+ /**
143
+ * Additional information about the marker.
144
+ */
145
+ notes?: string;
146
+ strokeColor?: string;
147
+ strokeWidth?: number;
148
+ strokeDasharray?: string;
149
+ opacity?: number;
150
+ }
151
+
152
+ /**
153
+ * Describes a size
154
+ */
155
+ interface ISize {
156
+ width: number;
157
+ height: number;
158
+ }
159
+
160
+ type MarkerStage = 'creating' | 'normal';
161
+ declare class MarkerBase {
162
+ static typeName: string;
163
+ get typeName(): string;
164
+ protected _container: SVGGElement;
165
+ /**
166
+ * SVG container object holding the marker's visual.
167
+ */
168
+ get container(): SVGGElement;
169
+ /**
170
+ * Additional information about the marker
171
+ */
172
+ notes?: string;
173
+ /**
174
+ * The default marker size when the marker is created with a click (without dragging).
175
+ */
176
+ defaultSize: ISize;
177
+ /**
178
+ * Marker type title (display name) used for accessibility and other attributes.
179
+ */
180
+ static title: string;
181
+ stage: MarkerStage;
182
+ protected _strokeColor: string;
183
+ get strokeColor(): string;
184
+ set strokeColor(color: string);
185
+ protected applyStrokeColor(): void;
186
+ protected _fillColor: string;
187
+ get fillColor(): string;
188
+ set fillColor(color: string);
189
+ protected applyFillColor(): void;
190
+ protected _strokeWidth: number;
191
+ get strokeWidth(): number;
192
+ set strokeWidth(value: number);
193
+ protected applyStrokeWidth(): void;
194
+ protected _strokeDasharray: string;
195
+ get strokeDasharray(): string;
196
+ set strokeDasharray(value: string);
197
+ protected applyStrokeDasharray(): void;
198
+ protected _opacity: number;
199
+ get opacity(): number;
200
+ set opacity(value: number);
201
+ protected applyOpacity(): void;
202
+ constructor(container: SVGGElement);
203
+ /**
204
+ * Returns true if passed SVG element belongs to the marker. False otherwise.
205
+ *
206
+ * @param el - target element.
207
+ */
208
+ ownsTarget(el: EventTarget): boolean;
209
+ /**
210
+ * Disposes the marker and clean's up.
211
+ */
212
+ dispose(): void;
213
+ protected addMarkerVisualToContainer(element: SVGElement): void;
214
+ getOutline(): string;
215
+ /**
216
+ * Returns current marker state that can be restored in the future.
217
+ */
218
+ getState(): MarkerBaseState;
219
+ /**
220
+ * Restores previously saved marker state.
221
+ *
222
+ * @param state - previously saved state.
223
+ */
224
+ restoreState(state: MarkerBaseState): void;
225
+ /**
226
+ * Scales marker. Used after the image resize.
227
+ *
228
+ * @param scaleX - horizontal scale
229
+ * @param scaleY - vertical scale
230
+ */
231
+ scale(scaleX: number, scaleY: number): void;
232
+ }
233
+
234
+ interface AnnotationState {
235
+ version?: number;
236
+ width: number;
237
+ height: number;
238
+ markers: MarkerBaseState[];
239
+ }
240
+
241
+ interface MarkerEditorProperties<TMarkerType extends MarkerBase = MarkerBase> {
242
+ /**
243
+ * SVG container for the marker and editor elements.
244
+ */
245
+ container: SVGGElement;
246
+ /**
247
+ * HTML overlay container for editor's HTML elements (such as label text editor).
248
+ */
249
+ overlayContainer: HTMLDivElement;
250
+ /**
251
+ * Type of marker to create.
252
+ */
253
+ markerType: new (container: SVGGElement) => TMarkerType;
254
+ /**
255
+ * Previously created marker to edit.
256
+ */
257
+ marker?: TMarkerType;
258
+ }
259
+
260
+ /**
261
+ * Represents marker's state (status) in time.
262
+ */
263
+ type MarkerEditorState = 'new' | 'creating' | 'select' | 'move' | 'resize' | 'rotate' | 'edit';
264
+ type MarkerCreationStyle = 'draw' | 'drop';
265
+ declare class MarkerBaseEditor<TMarkerType extends MarkerBase = MarkerBase> {
266
+ protected _markerType: new (container: SVGGElement) => TMarkerType;
267
+ protected _creationStyle: MarkerCreationStyle;
268
+ get creationStyle(): MarkerCreationStyle;
269
+ /**
270
+ * Type guard for specific marker editor types.
271
+ * @param cls
272
+ * @returns
273
+ */
274
+ is<T>(cls: new (...args: any[]) => T): this is T;
275
+ protected _marker: TMarkerType;
276
+ get marker(): TMarkerType;
277
+ protected _container: SVGGElement;
278
+ /**
279
+ * Returns the SVG container for the marker's and editor's visual elements.
280
+ */
281
+ get container(): SVGGElement;
282
+ /**
283
+ * Overlay container for HTML elements like text editors, etc.
284
+ */
285
+ protected _overlayContainer: HTMLDivElement;
286
+ /**
287
+ * Overlay container for HTML elements like text editors, etc.
288
+ */
289
+ get overlayContainer(): HTMLDivElement;
290
+ /**
291
+ * Editor's state.
292
+ */
293
+ protected _state: MarkerEditorState;
294
+ /**
295
+ * Gets editor's state.
296
+ */
297
+ get state(): MarkerEditorState;
298
+ /**
299
+ * Sets editor's state.
300
+ */
301
+ set state(value: MarkerEditorState);
302
+ /**
303
+ * SVG group holding editor's control box.
304
+ */
305
+ protected _controlBox: SVGGElement;
306
+ /**
307
+ * Method called when marker creation is finished.
308
+ */
309
+ onMarkerCreated?: <T extends MarkerBaseEditor<MarkerBase>>(editor: T) => void;
310
+ /**
311
+ * Method to call when marker state changes.
312
+ */
313
+ onStateChanged?: <T extends MarkerBaseEditor<MarkerBase>>(editor: T) => void;
314
+ /**
315
+ * Marker's state when it is selected
316
+ */
317
+ protected manipulationStartState?: string;
318
+ /**
319
+ * Is this marker selected?
320
+ */
321
+ protected _isSelected: boolean;
322
+ /**
323
+ * Returns true if the marker is currently selected
324
+ */
325
+ get isSelected(): boolean;
326
+ protected _continuousCreation: boolean;
327
+ get continuousCreation(): boolean;
328
+ /**
329
+ * Sets rectangle's border stroke color.
330
+ * @param color - color as string
331
+ */
332
+ set strokeColor(color: string);
333
+ get strokeColor(): string;
334
+ /**
335
+ * Sets rectangle's border stroke (line) width.
336
+ * @param color - color as string
337
+ */
338
+ set strokeWidth(width: number);
339
+ get strokeWidth(): number;
340
+ /**
341
+ * Sets rectangle's border stroke dash array.
342
+ * @param color - color as string
343
+ */
344
+ set strokeDasharray(dashes: string);
345
+ get strokeDasharray(): string;
346
+ set fillColor(color: string);
347
+ get fillColor(): string;
348
+ set opacity(value: number);
349
+ get opacity(): number;
350
+ constructor(properties: MarkerEditorProperties<TMarkerType>);
351
+ ownsTarget(el: EventTarget | null): boolean;
352
+ /**
353
+ * Selects this marker and displays appropriate selected marker UI.
354
+ */
355
+ select(): void;
356
+ /**
357
+ * Deselects this marker and hides selected marker UI.
358
+ */
359
+ deselect(): void;
360
+ /**
361
+ * Handles pointer (mouse, touch, stylus, etc.) down event.
362
+ *
363
+ * @param point - event coordinates.
364
+ * @param target - direct event target element.
365
+ */
366
+ pointerDown(point: IPoint, target?: EventTarget): void;
367
+ /**
368
+ * Handles pointer (mouse, touch, stylus, etc.) double click event.
369
+ *
370
+ * @param point - event coordinates.
371
+ * @param target - direct event target element.
372
+ */
373
+ dblClick(point: IPoint, target?: EventTarget): void;
374
+ /**
375
+ * Handles marker manipulation (move, resize, rotate, etc.).
376
+ *
377
+ * @param point - event coordinates.
378
+ */
379
+ manipulate(point: IPoint): void;
380
+ /**
381
+ * Handles pointer (mouse, touch, stylus, etc.) up event.
382
+ *
383
+ * @param point - event coordinates.
384
+ */
385
+ pointerUp(point: IPoint): void;
386
+ /**
387
+ * Disposes the marker and clean's up.
388
+ */
389
+ dispose(): void;
390
+ protected adjustControlBox(): void;
391
+ scale(scaleX: number, scaleY: number): void;
392
+ /**
393
+ * Called by a marker when its state could have changed.
394
+ * Does a check if the state has indeed changed before firing the handler.
395
+ */
396
+ protected stateChanged(): void;
397
+ getState(): MarkerBaseState;
398
+ /**
399
+ * Restores previously saved marker state.
400
+ *
401
+ * @param state - previously saved state.
402
+ */
403
+ restoreState(state: MarkerBaseState): void;
404
+ }
405
+
406
+ interface MarkerAreaEventMap {
407
+ /**
408
+ * Marker area initialized.
409
+ */
410
+ areainit: CustomEvent<MarkerAreaEventData>;
411
+ areashow: CustomEvent<MarkerAreaEventData>;
412
+ arearestorestate: CustomEvent<MarkerAreaEventData>;
413
+ areafocus: CustomEvent<MarkerAreaEventData>;
414
+ areablur: CustomEvent<MarkerAreaEventData>;
415
+ areastatechange: CustomEvent<MarkerAreaEventData>;
416
+ markerselect: CustomEvent<MarkerEditorEventData>;
417
+ markerdeselect: CustomEvent<MarkerEditorEventData>;
418
+ markercreating: CustomEvent<MarkerEditorEventData>;
419
+ markercreate: CustomEvent<MarkerEditorEventData>;
420
+ markerbeforedelete: CustomEvent<MarkerEditorEventData>;
421
+ markerdelete: CustomEvent<MarkerEditorEventData>;
422
+ markerchange: CustomEvent<MarkerEditorEventData>;
423
+ }
424
+ interface MarkerAreaEventData {
425
+ /**
426
+ * {@link MarkerArea} instance.
427
+ */
428
+ markerArea: MarkerArea;
429
+ }
430
+ interface MarkerEditorEventData extends MarkerAreaEventData {
431
+ markerEditor: MarkerBaseEditor;
432
+ }
433
+ declare class MarkerArea extends HTMLElement {
434
+ private _contentContainer?;
435
+ private _canvasContainer?;
436
+ private _overlayContainer;
437
+ private _overlayContentContainer;
438
+ private _mainCanvas?;
439
+ private _groupLayer?;
440
+ private _editingTarget?;
441
+ private width;
442
+ private height;
443
+ private _targetWidth;
444
+ get targetWidth(): number;
445
+ set targetWidth(value: number);
446
+ private _targetHeight;
447
+ get targetHeight(): number;
448
+ set targetHeight(value: number);
449
+ private mode;
450
+ private _logoUI?;
451
+ private _isInitialized;
452
+ private _currentMarkerEditor?;
453
+ get currentMarkerEditor(): MarkerBaseEditor | undefined;
454
+ private _newMarkerOutline;
455
+ private _targetImage;
456
+ get targetImage(): HTMLImageElement | undefined;
457
+ set targetImage(value: HTMLImageElement | undefined);
458
+ markerEditors: Map<typeof MarkerBase, typeof MarkerBaseEditor<MarkerBase>>;
459
+ editors: MarkerBaseEditor[];
460
+ private _zoomLevel;
461
+ /**
462
+ * Returns the current zoom level.
463
+ */
464
+ get zoomLevel(): number;
465
+ /**
466
+ * Sets the current zoom level.
467
+ */
468
+ set zoomLevel(value: number);
469
+ private prevPanPoint;
470
+ private panTo;
471
+ private undoRedoManager;
472
+ constructor();
473
+ private connectedCallback;
474
+ private disconnectedCallback;
475
+ private createLayout;
476
+ private addMainCanvas;
477
+ private setMainCanvasSize;
478
+ private setEditingTargetSize;
479
+ private initOverlay;
480
+ private addTargetImage;
481
+ createMarker(markerType: typeof MarkerBase | string): MarkerBaseEditor<MarkerBase> | undefined;
482
+ private addNewMarker;
483
+ private markerCreated;
484
+ private markerStateChanged;
485
+ setCurrentEditor(editor?: MarkerBaseEditor): void;
486
+ private touchPoints;
487
+ private isDragging;
488
+ private onCanvasPointerDown;
489
+ private onCanvasDblClick;
490
+ private onPointerMove;
491
+ private showOutline;
492
+ private hideOutline;
493
+ private onPointerUp;
494
+ private onPointerOut;
495
+ private onKeyUp;
496
+ private attachEvents;
497
+ private attachWindowEvents;
498
+ private detachEvents;
499
+ private detachWindowEvents;
500
+ private getMarkerTypeByName;
501
+ switchToSelectMode(): void;
502
+ getState(): AnnotationState;
503
+ restoreState(state: AnnotationState): void;
504
+ private scaleMarkers;
505
+ /**
506
+ * NOTE:
507
+ *
508
+ * before removing or modifying this method please consider supporting marker.js
509
+ * by visiting https://markerjs.com/buy for details
510
+ *
511
+ * thank you!
512
+ */
513
+ private toggleLogo;
514
+ private addLogo;
515
+ private removeLogo;
516
+ private positionLogo;
517
+ /**
518
+ * Returns true if undo operation can be performed (undo stack is not empty).
519
+ */
520
+ get isUndoPossible(): boolean;
521
+ /**
522
+ * Returns true if redo operation can be performed (redo stack is not empty).
523
+ */
524
+ get isRedoPossible(): boolean;
525
+ private addUndoStep;
526
+ /**
527
+ * Undo last action.
528
+ */
529
+ undo(): void;
530
+ private undoStep;
531
+ /**
532
+ * Redo previously undone action.
533
+ */
534
+ redo(): void;
535
+ private redoStep;
536
+ addEventListener<T extends keyof MarkerAreaEventMap>(type: T, listener: (this: MarkerArea, ev: MarkerAreaEventMap[T]) => void, options?: boolean | AddEventListenerOptions): void;
537
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions | undefined): void;
538
+ removeEventListener<T extends keyof MarkerAreaEventMap>(type: T, listener: (this: MarkerArea, ev: MarkerAreaEventMap[T]) => void, options?: boolean | EventListenerOptions): void;
539
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => void, options?: boolean | EventListenerOptions | undefined): void;
540
+ }
541
+
542
+ interface MarkerViewEventMap {
543
+ /**
544
+ * Viewer initialized.
545
+ */
546
+ viewinit: CustomEvent<MarkerViewEventData>;
547
+ viewshow: CustomEvent<MarkerViewEventData>;
548
+ viewrestorestate: CustomEvent<MarkerViewEventData>;
549
+ }
550
+ interface MarkerViewEventData {
551
+ /**
552
+ * {@link MarkerView} instance.
553
+ */
554
+ markerView: MarkerView;
555
+ }
556
+ declare class MarkerView extends HTMLElement {
557
+ private _contentContainer?;
558
+ private _canvasContainer?;
559
+ private _mainCanvas?;
560
+ private _groupLayer?;
561
+ private _editingTarget?;
562
+ private width;
563
+ private height;
564
+ private _targetWidth;
565
+ get targetWidth(): number;
566
+ set targetWidth(value: number);
567
+ private _targetHeight;
568
+ get targetHeight(): number;
569
+ set targetHeight(value: number);
570
+ private _targetImage;
571
+ get targetImage(): HTMLImageElement | undefined;
572
+ set targetImage(value: HTMLImageElement | undefined);
573
+ markerTypes: Array<typeof MarkerBase>;
574
+ markers: MarkerBase[];
575
+ private _logoUI?;
576
+ private _zoomLevel;
577
+ /**
578
+ * Returns the current zoom level.
579
+ */
580
+ get zoomLevel(): number;
581
+ /**
582
+ * Sets the current zoom level.
583
+ */
584
+ set zoomLevel(value: number);
585
+ private _isInitialized;
586
+ constructor();
587
+ private connectedCallback;
588
+ private disconnectedCallback;
589
+ private createLayout;
590
+ private addMainCanvas;
591
+ private setMainCanvasSize;
592
+ private setEditingTargetSize;
593
+ private addTargetImage;
594
+ private addNewMarker;
595
+ private attachEvents;
596
+ private attachWindowEvents;
597
+ private detachEvents;
598
+ private detachWindowEvents;
599
+ private getMarkerTypeByName;
600
+ show(state: AnnotationState): void;
601
+ private scaleMarkers;
602
+ /**
603
+ * NOTE:
604
+ *
605
+ * before removing or modifying this method please consider supporting marker.js
606
+ * by visiting https://markerjs.com/buy for details
607
+ *
608
+ * thank you!
609
+ */
610
+ private toggleLogo;
611
+ private addLogo;
612
+ private removeLogo;
613
+ private positionLogo;
614
+ addEventListener<T extends keyof MarkerViewEventMap>(type: T, listener: (this: MarkerView, ev: MarkerViewEventMap[T]) => void, options?: boolean | AddEventListenerOptions): void;
615
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions | undefined): void;
616
+ removeEventListener<T extends keyof MarkerViewEventMap>(type: T, listener: (this: MarkerView, ev: MarkerViewEventMap[T]) => void, options?: boolean | EventListenerOptions): void;
617
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => void, options?: boolean | EventListenerOptions | undefined): void;
618
+ }
619
+
620
+ export { type IPoint, MarkerArea, type MarkerAreaEventData, type MarkerAreaEventMap, MarkerView, type MarkerViewEventData, type MarkerViewEventMap, SvgHelper };