@progress/kendo-pdfviewer-common 0.3.0-dev.202409251459 → 0.3.0-dev.202410100645

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 (149) hide show
  1. package/dist/es/annotations/annotation-editor-layer-builder.js +139 -0
  2. package/dist/es/annotations/annotation-editor-layer.js +780 -0
  3. package/dist/es/annotations/annotation-editor-ui-manager.js +1690 -0
  4. package/dist/es/annotations/annotation-layer-builder.js +217 -0
  5. package/dist/es/annotations/annotation-layer.js +2793 -0
  6. package/dist/es/annotations/draw-layer-builder.js +65 -0
  7. package/dist/es/annotations/draw-layer.js +220 -0
  8. package/dist/es/annotations/editors/annotation-editor.js +1519 -0
  9. package/dist/es/annotations/editors/free-text-editor.js +783 -0
  10. package/dist/es/annotations/editors/highlight-editor.js +717 -0
  11. package/dist/es/annotations/editors/outliner.js +747 -0
  12. package/dist/es/annotations/helpers/annotation-storage.js +294 -0
  13. package/dist/es/annotations/helpers/color-manager.js +72 -0
  14. package/dist/es/annotations/helpers/command-manager.js +133 -0
  15. package/dist/es/annotations/helpers/id-manager.js +34 -0
  16. package/dist/es/annotations/helpers/image-manager.js +176 -0
  17. package/dist/es/annotations/helpers/text-accessibility-manager.js +212 -0
  18. package/dist/es/annotations/helpers/tools.js +19 -0
  19. package/dist/es/annotations/shared/display_utils.js +1024 -0
  20. package/dist/es/annotations/shared/event_utils.js +213 -0
  21. package/dist/es/annotations/shared/murmurhash3.js +126 -0
  22. package/dist/es/annotations/shared/scripting_utils.js +90 -0
  23. package/dist/es/annotations/shared/ui_utils.js +823 -0
  24. package/dist/es/annotations/shared/utils.js +909 -0
  25. package/dist/es/common/component.js +33 -0
  26. package/dist/es/common/core.js +91 -0
  27. package/dist/es/common/dom.js +11 -0
  28. package/dist/es/common/main.js +4 -0
  29. package/dist/es/common/math.js +1 -0
  30. package/dist/es/enums/PdfViewerInteractionMode.js +6 -0
  31. package/dist/es/links/link-service.js +505 -0
  32. package/dist/es/main.js +2 -0
  33. package/dist/es/scroller.js +29 -30
  34. package/dist/es/text/text-layer-builder.js +288 -0
  35. package/dist/es/utils.js +5 -5
  36. package/dist/es/widget/page.js +762 -0
  37. package/dist/es/widget/pdfviewer.js +1659 -0
  38. package/dist/es2015/annotations/annotation-editor-layer-builder.js +139 -0
  39. package/dist/es2015/annotations/annotation-editor-layer.js +780 -0
  40. package/dist/es2015/annotations/annotation-editor-ui-manager.js +1690 -0
  41. package/dist/es2015/annotations/annotation-layer-builder.js +217 -0
  42. package/dist/es2015/annotations/annotation-layer.js +2793 -0
  43. package/dist/es2015/annotations/draw-layer-builder.js +65 -0
  44. package/dist/es2015/annotations/draw-layer.js +220 -0
  45. package/dist/es2015/annotations/editors/annotation-editor.js +1519 -0
  46. package/dist/es2015/annotations/editors/free-text-editor.js +783 -0
  47. package/dist/es2015/annotations/editors/highlight-editor.js +717 -0
  48. package/dist/es2015/annotations/editors/outliner.js +747 -0
  49. package/dist/es2015/annotations/helpers/annotation-storage.js +294 -0
  50. package/dist/es2015/annotations/helpers/color-manager.js +72 -0
  51. package/dist/es2015/annotations/helpers/command-manager.js +133 -0
  52. package/dist/es2015/annotations/helpers/id-manager.js +34 -0
  53. package/dist/es2015/annotations/helpers/image-manager.js +176 -0
  54. package/dist/es2015/annotations/helpers/text-accessibility-manager.js +212 -0
  55. package/dist/es2015/annotations/helpers/tools.js +19 -0
  56. package/dist/es2015/annotations/shared/display_utils.js +1024 -0
  57. package/dist/es2015/annotations/shared/event_utils.js +213 -0
  58. package/dist/es2015/annotations/shared/murmurhash3.js +126 -0
  59. package/dist/es2015/annotations/shared/scripting_utils.js +90 -0
  60. package/dist/es2015/annotations/shared/ui_utils.js +823 -0
  61. package/dist/es2015/annotations/shared/utils.js +909 -0
  62. package/dist/es2015/common/component.js +33 -0
  63. package/dist/es2015/common/core.js +91 -0
  64. package/dist/es2015/common/dom.js +11 -0
  65. package/dist/es2015/common/main.js +4 -0
  66. package/dist/es2015/common/math.js +1 -0
  67. package/dist/es2015/enums/PdfViewerInteractionMode.js +6 -0
  68. package/dist/es2015/links/link-service.js +505 -0
  69. package/dist/es2015/main.js +2 -0
  70. package/dist/es2015/scroller.js +29 -30
  71. package/dist/es2015/text/text-layer-builder.js +288 -0
  72. package/dist/es2015/utils.js +5 -5
  73. package/dist/es2015/widget/page.js +762 -0
  74. package/dist/es2015/widget/pdfviewer.js +1659 -0
  75. package/dist/npm/annotations/annotation-editor-layer-builder.d.ts +39 -0
  76. package/dist/npm/annotations/annotation-editor-layer-builder.js +142 -0
  77. package/dist/npm/annotations/annotation-editor-layer.d.ts +196 -0
  78. package/dist/npm/annotations/annotation-editor-layer.js +783 -0
  79. package/dist/npm/annotations/annotation-editor-ui-manager.d.ts +281 -0
  80. package/dist/npm/annotations/annotation-editor-ui-manager.js +1694 -0
  81. package/dist/npm/annotations/annotation-layer-builder.d.ts +58 -0
  82. package/dist/npm/annotations/annotation-layer-builder.js +220 -0
  83. package/dist/npm/annotations/annotation-layer.d.ts +134 -0
  84. package/dist/npm/annotations/annotation-layer.js +2794 -0
  85. package/dist/npm/annotations/draw-layer-builder.d.ts +21 -0
  86. package/dist/npm/annotations/draw-layer-builder.js +68 -0
  87. package/dist/npm/annotations/draw-layer.d.ts +33 -0
  88. package/dist/npm/annotations/draw-layer.js +223 -0
  89. package/dist/npm/annotations/editors/annotation-editor.d.ts +349 -0
  90. package/dist/npm/annotations/editors/annotation-editor.js +1523 -0
  91. package/dist/npm/annotations/editors/free-text-editor.d.ts +108 -0
  92. package/dist/npm/annotations/editors/free-text-editor.js +786 -0
  93. package/dist/npm/annotations/editors/highlight-editor.d.ts +114 -0
  94. package/dist/npm/annotations/editors/highlight-editor.js +717 -0
  95. package/dist/npm/annotations/editors/outliner.d.ts +51 -0
  96. package/dist/npm/annotations/editors/outliner.js +750 -0
  97. package/dist/npm/annotations/helpers/annotation-storage.d.ts +98 -0
  98. package/dist/npm/annotations/helpers/annotation-storage.js +299 -0
  99. package/dist/npm/annotations/helpers/color-manager.d.ts +6 -0
  100. package/dist/npm/annotations/helpers/color-manager.js +76 -0
  101. package/dist/npm/annotations/helpers/command-manager.d.ts +42 -0
  102. package/dist/npm/annotations/helpers/command-manager.js +137 -0
  103. package/dist/npm/annotations/helpers/id-manager.d.ts +6 -0
  104. package/dist/npm/annotations/helpers/id-manager.js +38 -0
  105. package/dist/npm/annotations/helpers/image-manager.d.ts +18 -0
  106. package/dist/npm/annotations/helpers/image-manager.js +180 -0
  107. package/dist/npm/annotations/helpers/text-accessibility-manager.d.ts +36 -0
  108. package/dist/npm/annotations/helpers/text-accessibility-manager.js +215 -0
  109. package/dist/npm/annotations/helpers/tools.d.ts +1 -0
  110. package/dist/npm/annotations/helpers/tools.js +23 -0
  111. package/dist/npm/annotations/shared/display_utils.d.ts +6 -0
  112. package/dist/npm/annotations/shared/display_utils.js +1030 -0
  113. package/dist/npm/annotations/shared/event_utils.d.ts +33 -0
  114. package/dist/npm/annotations/shared/event_utils.js +165 -0
  115. package/dist/npm/annotations/shared/murmurhash3.d.ts +8 -0
  116. package/dist/npm/annotations/shared/murmurhash3.js +129 -0
  117. package/dist/npm/annotations/shared/scripting_utils.d.ts +17 -0
  118. package/dist/npm/annotations/shared/scripting_utils.js +93 -0
  119. package/dist/npm/annotations/shared/ui_utils.d.ts +54 -0
  120. package/dist/npm/annotations/shared/ui_utils.js +250 -0
  121. package/dist/npm/annotations/shared/utils.d.ts +148 -0
  122. package/dist/npm/annotations/shared/utils.js +872 -0
  123. package/dist/npm/common/component.d.ts +9 -0
  124. package/dist/npm/common/component.js +37 -0
  125. package/dist/npm/common/core.d.ts +18 -0
  126. package/dist/npm/common/core.js +112 -0
  127. package/dist/npm/common/dom.d.ts +3 -0
  128. package/dist/npm/common/dom.js +17 -0
  129. package/dist/npm/common/main.d.ts +4 -0
  130. package/dist/npm/common/main.js +7 -0
  131. package/dist/npm/common/math.d.ts +1 -0
  132. package/dist/npm/common/math.js +5 -0
  133. package/dist/npm/enums/PdfViewerInteractionMode.d.ts +4 -0
  134. package/dist/npm/enums/PdfViewerInteractionMode.js +9 -0
  135. package/dist/npm/links/link-service.d.ts +116 -0
  136. package/dist/npm/links/link-service.js +501 -0
  137. package/dist/npm/main.d.ts +2 -0
  138. package/dist/npm/main.js +2 -0
  139. package/dist/npm/scroller.d.ts +7 -3
  140. package/dist/npm/scroller.js +32 -32
  141. package/dist/npm/text/text-layer-builder.d.ts +30 -0
  142. package/dist/npm/text/text-layer-builder.js +291 -0
  143. package/dist/npm/utils.d.ts +20 -2
  144. package/dist/npm/utils.js +11 -8
  145. package/dist/npm/widget/page.d.ts +75 -0
  146. package/dist/npm/widget/page.js +763 -0
  147. package/dist/npm/widget/pdfviewer.d.ts +222 -0
  148. package/dist/npm/widget/pdfviewer.js +1663 -0
  149. package/package.json +13 -9
@@ -0,0 +1,39 @@
1
+ /** @typedef {import("../src/display/api").PDFPageProxy} PDFPageProxy */
2
+ /** @typedef {import("../src/display/display_utils").PageViewport} PageViewport */
3
+ /** @typedef {import("../src/display/editor/tools.js").AnnotationEditorUIManager} AnnotationEditorUIManager */
4
+ /** @typedef {import("./text_accessibility.js").TextAccessibilityManager} TextAccessibilityManager */
5
+ /** @typedef {import("./interfaces").IL10n} IL10n */
6
+ /** @typedef {import("../src/display/annotation_layer.js").AnnotationLayer} AnnotationLayer */
7
+ import { AnnotationEditorLayer } from "./annotation-editor-layer";
8
+ /**
9
+ * @typedef {Object} AnnotationEditorLayerBuilderOptions
10
+ * @property {AnnotationEditorUIManager} [uiManager]
11
+ * @property {PDFPageProxy} pdfPage
12
+ * @property {IL10n} [l10n]
13
+ * @property {TextAccessibilityManager} [accessibilityManager]
14
+ * @property {AnnotationLayer} [annotationLayer]
15
+ * @property {TextLayer} [textLayer]
16
+ * @property {DrawLayer} [drawLayer]
17
+ * @property {function} [onAppend]
18
+ */
19
+ declare class AnnotationEditorLayerBuilder {
20
+ #private;
21
+ pdfPage: any;
22
+ annotationEditorLayer: AnnotationEditorLayer;
23
+ _cancelled: any;
24
+ div: any;
25
+ accessibilityManager: any;
26
+ /**
27
+ * @param {AnnotationEditorLayerBuilderOptions} options
28
+ */
29
+ constructor(options: any);
30
+ /**
31
+ * @param {PageViewport} viewport
32
+ * @param {string} intent (default value is 'display')
33
+ */
34
+ render(viewport: any, intent?: string): Promise<void>;
35
+ cancel(): void;
36
+ hide(): void;
37
+ show(): void;
38
+ }
39
+ export { AnnotationEditorLayerBuilder };
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ /* Copyright 2022 Mozilla Foundation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ var _AnnotationEditorLayerBuilder_annotationLayer, _AnnotationEditorLayerBuilder_drawLayer, _AnnotationEditorLayerBuilder_onAppend, _AnnotationEditorLayerBuilder_textLayer, _AnnotationEditorLayerBuilder_uiManager;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.AnnotationEditorLayerBuilder = void 0;
19
+ const tslib_1 = require("tslib");
20
+ /** @typedef {import("../src/display/api").PDFPageProxy} PDFPageProxy */
21
+ // eslint-disable-next-line max-len
22
+ /** @typedef {import("../src/display/display_utils").PageViewport} PageViewport */
23
+ // eslint-disable-next-line max-len
24
+ /** @typedef {import("../src/display/editor/tools.js").AnnotationEditorUIManager} AnnotationEditorUIManager */
25
+ // eslint-disable-next-line max-len
26
+ /** @typedef {import("./text_accessibility.js").TextAccessibilityManager} TextAccessibilityManager */
27
+ /** @typedef {import("./interfaces").IL10n} IL10n */
28
+ // eslint-disable-next-line max-len
29
+ /** @typedef {import("../src/display/annotation_layer.js").AnnotationLayer} AnnotationLayer */
30
+ const annotation_editor_layer_1 = require("./annotation-editor-layer");
31
+ // import { GenericL10n } from "web-null_l10n";
32
+ /**
33
+ * @typedef {Object} AnnotationEditorLayerBuilderOptions
34
+ * @property {AnnotationEditorUIManager} [uiManager]
35
+ * @property {PDFPageProxy} pdfPage
36
+ * @property {IL10n} [l10n]
37
+ * @property {TextAccessibilityManager} [accessibilityManager]
38
+ * @property {AnnotationLayer} [annotationLayer]
39
+ * @property {TextLayer} [textLayer]
40
+ * @property {DrawLayer} [drawLayer]
41
+ * @property {function} [onAppend]
42
+ */
43
+ class AnnotationEditorLayerBuilder {
44
+ /**
45
+ * @param {AnnotationEditorLayerBuilderOptions} options
46
+ */
47
+ constructor(options) {
48
+ // todo: props
49
+ this.pdfPage = null;
50
+ this.annotationEditorLayer = null;
51
+ this._cancelled = null;
52
+ this.div = null;
53
+ this.accessibilityManager = null;
54
+ // todo: props
55
+ _AnnotationEditorLayerBuilder_annotationLayer.set(this, null);
56
+ _AnnotationEditorLayerBuilder_drawLayer.set(this, null);
57
+ _AnnotationEditorLayerBuilder_onAppend.set(this, null);
58
+ _AnnotationEditorLayerBuilder_textLayer.set(this, null);
59
+ _AnnotationEditorLayerBuilder_uiManager.set(this, null);
60
+ this.pdfPage = options.pdfPage;
61
+ this.accessibilityManager = options.accessibilityManager;
62
+ // this.l10n = options.l10n;
63
+ // if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
64
+ // this.l10n ||= new GenericL10n();
65
+ // }
66
+ this.annotationEditorLayer = null;
67
+ this.div = null;
68
+ this._cancelled = false;
69
+ tslib_1.__classPrivateFieldSet(this, _AnnotationEditorLayerBuilder_uiManager, options.uiManager, "f");
70
+ tslib_1.__classPrivateFieldSet(this, _AnnotationEditorLayerBuilder_annotationLayer, options.annotationLayer || null, "f");
71
+ tslib_1.__classPrivateFieldSet(this, _AnnotationEditorLayerBuilder_textLayer, options.textLayer || null, "f");
72
+ tslib_1.__classPrivateFieldSet(this, _AnnotationEditorLayerBuilder_drawLayer, options.drawLayer || null, "f");
73
+ tslib_1.__classPrivateFieldSet(this, _AnnotationEditorLayerBuilder_onAppend, options.onAppend || null, "f");
74
+ }
75
+ /**
76
+ * @param {PageViewport} viewport
77
+ * @param {string} intent (default value is 'display')
78
+ */
79
+ render(viewport_1) {
80
+ return tslib_1.__awaiter(this, arguments, void 0, function* (viewport, intent = "display") {
81
+ var _a;
82
+ if (intent !== "display") {
83
+ return;
84
+ }
85
+ if (this._cancelled) {
86
+ return;
87
+ }
88
+ const clonedViewport = viewport.clone({ dontFlip: true });
89
+ if (this.div) {
90
+ this.annotationEditorLayer.update({ viewport: clonedViewport });
91
+ this.show();
92
+ return;
93
+ }
94
+ // Create an AnnotationEditor layer div
95
+ const div = (this.div = document.createElement("div"));
96
+ div.className = "k-annotation-editor-layer annotationEditorLayer";
97
+ div.hidden = true;
98
+ div.dir = tslib_1.__classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_uiManager, "f").direction;
99
+ (_a = tslib_1.__classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_onAppend, "f")) === null || _a === void 0 ? void 0 : _a.call(this, div);
100
+ this.annotationEditorLayer = new annotation_editor_layer_1.AnnotationEditorLayer({
101
+ uiManager: tslib_1.__classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_uiManager, "f"),
102
+ div,
103
+ accessibilityManager: this.accessibilityManager,
104
+ pageIndex: this.pdfPage.pageNumber - 1,
105
+ // l10n: this.l10n,
106
+ viewport: clonedViewport,
107
+ annotationLayer: tslib_1.__classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_annotationLayer, "f"),
108
+ textLayer: tslib_1.__classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_textLayer, "f"),
109
+ drawLayer: tslib_1.__classPrivateFieldGet(this, _AnnotationEditorLayerBuilder_drawLayer, "f"),
110
+ });
111
+ const parameters = {
112
+ viewport: clonedViewport,
113
+ div,
114
+ annotations: null,
115
+ intent,
116
+ };
117
+ this.annotationEditorLayer.render(parameters);
118
+ this.show();
119
+ });
120
+ }
121
+ cancel() {
122
+ this._cancelled = true;
123
+ if (!this.div) {
124
+ return;
125
+ }
126
+ this.annotationEditorLayer.destroy();
127
+ }
128
+ hide() {
129
+ if (!this.div) {
130
+ return;
131
+ }
132
+ this.div.hidden = true;
133
+ }
134
+ show() {
135
+ if (!this.div || this.annotationEditorLayer.isInvisible) {
136
+ return;
137
+ }
138
+ this.div.hidden = false;
139
+ }
140
+ }
141
+ exports.AnnotationEditorLayerBuilder = AnnotationEditorLayerBuilder;
142
+ _AnnotationEditorLayerBuilder_annotationLayer = new WeakMap(), _AnnotationEditorLayerBuilder_drawLayer = new WeakMap(), _AnnotationEditorLayerBuilder_onAppend = new WeakMap(), _AnnotationEditorLayerBuilder_textLayer = new WeakMap(), _AnnotationEditorLayerBuilder_uiManager = new WeakMap();
@@ -0,0 +1,196 @@
1
+ /** @typedef {import("./tools.js").AnnotationEditorUIManager} AnnotationEditorUIManager */
2
+ /** @typedef {import("../display_utils.js").PageViewport} PageViewport */
3
+ /** @typedef {import("../../../web/text_accessibility.js").TextAccessibilityManager} TextAccessibilityManager */
4
+ /** @typedef {import("../../../web/interfaces").IL10n} IL10n */
5
+ /** @typedef {import("../annotation_layer.js").AnnotationLayer} AnnotationLayer */
6
+ /** @typedef {import("../draw_layer.js").DrawLayer} DrawLayer */
7
+ import { FreeTextEditor } from "./editors/free-text-editor";
8
+ import { HighlightEditor } from "./editors/highlight-editor";
9
+ declare class AnnotationEditorLayer {
10
+ #private;
11
+ drawLayer: any;
12
+ pageIndex: number;
13
+ div: any;
14
+ viewport: any;
15
+ static _initialized: boolean;
16
+ /**
17
+ * @param {AnnotationEditorLayerOptions} options
18
+ */
19
+ constructor({ uiManager, pageIndex, div, accessibilityManager, annotationLayer, drawLayer, textLayer, viewport }: {
20
+ uiManager: any;
21
+ pageIndex: any;
22
+ div: any;
23
+ accessibilityManager: any;
24
+ annotationLayer: any;
25
+ drawLayer: any;
26
+ textLayer: any;
27
+ viewport: any;
28
+ });
29
+ hide(): void;
30
+ show(): void;
31
+ get isEmpty(): boolean;
32
+ get isInvisible(): boolean;
33
+ /**
34
+ * Update the toolbar if it's required to reflect the tool currently used.
35
+ * @param {number} mode
36
+ */
37
+ updateToolbar(): void;
38
+ /**
39
+ * The mode has changed: it must be updated.
40
+ * @param {number} mode
41
+ */
42
+ updateMode(mode?: number): void;
43
+ hasTextLayer(textLayer: any): boolean;
44
+ addInkEditorIfNeeded(isCommitting: any): void;
45
+ /**
46
+ * Set the editing state.
47
+ * @param {boolean} isEditing
48
+ */
49
+ setEditingState(isEditing: any): void;
50
+ /**
51
+ * Add some commands into the CommandManager (undo/redo stuff).
52
+ * @param {Object} params
53
+ */
54
+ addCommands(params: any): void;
55
+ toggleDrawing(enabled?: boolean): void;
56
+ togglePointerEvents(enabled?: boolean): void;
57
+ toggleAnnotationLayerPointerEvents(enabled?: boolean): void;
58
+ /**
59
+ * Enable pointer events on the main div in order to enable
60
+ * editor creation.
61
+ */
62
+ enable(): void;
63
+ /**
64
+ * Disable editor creation.
65
+ */
66
+ disable(): void;
67
+ getEditableAnnotation(id: any): any;
68
+ /**
69
+ * Set the current editor.
70
+ * @param {AnnotationEditor} editor
71
+ */
72
+ setActiveEditor(editor: any): void;
73
+ enableTextSelection(): void;
74
+ disableTextSelection(): void;
75
+ enableClick(): void;
76
+ disableClick(): void;
77
+ attach(editor: any): void;
78
+ detach(editor: any): void;
79
+ /**
80
+ * Remove an editor.
81
+ * @param {AnnotationEditor} editor
82
+ */
83
+ remove(editor: any): void;
84
+ /**
85
+ * An editor can have a different parent, for example after having
86
+ * being dragged and droped from a page to another.
87
+ * @param {AnnotationEditor} editor
88
+ */
89
+ changeParent(editor: any): void;
90
+ /**
91
+ * Add a new editor in the current view.
92
+ * @param {AnnotationEditor} editor
93
+ */
94
+ add(editor: any): void;
95
+ moveEditorInDOM(editor: any): void;
96
+ /**
97
+ * Add or rebuild depending if it has been removed or not.
98
+ * @param {AnnotationEditor} editor
99
+ */
100
+ addOrRebuild(editor: any): void;
101
+ /**
102
+ * Add a new editor and make this addition undoable.
103
+ * @param {AnnotationEditor} editor
104
+ */
105
+ addUndoableEditor(editor: any): void;
106
+ /**
107
+ * Get an id for an editor.
108
+ * @returns {string}
109
+ */
110
+ getNextId(): string;
111
+ combinedSignal(abortController: any): any;
112
+ canCreateNewEmptyEditor(): boolean;
113
+ /**
114
+ * Paste some content into a new editor.
115
+ * @param {number} mode
116
+ * @param {Object} params
117
+ */
118
+ pasteEditor(mode: any, params: any): void;
119
+ /**
120
+ * Create a new editor
121
+ * @param {Object} data
122
+ * @returns {AnnotationEditor | null}
123
+ */
124
+ deserialize(data: any): any;
125
+ /**
126
+ * Create and add a new editor.
127
+ * @param {PointerEvent} event
128
+ * @param {boolean} isCentered
129
+ * @param [Object] data
130
+ * @returns {AnnotationEditor}
131
+ */
132
+ createAndAddNewEditor(event: any, isCentered: any, data?: {}): FreeTextEditor | HighlightEditor;
133
+ /**
134
+ * Create and add a new editor.
135
+ */
136
+ addNewEditor(): void;
137
+ /**
138
+ * Set the last selected editor.
139
+ * @param {AnnotationEditor} editor
140
+ */
141
+ setSelected(editor: any): void;
142
+ /**
143
+ * Add or remove an editor the current selection.
144
+ * @param {AnnotationEditor} editor
145
+ */
146
+ toggleSelected(editor: any): void;
147
+ /**
148
+ * Check if the editor is selected.
149
+ * @param {AnnotationEditor} editor
150
+ */
151
+ isSelected(editor: any): boolean;
152
+ /**
153
+ * Unselect an editor.
154
+ * @param {AnnotationEditor} editor
155
+ */
156
+ unselect(editor: any): void;
157
+ /**
158
+ * Pointerup callback.
159
+ * @param {PointerEvent} event
160
+ */
161
+ pointerup(event: any): void;
162
+ /**
163
+ * Pointerdown callback.
164
+ * @param {PointerEvent} event
165
+ */
166
+ pointerdown(event: any): void;
167
+ /**
168
+ *
169
+ * @param {AnnotationEditor} editor
170
+ * @param {number} x
171
+ * @param {number} y
172
+ * @returns
173
+ */
174
+ findNewParent(editor: any, x: any, y: any): boolean;
175
+ /**
176
+ * Destroy the main editor.
177
+ */
178
+ destroy(): void;
179
+ /**
180
+ * Render the main editor.
181
+ * @param {RenderEditorLayerOptions} parameters
182
+ */
183
+ render({ viewport }: {
184
+ viewport: any;
185
+ }): void;
186
+ update({ viewport }: {
187
+ viewport: any;
188
+ }): void;
189
+ /**
190
+ * Get page dimensions.
191
+ * @returns {Object} dimensions.
192
+ */
193
+ get pageDimensions(): any[];
194
+ get scale(): any;
195
+ }
196
+ export { AnnotationEditorLayer };