@ckeditor/ckeditor5-engine 45.2.1 → 46.0.0-alpha.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.
Files changed (241) hide show
  1. package/dist/index.js +2563 -2257
  2. package/dist/index.js.map +1 -1
  3. package/package.json +3 -3
  4. package/src/controller/datacontroller.d.ts +33 -32
  5. package/src/controller/datacontroller.js +29 -28
  6. package/src/controller/editingcontroller.d.ts +8 -8
  7. package/src/controller/editingcontroller.js +10 -10
  8. package/src/conversion/conversion.d.ts +18 -19
  9. package/src/conversion/conversion.js +4 -4
  10. package/src/conversion/conversionhelpers.d.ts +1 -1
  11. package/src/conversion/conversionhelpers.js +1 -1
  12. package/src/conversion/downcastdispatcher.d.ts +63 -69
  13. package/src/conversion/downcastdispatcher.js +16 -16
  14. package/src/conversion/downcasthelpers.d.ts +94 -83
  15. package/src/conversion/downcasthelpers.js +63 -53
  16. package/src/conversion/mapper.d.ts +27 -27
  17. package/src/conversion/mapper.js +15 -15
  18. package/src/conversion/modelconsumable.d.ts +26 -26
  19. package/src/conversion/modelconsumable.js +23 -23
  20. package/src/conversion/upcastdispatcher.d.ts +33 -32
  21. package/src/conversion/upcastdispatcher.js +19 -19
  22. package/src/conversion/upcasthelpers.d.ts +46 -38
  23. package/src/conversion/upcasthelpers.js +33 -24
  24. package/src/conversion/viewconsumable.d.ts +50 -45
  25. package/src/conversion/viewconsumable.js +32 -27
  26. package/src/dataprocessor/basichtmlwriter.d.ts +4 -2
  27. package/src/dataprocessor/basichtmlwriter.js +3 -1
  28. package/src/dataprocessor/dataprocessor.d.ts +7 -6
  29. package/src/dataprocessor/htmldataprocessor.d.ts +10 -10
  30. package/src/dataprocessor/htmldataprocessor.js +6 -6
  31. package/src/dataprocessor/htmlwriter.d.ts +1 -1
  32. package/src/dataprocessor/xmldataprocessor.d.ts +10 -10
  33. package/src/dataprocessor/xmldataprocessor.js +6 -6
  34. package/src/dev-utils/model.d.ts +25 -26
  35. package/src/dev-utils/model.js +35 -36
  36. package/src/dev-utils/operationreplayer.d.ts +5 -3
  37. package/src/dev-utils/operationreplayer.js +4 -2
  38. package/src/dev-utils/utils.d.ts +8 -0
  39. package/src/dev-utils/utils.js +8 -0
  40. package/src/dev-utils/view.d.ts +66 -63
  41. package/src/dev-utils/view.js +144 -134
  42. package/src/index.d.ts +135 -106
  43. package/src/index.js +120 -71
  44. package/src/legacyerrors.d.ts +5 -0
  45. package/src/legacyerrors.js +17 -0
  46. package/src/model/batch.d.ts +2 -15
  47. package/src/model/batch.js +1 -23
  48. package/src/model/differ.d.ts +54 -31
  49. package/src/model/differ.js +15 -15
  50. package/src/model/document.d.ts +31 -31
  51. package/src/model/document.js +13 -13
  52. package/src/model/documentfragment.d.ts +45 -45
  53. package/src/model/documentfragment.js +40 -40
  54. package/src/model/documentselection.d.ts +92 -92
  55. package/src/model/documentselection.js +71 -70
  56. package/src/model/element.d.ts +31 -31
  57. package/src/model/element.js +29 -29
  58. package/src/model/history.d.ts +3 -3
  59. package/src/model/history.js +2 -2
  60. package/src/model/item.d.ts +4 -5
  61. package/src/model/liveposition.d.ts +31 -31
  62. package/src/model/liveposition.js +18 -18
  63. package/src/model/liverange.d.ts +42 -38
  64. package/src/model/liverange.js +17 -16
  65. package/src/model/markercollection.d.ts +41 -40
  66. package/src/model/markercollection.js +22 -20
  67. package/src/model/model.d.ts +82 -81
  68. package/src/model/model.js +54 -54
  69. package/src/model/node.d.ts +48 -48
  70. package/src/model/node.js +31 -31
  71. package/src/model/nodelist.d.ts +17 -17
  72. package/src/model/nodelist.js +11 -11
  73. package/src/model/operation/attributeoperation.d.ts +10 -10
  74. package/src/model/operation/attributeoperation.js +7 -7
  75. package/src/model/operation/detachoperation.d.ts +11 -9
  76. package/src/model/operation/detachoperation.js +8 -6
  77. package/src/model/operation/insertoperation.d.ts +13 -13
  78. package/src/model/operation/insertoperation.js +15 -15
  79. package/src/model/operation/markeroperation.d.ts +12 -12
  80. package/src/model/operation/markeroperation.js +5 -5
  81. package/src/model/operation/mergeoperation.d.ts +16 -16
  82. package/src/model/operation/mergeoperation.js +18 -18
  83. package/src/model/operation/moveoperation.d.ts +16 -16
  84. package/src/model/operation/moveoperation.js +18 -15
  85. package/src/model/operation/nooperation.d.ts +4 -4
  86. package/src/model/operation/nooperation.js +2 -2
  87. package/src/model/operation/operation.d.ts +10 -10
  88. package/src/model/operation/operation.js +5 -5
  89. package/src/model/operation/operationfactory.d.ts +4 -4
  90. package/src/model/operation/operationfactory.js +12 -12
  91. package/src/model/operation/renameoperation.d.ts +10 -10
  92. package/src/model/operation/renameoperation.js +7 -7
  93. package/src/model/operation/rootattributeoperation.d.ts +12 -12
  94. package/src/model/operation/rootattributeoperation.js +8 -8
  95. package/src/model/operation/rootoperation.d.ts +8 -8
  96. package/src/model/operation/rootoperation.js +3 -3
  97. package/src/model/operation/splitoperation.d.ts +17 -17
  98. package/src/model/operation/splitoperation.js +19 -19
  99. package/src/model/operation/transform.d.ts +11 -8
  100. package/src/model/operation/transform.js +66 -49
  101. package/src/model/operation/utils.d.ts +24 -23
  102. package/src/model/operation/utils.js +20 -20
  103. package/src/model/position.d.ts +101 -97
  104. package/src/model/position.js +69 -64
  105. package/src/model/range.d.ts +90 -90
  106. package/src/model/range.js +87 -87
  107. package/src/model/rootelement.d.ts +11 -11
  108. package/src/model/rootelement.js +9 -9
  109. package/src/model/schema.d.ts +158 -154
  110. package/src/model/schema.js +93 -90
  111. package/src/model/selection.d.ts +73 -73
  112. package/src/model/selection.js +62 -62
  113. package/src/model/text.d.ts +11 -10
  114. package/src/model/text.js +11 -10
  115. package/src/model/textproxy.d.ts +39 -38
  116. package/src/model/textproxy.js +31 -30
  117. package/src/model/treewalker.d.ts +37 -37
  118. package/src/model/treewalker.js +14 -14
  119. package/src/model/typecheckable.d.ts +45 -45
  120. package/src/model/typecheckable.js +1 -1
  121. package/src/model/utils/autoparagraphing.d.ts +7 -7
  122. package/src/model/utils/deletecontent.d.ts +7 -5
  123. package/src/model/utils/deletecontent.js +13 -11
  124. package/src/model/utils/getselectedcontent.d.ts +6 -5
  125. package/src/model/utils/getselectedcontent.js +2 -1
  126. package/src/model/utils/insertcontent.d.ts +9 -8
  127. package/src/model/utils/insertcontent.js +41 -40
  128. package/src/model/utils/insertobject.d.ts +9 -9
  129. package/src/model/utils/insertobject.js +4 -4
  130. package/src/model/utils/modifyselection.d.ts +5 -4
  131. package/src/model/utils/modifyselection.js +12 -11
  132. package/src/model/utils/selection-post-fixer.d.ts +12 -8
  133. package/src/model/utils/selection-post-fixer.js +15 -11
  134. package/src/model/writer.d.ts +102 -101
  135. package/src/model/writer.js +99 -98
  136. package/src/view/attributeelement.d.ts +29 -29
  137. package/src/view/attributeelement.js +25 -25
  138. package/src/view/containerelement.d.ts +16 -15
  139. package/src/view/containerelement.js +15 -14
  140. package/src/view/datatransfer.d.ts +7 -7
  141. package/src/view/datatransfer.js +1 -1
  142. package/src/view/document.d.ts +25 -25
  143. package/src/view/document.js +15 -15
  144. package/src/view/documentfragment.d.ts +21 -21
  145. package/src/view/documentfragment.js +14 -14
  146. package/src/view/documentselection.d.ts +65 -63
  147. package/src/view/documentselection.js +27 -25
  148. package/src/view/domconverter.d.ts +94 -89
  149. package/src/view/domconverter.js +78 -73
  150. package/src/view/downcastwriter.d.ts +185 -181
  151. package/src/view/downcastwriter.js +222 -210
  152. package/src/view/editableelement.d.ts +13 -13
  153. package/src/view/editableelement.js +8 -8
  154. package/src/view/element.d.ts +75 -74
  155. package/src/view/element.js +58 -58
  156. package/src/view/elementdefinition.d.ts +3 -4
  157. package/src/view/emptyelement.d.ts +13 -13
  158. package/src/view/emptyelement.js +13 -13
  159. package/src/view/filler.d.ts +14 -3
  160. package/src/view/filler.js +12 -1
  161. package/src/view/item.d.ts +4 -5
  162. package/src/view/matcher.d.ts +22 -19
  163. package/src/view/matcher.js +6 -6
  164. package/src/view/node.d.ts +33 -33
  165. package/src/view/node.js +9 -9
  166. package/src/view/observer/arrowkeysobserver.d.ts +10 -10
  167. package/src/view/observer/arrowkeysobserver.js +5 -5
  168. package/src/view/observer/bubblingemittermixin.d.ts +5 -5
  169. package/src/view/observer/bubblingemittermixin.js +2 -9
  170. package/src/view/observer/bubblingeventinfo.d.ts +9 -9
  171. package/src/view/observer/bubblingeventinfo.js +1 -1
  172. package/src/view/observer/clickobserver.d.ts +8 -8
  173. package/src/view/observer/clickobserver.js +4 -4
  174. package/src/view/observer/compositionobserver.d.ts +19 -19
  175. package/src/view/observer/compositionobserver.js +6 -6
  176. package/src/view/observer/domeventdata.d.ts +9 -9
  177. package/src/view/observer/domeventdata.js +2 -2
  178. package/src/view/observer/domeventobserver.d.ts +3 -3
  179. package/src/view/observer/domeventobserver.js +5 -5
  180. package/src/view/observer/fakeselectionobserver.d.ts +9 -9
  181. package/src/view/observer/fakeselectionobserver.js +8 -8
  182. package/src/view/observer/focusobserver.d.ts +16 -16
  183. package/src/view/observer/focusobserver.js +7 -7
  184. package/src/view/observer/inputobserver.d.ts +18 -18
  185. package/src/view/observer/inputobserver.js +5 -5
  186. package/src/view/observer/keyobserver.d.ts +11 -11
  187. package/src/view/observer/keyobserver.js +3 -3
  188. package/src/view/observer/mouseobserver.d.ts +16 -16
  189. package/src/view/observer/mouseobserver.js +3 -3
  190. package/src/view/observer/mutationobserver.d.ts +21 -21
  191. package/src/view/observer/mutationobserver.js +7 -7
  192. package/src/view/observer/observer.d.ts +12 -12
  193. package/src/view/observer/observer.js +6 -6
  194. package/src/view/observer/selectionobserver.d.ts +33 -33
  195. package/src/view/observer/selectionobserver.js +14 -14
  196. package/src/view/observer/tabobserver.d.ts +10 -10
  197. package/src/view/observer/tabobserver.js +5 -5
  198. package/src/view/observer/touchobserver.d.ts +13 -13
  199. package/src/view/observer/touchobserver.js +3 -3
  200. package/src/view/placeholder.d.ts +21 -21
  201. package/src/view/placeholder.js +23 -23
  202. package/src/view/position.d.ts +49 -49
  203. package/src/view/position.js +42 -42
  204. package/src/view/range.d.ts +76 -74
  205. package/src/view/range.js +67 -65
  206. package/src/view/rawelement.d.ts +19 -19
  207. package/src/view/rawelement.js +16 -16
  208. package/src/view/renderer.d.ts +14 -14
  209. package/src/view/renderer.js +7 -7
  210. package/src/view/rooteditableelement.d.ts +8 -7
  211. package/src/view/rooteditableelement.js +7 -6
  212. package/src/view/selection.d.ts +66 -64
  213. package/src/view/selection.js +50 -48
  214. package/src/view/styles/background.d.ts +2 -2
  215. package/src/view/styles/background.js +9 -9
  216. package/src/view/styles/border.d.ts +2 -2
  217. package/src/view/styles/border.js +13 -13
  218. package/src/view/styles/margin.d.ts +2 -2
  219. package/src/view/styles/margin.js +5 -5
  220. package/src/view/styles/padding.d.ts +2 -2
  221. package/src/view/styles/padding.js +5 -5
  222. package/src/view/styles/utils.d.ts +24 -24
  223. package/src/view/styles/utils.js +25 -25
  224. package/src/view/stylesmap.d.ts +28 -32
  225. package/src/view/stylesmap.js +52 -39
  226. package/src/view/text.d.ts +11 -11
  227. package/src/view/text.js +10 -10
  228. package/src/view/textproxy.d.ts +33 -32
  229. package/src/view/textproxy.js +23 -22
  230. package/src/view/tokenlist.d.ts +14 -14
  231. package/src/view/tokenlist.js +10 -10
  232. package/src/view/treewalker.d.ts +42 -40
  233. package/src/view/treewalker.js +36 -35
  234. package/src/view/typecheckable.d.ts +76 -75
  235. package/src/view/typecheckable.js +1 -1
  236. package/src/view/uielement.d.ts +22 -21
  237. package/src/view/uielement.js +17 -16
  238. package/src/view/upcastwriter.d.ts +70 -70
  239. package/src/view/upcastwriter.js +42 -42
  240. package/src/view/view.d.ts +70 -69
  241. package/src/view/view.js +56 -55
@@ -5,28 +5,28 @@
5
5
  /**
6
6
  * @module engine/view/documentselection
7
7
  */
8
- import TypeCheckable from './typecheckable.js';
9
- import Selection from './selection.js';
8
+ import { ViewTypeCheckable } from './typecheckable.js';
9
+ import { ViewSelection } from './selection.js';
10
10
  import { EmitterMixin } from '@ckeditor/ckeditor5-utils';
11
11
  /**
12
12
  * Class representing the document selection in the view.
13
13
  *
14
- * Its instance is available in {@link module:engine/view/document~Document#selection `Document#selection`}.
14
+ * Its instance is available in {@link module:engine/view/document~ViewDocument#selection `Document#selection`}.
15
15
  *
16
- * It is similar to {@link module:engine/view/selection~Selection} but
16
+ * It is similar to {@link module:engine/view/selection~ViewSelection} but
17
17
  * it has a read-only API and can be modified only by the writer available in
18
- * the {@link module:engine/view/view~View#change `View#change()`} block
19
- * (so via {@link module:engine/view/downcastwriter~DowncastWriter#setSelection `DowncastWriter#setSelection()`}).
18
+ * the {@link module:engine/view/view~EditingView#change `View#change()`} block
19
+ * (so via {@link module:engine/view/downcastwriter~ViewDowncastWriter#setSelection `ViewDowncastWriter#setSelection()`}).
20
20
  */
21
- export default class DocumentSelection extends /* #__PURE__ */ EmitterMixin(TypeCheckable) {
21
+ export class ViewDocumentSelection extends /* #__PURE__ */ EmitterMixin(ViewTypeCheckable) {
22
22
  /**
23
- * Selection is used internally (`DocumentSelection` is a proxy to that selection).
23
+ * Selection is used internally (`ViewDocumentSelection` is a proxy to that selection).
24
24
  */
25
25
  _selection;
26
26
  constructor(...args) {
27
27
  super();
28
- this._selection = new Selection();
29
- // Delegate change event to be fired on DocumentSelection instance.
28
+ this._selection = new ViewSelection();
29
+ // Delegate change event to be fired on ViewDocumentSelection instance.
30
30
  this._selection.delegate('change').to(this);
31
31
  // Set selection data.
32
32
  if (args.length) {
@@ -88,14 +88,14 @@ export default class DocumentSelection extends /* #__PURE__ */ EmitterMixin(Type
88
88
  return this._selection.isBackward;
89
89
  }
90
90
  /**
91
- * {@link module:engine/view/editableelement~EditableElement EditableElement} instance that contains this selection, or `null`
91
+ * {@link module:engine/view/editableelement~ViewEditableElement ViewEditableElement} instance that contains this selection, or `null`
92
92
  * if the selection is not inside an editable element.
93
93
  */
94
94
  get editableElement() {
95
95
  return this._selection.editableElement;
96
96
  }
97
97
  /**
98
- * Used for the compatibility with the {@link module:engine/view/selection~Selection#isEqual} method.
98
+ * Used for the compatibility with the {@link module:engine/view/selection~ViewSelection#isEqual} method.
99
99
  *
100
100
  * @internal
101
101
  */
@@ -110,7 +110,8 @@ export default class DocumentSelection extends /* #__PURE__ */ EmitterMixin(Type
110
110
  }
111
111
  /**
112
112
  * Returns copy of the first range in the selection. First range is the one which
113
- * {@link module:engine/view/range~Range#start start} position {@link module:engine/view/position~Position#isBefore is before} start
113
+ * {@link module:engine/view/range~ViewRange#start start} position
114
+ * {@link module:engine/view/position~ViewPosition#isBefore is before} start
114
115
  * position of all other ranges (not to confuse with the first range added to the selection).
115
116
  * Returns `null` if no ranges are added to selection.
116
117
  */
@@ -118,8 +119,8 @@ export default class DocumentSelection extends /* #__PURE__ */ EmitterMixin(Type
118
119
  return this._selection.getFirstRange();
119
120
  }
120
121
  /**
121
- * Returns copy of the last range in the selection. Last range is the one which {@link module:engine/view/range~Range#end end}
122
- * position {@link module:engine/view/position~Position#isAfter is after} end position of all other ranges (not to confuse
122
+ * Returns copy of the last range in the selection. Last range is the one which {@link module:engine/view/range~ViewRange#end end}
123
+ * position {@link module:engine/view/position~ViewPosition#isAfter is after} end position of all other ranges (not to confuse
123
124
  * with the last range added to the selection). Returns `null` if no ranges are added to selection.
124
125
  */
125
126
  getLastRange() {
@@ -127,7 +128,7 @@ export default class DocumentSelection extends /* #__PURE__ */ EmitterMixin(Type
127
128
  }
128
129
  /**
129
130
  * Returns copy of the first position in the selection. First position is the position that
130
- * {@link module:engine/view/position~Position#isBefore is before} any other position in the selection ranges.
131
+ * {@link module:engine/view/position~ViewPosition#isBefore is before} any other position in the selection ranges.
131
132
  * Returns `null` if no ranges are added to selection.
132
133
  */
133
134
  getFirstPosition() {
@@ -135,14 +136,14 @@ export default class DocumentSelection extends /* #__PURE__ */ EmitterMixin(Type
135
136
  }
136
137
  /**
137
138
  * Returns copy of the last position in the selection. Last position is the position that
138
- * {@link module:engine/view/position~Position#isAfter is after} any other position in the selection ranges.
139
+ * {@link module:engine/view/position~ViewPosition#isAfter is after} any other position in the selection ranges.
139
140
  * Returns `null` if no ranges are added to selection.
140
141
  */
141
142
  getLastPosition() {
142
143
  return this._selection.getLastPosition();
143
144
  }
144
145
  /**
145
- * Returns the selected element. {@link module:engine/view/element~Element Element} is considered as selected if there is only
146
+ * Returns the selected element. {@link module:engine/view/element~ViewElement Element} is considered as selected if there is only
146
147
  * one range in the selection, and that range contains exactly one element.
147
148
  * Returns `null` if there is no selected element.
148
149
  */
@@ -161,7 +162,7 @@ export default class DocumentSelection extends /* #__PURE__ */ EmitterMixin(Type
161
162
  }
162
163
  /**
163
164
  * Checks whether this selection is similar to given selection. Selections are similar if they have same directions, same
164
- * number of ranges, and all {@link module:engine/view/range~Range#getTrimmed trimmed} ranges from one selection are
165
+ * number of ranges, and all {@link module:engine/view/range~ViewRange#getTrimmed trimmed} ranges from one selection are
165
166
  * equal to any trimmed range from other selection.
166
167
  *
167
168
  * @param otherSelection Selection to compare with.
@@ -172,7 +173,7 @@ export default class DocumentSelection extends /* #__PURE__ */ EmitterMixin(Type
172
173
  }
173
174
  /**
174
175
  * Sets this selection's ranges and direction to the specified location based on the given
175
- * {@link module:engine/view/selection~Selectable selectable}.
176
+ * {@link module:engine/view/selection~ViewSelectable selectable}.
176
177
  *
177
178
  * ```ts
178
179
  * // Sets selection to the given range.
@@ -195,14 +196,14 @@ export default class DocumentSelection extends /* #__PURE__ */ EmitterMixin(Type
195
196
  * documentSelection._setTo( paragraph, offset );
196
197
  * ```
197
198
  *
198
- * Creates a range inside an {@link module:engine/view/element~Element element} which starts before the first child of
199
+ * Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the first child of
199
200
  * that element and ends after the last child of that element.
200
201
  *
201
202
  * ```ts
202
203
  * documentSelection._setTo( paragraph, 'in' );
203
204
  * ```
204
205
  *
205
- * Creates a range on an {@link module:engine/view/item~Item item} which starts before the item and ends just after the item.
206
+ * Creates a range on an {@link module:engine/view/item~ViewItem item} which starts before the item and ends just after the item.
206
207
  *
207
208
  * ```ts
208
209
  * documentSelection._setTo( paragraph, 'on' );
@@ -239,12 +240,13 @@ export default class DocumentSelection extends /* #__PURE__ */ EmitterMixin(Type
239
240
  /**
240
241
  * Moves {@link #focus} to the specified location.
241
242
  *
242
- * The location can be specified in the same form as {@link module:engine/view/view~View#createPositionAt view.createPositionAt()}
243
+ * The location can be specified in the same form as
244
+ * {@link module:engine/view/view~EditingView#createPositionAt view.createPositionAt()}
243
245
  * parameters.
244
246
  *
245
247
  * @internal
246
248
  * @fires change
247
- * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~Item view item}.
249
+ * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~ViewItem view item}.
248
250
  */
249
251
  _setFocus(itemOrPosition, offset) {
250
252
  this._selection.setFocus(itemOrPosition, offset);
@@ -252,7 +254,7 @@ export default class DocumentSelection extends /* #__PURE__ */ EmitterMixin(Type
252
254
  }
253
255
  // The magic of type inference using `is` method is centralized in `TypeCheckable` class.
254
256
  // Proper overload would interfere with that.
255
- DocumentSelection.prototype.is = function (type) {
257
+ ViewDocumentSelection.prototype.is = function (type) {
256
258
  return type === 'selection' ||
257
259
  type == 'documentSelection' ||
258
260
  type == 'view:selection' ||
@@ -5,19 +5,19 @@
5
5
  /**
6
6
  * @module engine/view/domconverter
7
7
  */
8
- import ViewText from './text.js';
9
- import ViewElement from './element.js';
10
- import ViewUIElement from './uielement.js';
11
- import ViewPosition from './position.js';
12
- import ViewRange from './range.js';
13
- import ViewSelection from './selection.js';
14
- import ViewDocumentFragment from './documentfragment.js';
8
+ import { ViewText } from './text.js';
9
+ import { ViewElement } from './element.js';
10
+ import { ViewUIElement } from './uielement.js';
11
+ import { ViewPosition } from './position.js';
12
+ import { ViewRange } from './range.js';
13
+ import { ViewSelection } from './selection.js';
14
+ import { ViewDocumentFragment } from './documentfragment.js';
15
15
  import { type MatcherPattern } from './matcher.js';
16
- import type ViewNode from './node.js';
17
- import type Document from './document.js';
18
- import type DocumentSelection from './documentselection.js';
19
- import type EditableElement from './editableelement.js';
20
- import type ViewRawElement from './rawelement.js';
16
+ import { type ViewNode } from './node.js';
17
+ import { type ViewDocument } from './document.js';
18
+ import { type ViewDocumentSelection } from './documentselection.js';
19
+ import { type ViewEditableElement } from './editableelement.js';
20
+ import { type ViewRawElement } from './rawelement.js';
21
21
  type DomNode = globalThis.Node;
22
22
  type DomElement = globalThis.HTMLElement;
23
23
  type DomDocument = globalThis.Document;
@@ -26,20 +26,21 @@ type DomRange = globalThis.Range;
26
26
  type DomText = globalThis.Text;
27
27
  type DomSelection = globalThis.Selection;
28
28
  /**
29
- * `DomConverter` is a set of tools to do transformations between DOM nodes and view nodes. It also handles
30
- * {@link module:engine/view/domconverter~DomConverter#bindElements bindings} between these nodes.
29
+ * `ViewDomConverter` is a set of tools to do transformations between DOM nodes and view nodes. It also handles
30
+ * {@link module:engine/view/domconverter~ViewDomConverter#bindElements bindings} between these nodes.
31
31
  *
32
32
  * An instance of the DOM converter is available under
33
- * {@link module:engine/view/view~View#domConverter `editor.editing.view.domConverter`}.
33
+ * {@link module:engine/view/view~EditingView#domConverter `editor.editing.view.domConverter`}.
34
34
  *
35
- * The DOM converter does not check which nodes should be rendered (use {@link module:engine/view/renderer~Renderer}), does not keep the
36
- * state of a tree nor keeps the synchronization between the tree view and the DOM tree (use {@link module:engine/view/document~Document}).
35
+ * The DOM converter does not check which nodes should be rendered (use {@link module:engine/view/renderer~ViewRenderer}), does not keep the
36
+ * state of a tree nor keeps the synchronization between the tree view and
37
+ * the DOM tree (use {@link module:engine/view/document~ViewDocument}).
37
38
  *
38
39
  * The DOM converter keeps DOM elements to view element bindings, so when the converter gets destroyed, the bindings are lost.
39
40
  * Two converters will keep separate binding maps, so one tree view can be bound with two DOM trees.
40
41
  */
41
- export default class DomConverter {
42
- readonly document: Document;
42
+ export declare class ViewDomConverter {
43
+ readonly document: ViewDocument;
43
44
  /**
44
45
  * Whether to leave the View-to-DOM conversion result unchanged or improve editing experience by filtering out interactive data.
45
46
  */
@@ -78,7 +79,7 @@ export default class DomConverter {
78
79
  */
79
80
  readonly unsafeElements: Array<string>;
80
81
  /**
81
- * The DOM Document used by `DomConverter` to create DOM nodes.
82
+ * The DOM Document used by `ViewDomConverter` to create DOM nodes.
82
83
  */
83
84
  private readonly _domDocument;
84
85
  /**
@@ -118,30 +119,30 @@ export default class DomConverter {
118
119
  * @param options.renderingMode Whether to leave the View-to-DOM conversion result unchanged
119
120
  * or improve editing experience by filtering out interactive data.
120
121
  */
121
- constructor(document: Document, { blockFillerMode, renderingMode }?: {
122
+ constructor(document: ViewDocument, { blockFillerMode, renderingMode }?: {
122
123
  blockFillerMode?: BlockFillerMode;
123
124
  renderingMode?: 'data' | 'editing';
124
125
  });
125
126
  /**
126
- * The DOM Document used by `DomConverter` to create DOM nodes.
127
+ * The DOM Document used by `ViewDomConverter` to create DOM nodes.
127
128
  */
128
129
  get domDocument(): DomDocument;
129
130
  /**
130
131
  * Binds a given DOM element that represents fake selection to a **position** of a
131
- * {@link module:engine/view/documentselection~DocumentSelection document selection}.
132
+ * {@link module:engine/view/documentselection~ViewDocumentSelection document selection}.
132
133
  * Document selection copy is stored and can be retrieved by the
133
- * {@link module:engine/view/domconverter~DomConverter#fakeSelectionToView} method.
134
+ * {@link module:engine/view/domconverter~ViewDomConverter#fakeSelectionToView} method.
134
135
  */
135
- bindFakeSelection(domElement: DomElement, viewDocumentSelection: DocumentSelection): void;
136
+ bindFakeSelection(domElement: DomElement, viewDocumentSelection: ViewDocumentSelection): void;
136
137
  /**
137
- * Returns a {@link module:engine/view/selection~Selection view selection} instance corresponding to a given
138
+ * Returns a {@link module:engine/view/selection~ViewSelection view selection} instance corresponding to a given
138
139
  * DOM element that represents fake selection. Returns `undefined` if binding to the given DOM element does not exist.
139
140
  */
140
141
  fakeSelectionToView(domElement: DomElement): ViewSelection | undefined;
141
142
  /**
142
143
  * Binds DOM and view elements, so it will be possible to get corresponding elements using
143
- * {@link module:engine/view/domconverter~DomConverter#mapDomToView} and
144
- * {@link module:engine/view/domconverter~DomConverter#mapViewToDom}.
144
+ * {@link module:engine/view/domconverter~ViewDomConverter#mapDomToView} and
145
+ * {@link module:engine/view/domconverter~ViewDomConverter#mapViewToDom}.
145
146
  *
146
147
  * @param domElement The DOM element to bind.
147
148
  * @param viewElement The view element to bind.
@@ -156,8 +157,8 @@ export default class DomConverter {
156
157
  unbindDomElement(domElement: DomElement): void;
157
158
  /**
158
159
  * Binds DOM and view document fragments, so it will be possible to get corresponding document fragments using
159
- * {@link module:engine/view/domconverter~DomConverter#mapDomToView} and
160
- * {@link module:engine/view/domconverter~DomConverter#mapViewToDom}.
160
+ * {@link module:engine/view/domconverter~ViewDomConverter#mapDomToView} and
161
+ * {@link module:engine/view/domconverter~ViewDomConverter#mapViewToDom}.
161
162
  *
162
163
  * @param domFragment The DOM document fragment to bind.
163
164
  * @param viewFragment The view document fragment to bind.
@@ -202,7 +203,8 @@ export default class DomConverter {
202
203
  * @param value The value of the attribute.
203
204
  * @param relatedViewElement The view element related to the `domElement` (if there is any).
204
205
  * It helps decide whether the attribute set is unsafe. For instance, view elements created via the
205
- * {@link module:engine/view/downcastwriter~DowncastWriter} methods can allow certain attributes that would normally be filtered out.
206
+ * {@link module:engine/view/downcastwriter~ViewDowncastWriter} methods can allow certain attributes
207
+ * that would normally be filtered out.
206
208
  */
207
209
  setDomElementAttribute(domElement: DomElement, key: string, value: string, relatedViewElement?: ViewElement): void;
208
210
  /**
@@ -216,11 +218,11 @@ export default class DomConverter {
216
218
  removeDomElementAttribute(domElement: DomElement, key: string): void;
217
219
  /**
218
220
  * Converts children of the view element to DOM using the
219
- * {@link module:engine/view/domconverter~DomConverter#viewToDom} method.
221
+ * {@link module:engine/view/domconverter~ViewDomConverter#viewToDom} method.
220
222
  * Additionally, this method adds block {@link module:engine/view/filler filler} to the list of children, if needed.
221
223
  *
222
224
  * @param viewElement Parent view element.
223
- * @param options See {@link module:engine/view/domconverter~DomConverter#viewToDom} options parameter.
225
+ * @param options See {@link module:engine/view/domconverter~ViewDomConverter#viewToDom} options parameter.
224
226
  * @returns DOM nodes.
225
227
  */
226
228
  viewChildrenToDom(viewElement: ViewElement | ViewDocumentFragment, options?: {
@@ -228,7 +230,7 @@ export default class DomConverter {
228
230
  withChildren?: boolean;
229
231
  }): IterableIterator<Node>;
230
232
  /**
231
- * Converts view {@link module:engine/view/range~Range} to DOM range.
233
+ * Converts view {@link module:engine/view/range~ViewRange} to DOM range.
232
234
  * Inline and block {@link module:engine/view/filler fillers} are handled during the conversion.
233
235
  *
234
236
  * @param viewRange View range.
@@ -236,7 +238,7 @@ export default class DomConverter {
236
238
  */
237
239
  viewRangeToDom(viewRange: ViewRange): DomRange;
238
240
  /**
239
- * Converts view {@link module:engine/view/position~Position} to DOM parent and offset.
241
+ * Converts view {@link module:engine/view/position~ViewPosition} to DOM parent and offset.
240
242
  *
241
243
  * Inline and block {@link module:engine/view/filler fillers} are handled during the conversion.
242
244
  * If the converted position is directly before inline filler it is moved inside the filler.
@@ -255,7 +257,7 @@ export default class DomConverter {
255
257
  * Converts DOM to view. For all text nodes, not bound elements and document fragments new items will
256
258
  * be created. For bound elements and document fragments function will return corresponding items. For
257
259
  * {@link module:engine/view/filler fillers} `null` will be returned.
258
- * For all DOM elements rendered by {@link module:engine/view/uielement~UIElement} that UIElement will be returned.
260
+ * For all DOM elements rendered by {@link module:engine/view/uielement~ViewUIElement} that UIElement will be returned.
259
261
  *
260
262
  * @param domNode DOM node or document fragment to transform.
261
263
  * @param options Conversion options.
@@ -263,7 +265,7 @@ export default class DomConverter {
263
265
  * @param options.withChildren If `true`, node's and document fragment's children will be converted too. True by default.
264
266
  * @param options.keepOriginalCase If `false`, node's tag name will be converted to lower case. False by default.
265
267
  * @param options.skipComments If `false`, comment nodes will be converted to `$comment`
266
- * {@link module:engine/view/uielement~UIElement view UI elements}. False by default.
268
+ * {@link module:engine/view/uielement~ViewUIElement view UI elements}. False by default.
267
269
  * @returns Converted node or document fragment or `null` if DOM node is a {@link module:engine/view/filler filler}
268
270
  * or the given node is an empty text node.
269
271
  */
@@ -275,17 +277,17 @@ export default class DomConverter {
275
277
  }): ViewNode | ViewDocumentFragment | null;
276
278
  /**
277
279
  * Converts children of the DOM element to view nodes using
278
- * the {@link module:engine/view/domconverter~DomConverter#domToView} method.
280
+ * the {@link module:engine/view/domconverter~ViewDomConverter#domToView} method.
279
281
  * Additionally this method omits block {@link module:engine/view/filler filler}, if it exists in the DOM parent.
280
282
  *
281
283
  * @param domElement Parent DOM element.
282
- * @param options See {@link module:engine/view/domconverter~DomConverter#domToView} options parameter.
284
+ * @param options See {@link module:engine/view/domconverter~ViewDomConverter#domToView} options parameter.
283
285
  * @param inlineNodes An array that will be populated with inline nodes. It's used internally for whitespace processing.
284
286
  * @returns View nodes.
285
287
  */
286
- domChildrenToView(domElement: DomElement, options?: Parameters<DomConverter['domToView']>[1], inlineNodes?: Array<ViewNode>): IterableIterator<ViewNode>;
288
+ domChildrenToView(domElement: DomElement, options?: Parameters<ViewDomConverter['domToView']>[1], inlineNodes?: Array<ViewNode>): IterableIterator<ViewNode>;
287
289
  /**
288
- * Converts DOM selection to view {@link module:engine/view/selection~Selection}.
290
+ * Converts DOM selection to view {@link module:engine/view/selection~ViewSelection}.
289
291
  * Ranges which cannot be converted will be omitted.
290
292
  *
291
293
  * @param domSelection DOM selection.
@@ -293,7 +295,7 @@ export default class DomConverter {
293
295
  */
294
296
  domSelectionToView(domSelection: DomSelection): ViewSelection;
295
297
  /**
296
- * Converts DOM Range to view {@link module:engine/view/range~Range}.
298
+ * Converts DOM Range to view {@link module:engine/view/range~ViewRange}.
297
299
  * If the start or end position cannot be converted `null` is returned.
298
300
  *
299
301
  * @param domRange DOM range.
@@ -301,12 +303,12 @@ export default class DomConverter {
301
303
  */
302
304
  domRangeToView(domRange: DomRange | StaticRange): ViewRange | null;
303
305
  /**
304
- * Converts DOM parent and offset to view {@link module:engine/view/position~Position}.
306
+ * Converts DOM parent and offset to view {@link module:engine/view/position~ViewPosition}.
305
307
  *
306
308
  * If the position is inside a {@link module:engine/view/filler filler} which has no corresponding view node,
307
309
  * position of the filler will be converted and returned.
308
310
  *
309
- * If the position is inside DOM element rendered by {@link module:engine/view/uielement~UIElement}
311
+ * If the position is inside DOM element rendered by {@link module:engine/view/uielement~ViewUIElement}
310
312
  * that position will be converted to view position before that UIElement.
311
313
  *
312
314
  * If structures are too different and it is not possible to find corresponding position then `null` will be returned.
@@ -317,30 +319,31 @@ export default class DomConverter {
317
319
  */
318
320
  domPositionToView(domParent: DomNode, domOffset?: number): ViewPosition | null;
319
321
  /**
320
- * Returns corresponding view {@link module:engine/view/element~Element Element} or
321
- * {@link module:engine/view/documentfragment~DocumentFragment} for provided DOM element or
322
- * document fragment. If there is no view item {@link module:engine/view/domconverter~DomConverter#bindElements bound}
322
+ * Returns corresponding view {@link module:engine/view/element~ViewElement Element} or
323
+ * {@link module:engine/view/documentfragment~ViewDocumentFragment} for provided DOM element or
324
+ * document fragment. If there is no view item {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound}
323
325
  * to the given DOM - `undefined` is returned.
324
326
  *
325
- * For all DOM elements rendered by a {@link module:engine/view/uielement~UIElement} or
326
- * a {@link module:engine/view/rawelement~RawElement}, the parent `UIElement` or `RawElement` will be returned.
327
+ * For all DOM elements rendered by a {@link module:engine/view/uielement~ViewUIElement} or
328
+ * a {@link module:engine/view/rawelement~ViewRawElement}, the parent `UIElement` or `RawElement` will be returned.
327
329
  *
328
330
  * @param domElementOrDocumentFragment DOM element or document fragment.
329
331
  * @returns Corresponding view element, document fragment or `undefined` if no element was bound.
330
332
  */
331
333
  mapDomToView(domElementOrDocumentFragment: DomElement | DomDocumentFragment): ViewElement | ViewDocumentFragment | undefined;
332
334
  /**
333
- * Finds corresponding text node. Text nodes are not {@link module:engine/view/domconverter~DomConverter#bindElements bound},
335
+ * Finds corresponding text node. Text nodes are not {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound},
334
336
  * corresponding text node is returned based on the sibling or parent.
335
337
  *
336
- * If the directly previous sibling is a {@link module:engine/view/domconverter~DomConverter#bindElements bound} element, it is used
338
+ * If the directly previous sibling is a {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound} element, it is used
337
339
  * to find the corresponding text node.
338
340
  *
339
- * If this is a first child in the parent and the parent is a {@link module:engine/view/domconverter~DomConverter#bindElements bound}
341
+ * If this is a first child in the parent and the parent is a
342
+ * {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound}
340
343
  * element, it is used to find the corresponding text node.
341
344
  *
342
- * For all text nodes rendered by a {@link module:engine/view/uielement~UIElement} or
343
- * a {@link module:engine/view/rawelement~RawElement}, the parent `UIElement` or `RawElement` will be returned.
345
+ * For all text nodes rendered by a {@link module:engine/view/uielement~ViewUIElement} or
346
+ * a {@link module:engine/view/rawelement~ViewRawElement}, the parent `UIElement` or `RawElement` will be returned.
344
347
  *
345
348
  * Otherwise `null` is returned.
346
349
  *
@@ -351,9 +354,9 @@ export default class DomConverter {
351
354
  */
352
355
  findCorrespondingViewText(domText: DomText): ViewText | ViewUIElement | ViewRawElement | null;
353
356
  /**
354
- * Returns corresponding DOM item for provided {@link module:engine/view/element~Element Element} or
355
- * {@link module:engine/view/documentfragment~DocumentFragment DocumentFragment}.
356
- * To find a corresponding text for {@link module:engine/view/text~Text view Text instance}
357
+ * Returns corresponding DOM item for provided {@link module:engine/view/element~ViewElement Element} or
358
+ * {@link module:engine/view/documentfragment~ViewDocumentFragment DocumentFragment}.
359
+ * To find a corresponding text for {@link module:engine/view/text~ViewText view Text instance}
357
360
  * use {@link #findCorrespondingDomText}.
358
361
  *
359
362
  * @label ELEMENT
@@ -362,9 +365,9 @@ export default class DomConverter {
362
365
  */
363
366
  mapViewToDom(element: ViewElement): DomElement | undefined;
364
367
  /**
365
- * Returns corresponding DOM item for provided {@link module:engine/view/element~Element Element} or
366
- * {@link module:engine/view/documentfragment~DocumentFragment DocumentFragment}.
367
- * To find a corresponding text for {@link module:engine/view/text~Text view Text instance}
368
+ * Returns corresponding DOM item for provided {@link module:engine/view/element~ViewElement Element} or
369
+ * {@link module:engine/view/documentfragment~ViewDocumentFragment DocumentFragment}.
370
+ * To find a corresponding text for {@link module:engine/view/text~ViewText view Text instance}
368
371
  * use {@link #findCorrespondingDomText}.
369
372
  *
370
373
  * @label DOCUMENT_FRAGMENT
@@ -373,9 +376,9 @@ export default class DomConverter {
373
376
  */
374
377
  mapViewToDom(documentFragment: ViewDocumentFragment): DomDocumentFragment | undefined;
375
378
  /**
376
- * Returns corresponding DOM item for provided {@link module:engine/view/element~Element Element} or
377
- * {@link module:engine/view/documentfragment~DocumentFragment DocumentFragment}.
378
- * To find a corresponding text for {@link module:engine/view/text~Text view Text instance}
379
+ * Returns corresponding DOM item for provided {@link module:engine/view/element~ViewElement Element} or
380
+ * {@link module:engine/view/documentfragment~ViewDocumentFragment DocumentFragment}.
381
+ * To find a corresponding text for {@link module:engine/view/text~ViewText view Text instance}
379
382
  * use {@link #findCorrespondingDomText}.
380
383
  *
381
384
  * @label DOCUMENT_FRAGMENT_OR_ELEMENT
@@ -384,13 +387,14 @@ export default class DomConverter {
384
387
  */
385
388
  mapViewToDom(documentFragmentOrElement: ViewElement | ViewDocumentFragment): DomElement | DomDocumentFragment | undefined;
386
389
  /**
387
- * Finds corresponding text node. Text nodes are not {@link module:engine/view/domconverter~DomConverter#bindElements bound},
390
+ * Finds corresponding text node. Text nodes are not {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound},
388
391
  * corresponding text node is returned based on the sibling or parent.
389
392
  *
390
- * If the directly previous sibling is a {@link module:engine/view/domconverter~DomConverter#bindElements bound} element, it is used
393
+ * If the directly previous sibling is a {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound} element, it is used
391
394
  * to find the corresponding text node.
392
395
  *
393
- * If this is a first child in the parent and the parent is a {@link module:engine/view/domconverter~DomConverter#bindElements bound}
396
+ * If this is a first child in the parent and the parent is a
397
+ * {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound}
394
398
  * element, it is used to find the corresponding text node.
395
399
  *
396
400
  * Otherwise `null` is returned.
@@ -400,9 +404,9 @@ export default class DomConverter {
400
404
  */
401
405
  findCorrespondingDomText(viewText: ViewText): DomText | null;
402
406
  /**
403
- * Focuses DOM editable that is corresponding to provided {@link module:engine/view/editableelement~EditableElement}.
407
+ * Focuses DOM editable that is corresponding to provided {@link module:engine/view/editableelement~ViewEditableElement}.
404
408
  */
405
- focus(viewEditable: EditableElement): void;
409
+ focus(viewEditable: ViewEditableElement): void;
406
410
  /**
407
411
  * Remove DOM selection from blurred editable, so it won't interfere with clicking on dropdowns (especially on iOS).
408
412
  *
@@ -425,7 +429,7 @@ export default class DomConverter {
425
429
  * Checks if the node is an instance of the block filler for this DOM converter.
426
430
  *
427
431
  * ```ts
428
- * const converter = new DomConverter( viewDocument, { blockFillerMode: 'br' } );
432
+ * const converter = new ViewDomConverter( viewDocument, { blockFillerMode: 'br' } );
429
433
  *
430
434
  * converter.isBlockFiller( BR_FILLER( document ) ); // true
431
435
  * converter.isBlockFiller( NBSP_FILLER( document ) ); // false
@@ -446,7 +450,7 @@ export default class DomConverter {
446
450
  */
447
451
  isDomSelectionBackward(selection: DomSelection): boolean;
448
452
  /**
449
- * Returns a parent {@link module:engine/view/uielement~UIElement} or {@link module:engine/view/rawelement~RawElement}
453
+ * Returns a parent {@link module:engine/view/uielement~ViewUIElement} or {@link module:engine/view/rawelement~ViewRawElement}
450
454
  * that hosts the provided DOM node. Returns `null` if there is no such parent.
451
455
  */
452
456
  getHostViewElement(domNode: DomNode): ViewUIElement | ViewRawElement | null;
@@ -456,8 +460,8 @@ export default class DomConverter {
456
460
  * The following places are considered as incorrect for selection boundaries:
457
461
  *
458
462
  * * before or in the middle of an inline filler sequence,
459
- * * inside a DOM element which represents {@link module:engine/view/uielement~UIElement a view UI element},
460
- * * inside a DOM element which represents {@link module:engine/view/rawelement~RawElement a view raw element}.
463
+ * * inside a DOM element which represents {@link module:engine/view/uielement~ViewUIElement a view UI element},
464
+ * * inside a DOM element which represents {@link module:engine/view/rawelement~ViewRawElement a view raw element}.
461
465
  *
462
466
  * @param domSelection The DOM selection object to be checked.
463
467
  * @returns `true` if the given selection is at a correct place, `false` otherwise.
@@ -467,11 +471,11 @@ export default class DomConverter {
467
471
  * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data
468
472
  * and not processed during the conversion from DOM nodes to view elements.
469
473
  *
470
- * This is affecting how {@link module:engine/view/domconverter~DomConverter#domToView} and
471
- * {@link module:engine/view/domconverter~DomConverter#domChildrenToView} process DOM nodes.
474
+ * This is affecting how {@link module:engine/view/domconverter~ViewDomConverter#domToView} and
475
+ * {@link module:engine/view/domconverter~ViewDomConverter#domChildrenToView} process DOM nodes.
472
476
  *
473
477
  * The raw data can be later accessed by a
474
- * {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `"$rawContent"`.
478
+ * {@link module:engine/view/element~ViewElement#getCustomProperty custom property of a view element} called `"$rawContent"`.
475
479
  *
476
480
  * @param pattern Pattern matching a view element whose content should
477
481
  * be treated as raw data.
@@ -480,8 +484,8 @@ export default class DomConverter {
480
484
  /**
481
485
  * Registers a {@link module:engine/view/matcher~MatcherPattern} for inline object view elements.
482
486
  *
483
- * This is affecting how {@link module:engine/view/domconverter~DomConverter#domToView} and
484
- * {@link module:engine/view/domconverter~DomConverter#domChildrenToView} process DOM nodes.
487
+ * This is affecting how {@link module:engine/view/domconverter~ViewDomConverter#domToView} and
488
+ * {@link module:engine/view/domconverter~ViewDomConverter#domChildrenToView} process DOM nodes.
485
489
  *
486
490
  * This is an extension of a simple {@link #inlineObjectElements} array of element names.
487
491
  *
@@ -525,7 +529,7 @@ export default class DomConverter {
525
529
  */
526
530
  private _processDomInlineNodes;
527
531
  /**
528
- * Takes text data from a given {@link module:engine/view/text~Text#data} and processes it so
532
+ * Takes text data from a given {@link module:engine/view/text~ViewText#data} and processes it so
529
533
  * it is correctly displayed in the DOM.
530
534
  *
531
535
  * Following changes are done:
@@ -559,7 +563,7 @@ export default class DomConverter {
559
563
  */
560
564
  private _isPreFormatted;
561
565
  /**
562
- * Helper function. For given {@link module:engine/view/text~Text view text node}, it finds previous or next sibling
566
+ * Helper function. For given {@link module:engine/view/text~ViewText view text node}, it finds previous or next sibling
563
567
  * that is contained in the same container element. If there is no such sibling, `null` is returned.
564
568
  *
565
569
  * @param node Reference node.
@@ -583,14 +587,14 @@ export default class DomConverter {
583
587
  * Creates view element basing on the node type.
584
588
  *
585
589
  * @param node DOM node to check.
586
- * @param options Conversion options. See {@link module:engine/view/domconverter~DomConverter#domToView} options parameter.
590
+ * @param options Conversion options. See {@link module:engine/view/domconverter~ViewDomConverter#domToView} options parameter.
587
591
  */
588
592
  private _createViewElement;
589
593
  /**
590
594
  * Checks if view element's content should be treated as a raw data.
591
595
  *
592
596
  * @param viewElement View element to check.
593
- * @param options Conversion options. See {@link module:engine/view/domconverter~DomConverter#domToView} options parameter.
597
+ * @param options Conversion options. See {@link module:engine/view/domconverter~ViewDomConverter#domToView} options parameter.
594
598
  */
595
599
  private _isViewElementWithRawContent;
596
600
  /**
@@ -618,32 +622,33 @@ export default class DomConverter {
618
622
  * * `markedNbsp` &ndash; For the `&nbsp;` block fillers wrapped in `<span>` elements: `<span data-cke-filler="true">&nbsp;</span>`
619
623
  * used in the data.
620
624
  */
621
- type BlockFillerMode = 'br' | 'nbsp' | 'markedNbsp';
625
+ export type BlockFillerMode = 'br' | 'nbsp' | 'markedNbsp';
622
626
  export {};
623
627
  /**
624
- * While rendering the editor content, the {@link module:engine/view/domconverter~DomConverter} detected a `<script>` element that may
628
+ * While rendering the editor content, the {@link module:engine/view/domconverter~ViewDomConverter} detected a `<script>` element that may
625
629
  * disrupt the editing experience. To avoid this, the `<script>` element was replaced with `<span data-ck-unsafe-element="script"></span>`.
626
630
  *
627
631
  * @error domconverter-unsafe-script-element-detected
628
632
  */
629
633
  /**
630
- * While rendering the editor content, the {@link module:engine/view/domconverter~DomConverter} detected a `<style>` element that may affect
634
+ * While rendering the editor content, the
635
+ * {@link module:engine/view/domconverter~ViewDomConverter} detected a `<style>` element that may affect
631
636
  * the editing experience. To avoid this, the `<style>` element was replaced with `<span data-ck-unsafe-element="style"></span>`.
632
637
  *
633
638
  * @error domconverter-unsafe-style-element-detected
634
639
  */
635
640
  /**
636
- * The {@link module:engine/view/domconverter~DomConverter} detected an interactive attribute in the
641
+ * The {@link module:engine/view/domconverter~ViewDomConverter} detected an interactive attribute in the
637
642
  * {@glink framework/architecture/editing-engine#editing-pipeline editing pipeline}. For the best
638
643
  * editing experience, the attribute was renamed to `data-ck-unsafe-attribute-[original attribute name]`.
639
644
  *
640
645
  * If you are the author of the plugin that generated this attribute and you want it to be preserved
641
646
  * in the editing pipeline, you can configure this when creating the element
642
- * using {@link module:engine/view/downcastwriter~DowncastWriter} during the
647
+ * using {@link module:engine/view/downcastwriter~ViewDowncastWriter} during the
643
648
  * {@glink framework/architecture/editing-engine#conversion model–view conversion}. Methods such as
644
- * {@link module:engine/view/downcastwriter~DowncastWriter#createContainerElement},
645
- * {@link module:engine/view/downcastwriter~DowncastWriter#createAttributeElement}, or
646
- * {@link module:engine/view/downcastwriter~DowncastWriter#createEmptyElement}
649
+ * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createContainerElement},
650
+ * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createAttributeElement}, or
651
+ * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createEmptyElement}
647
652
  * accept an option that will disable filtering of specific attributes:
648
653
  *
649
654
  * ```ts