@ckeditor/ckeditor5-engine 40.2.0 → 41.1.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 (245) hide show
  1. package/CHANGELOG.md +34 -34
  2. package/LICENSE.md +1 -1
  3. package/package.json +3 -2
  4. package/src/controller/datacontroller.d.ts +17 -16
  5. package/src/controller/datacontroller.js +12 -12
  6. package/src/controller/editingcontroller.d.ts +8 -8
  7. package/src/controller/editingcontroller.js +8 -8
  8. package/src/conversion/conversion.d.ts +7 -7
  9. package/src/conversion/conversion.js +3 -3
  10. package/src/conversion/conversionhelpers.d.ts +1 -1
  11. package/src/conversion/conversionhelpers.js +1 -1
  12. package/src/conversion/downcastdispatcher.d.ts +14 -14
  13. package/src/conversion/downcastdispatcher.js +3 -3
  14. package/src/conversion/downcasthelpers.d.ts +18 -54
  15. package/src/conversion/downcasthelpers.js +35 -52
  16. package/src/conversion/mapper.d.ts +10 -10
  17. package/src/conversion/mapper.js +6 -6
  18. package/src/conversion/modelconsumable.d.ts +6 -6
  19. package/src/conversion/modelconsumable.js +2 -2
  20. package/src/conversion/upcastdispatcher.d.ts +13 -13
  21. package/src/conversion/upcastdispatcher.js +6 -6
  22. package/src/conversion/upcasthelpers.d.ts +10 -10
  23. package/src/conversion/upcasthelpers.js +6 -6
  24. package/src/conversion/viewconsumable.d.ts +6 -6
  25. package/src/conversion/viewconsumable.js +1 -1
  26. package/src/dataprocessor/basichtmlwriter.d.ts +2 -2
  27. package/src/dataprocessor/basichtmlwriter.js +1 -1
  28. package/src/dataprocessor/dataprocessor.d.ts +3 -3
  29. package/src/dataprocessor/dataprocessor.js +1 -1
  30. package/src/dataprocessor/htmldataprocessor.d.ts +7 -7
  31. package/src/dataprocessor/htmldataprocessor.js +3 -3
  32. package/src/dataprocessor/htmlwriter.d.ts +1 -1
  33. package/src/dataprocessor/htmlwriter.js +1 -1
  34. package/src/dataprocessor/xmldataprocessor.d.ts +7 -7
  35. package/src/dataprocessor/xmldataprocessor.js +3 -3
  36. package/src/dev-utils/model.d.ts +11 -11
  37. package/src/dev-utils/model.js +17 -17
  38. package/src/dev-utils/operationreplayer.d.ts +3 -3
  39. package/src/dev-utils/operationreplayer.js +2 -2
  40. package/src/dev-utils/utils.d.ts +1 -1
  41. package/src/dev-utils/utils.js +1 -1
  42. package/src/dev-utils/view.d.ts +9 -9
  43. package/src/dev-utils/view.js +15 -15
  44. package/src/index.d.ts +107 -108
  45. package/src/index.js +65 -66
  46. package/src/model/batch.d.ts +2 -2
  47. package/src/model/batch.js +1 -1
  48. package/src/model/differ.d.ts +35 -7
  49. package/src/model/differ.js +9 -6
  50. package/src/model/document.d.ts +12 -10
  51. package/src/model/document.js +5 -5
  52. package/src/model/documentfragment.d.ts +5 -5
  53. package/src/model/documentfragment.js +6 -6
  54. package/src/model/documentselection.d.ts +9 -9
  55. package/src/model/documentselection.js +6 -6
  56. package/src/model/element.d.ts +3 -3
  57. package/src/model/element.js +5 -5
  58. package/src/model/history.d.ts +2 -2
  59. package/src/model/history.js +1 -1
  60. package/src/model/item.d.ts +3 -3
  61. package/src/model/item.js +1 -1
  62. package/src/model/liveposition.d.ts +5 -5
  63. package/src/model/liveposition.js +2 -2
  64. package/src/model/liverange.d.ts +6 -6
  65. package/src/model/liverange.js +2 -2
  66. package/src/model/markercollection.d.ts +5 -5
  67. package/src/model/markercollection.js +3 -3
  68. package/src/model/model.d.ts +15 -15
  69. package/src/model/model.js +19 -19
  70. package/src/model/node.d.ts +6 -6
  71. package/src/model/node.js +3 -3
  72. package/src/model/nodelist.d.ts +2 -2
  73. package/src/model/nodelist.js +2 -2
  74. package/src/model/operation/attributeoperation.d.ts +5 -5
  75. package/src/model/operation/attributeoperation.js +4 -4
  76. package/src/model/operation/detachoperation.d.ts +4 -4
  77. package/src/model/operation/detachoperation.js +4 -4
  78. package/src/model/operation/insertoperation.d.ts +7 -7
  79. package/src/model/operation/insertoperation.js +8 -8
  80. package/src/model/operation/markeroperation.d.ts +6 -6
  81. package/src/model/operation/markeroperation.js +3 -3
  82. package/src/model/operation/mergeoperation.d.ts +6 -6
  83. package/src/model/operation/mergeoperation.js +6 -6
  84. package/src/model/operation/moveoperation.d.ts +5 -5
  85. package/src/model/operation/moveoperation.js +5 -5
  86. package/src/model/operation/nooperation.d.ts +3 -3
  87. package/src/model/operation/nooperation.js +2 -2
  88. package/src/model/operation/operation.d.ts +4 -4
  89. package/src/model/operation/operation.js +1 -1
  90. package/src/model/operation/operationfactory.d.ts +3 -3
  91. package/src/model/operation/operationfactory.js +12 -12
  92. package/src/model/operation/renameoperation.d.ts +5 -5
  93. package/src/model/operation/renameoperation.js +4 -4
  94. package/src/model/operation/rootattributeoperation.d.ts +5 -5
  95. package/src/model/operation/rootattributeoperation.js +2 -2
  96. package/src/model/operation/rootoperation.d.ts +4 -4
  97. package/src/model/operation/rootoperation.js +2 -2
  98. package/src/model/operation/splitoperation.d.ts +6 -6
  99. package/src/model/operation/splitoperation.js +6 -6
  100. package/src/model/operation/transform.d.ts +3 -3
  101. package/src/model/operation/transform.js +13 -13
  102. package/src/model/operation/utils.d.ts +7 -7
  103. package/src/model/operation/utils.js +5 -5
  104. package/src/model/position.d.ts +15 -15
  105. package/src/model/position.js +4 -4
  106. package/src/model/range.d.ts +13 -13
  107. package/src/model/range.js +4 -4
  108. package/src/model/rootelement.d.ts +3 -3
  109. package/src/model/rootelement.js +2 -2
  110. package/src/model/schema.d.ts +32 -12
  111. package/src/model/schema.js +52 -7
  112. package/src/model/selection.d.ts +8 -8
  113. package/src/model/selection.js +5 -5
  114. package/src/model/text.d.ts +2 -2
  115. package/src/model/text.js +2 -2
  116. package/src/model/textproxy.d.ts +6 -6
  117. package/src/model/textproxy.js +2 -2
  118. package/src/model/treewalker.d.ts +4 -4
  119. package/src/model/treewalker.js +5 -5
  120. package/src/model/typecheckable.d.ts +14 -14
  121. package/src/model/typecheckable.js +1 -1
  122. package/src/model/utils/autoparagraphing.d.ts +5 -5
  123. package/src/model/utils/autoparagraphing.js +1 -1
  124. package/src/model/utils/deletecontent.d.ts +4 -4
  125. package/src/model/utils/deletecontent.js +4 -4
  126. package/src/model/utils/getselectedcontent.d.ts +5 -5
  127. package/src/model/utils/getselectedcontent.js +1 -1
  128. package/src/model/utils/insertcontent.d.ts +7 -7
  129. package/src/model/utils/insertcontent.js +7 -7
  130. package/src/model/utils/insertobject.d.ts +9 -6
  131. package/src/model/utils/insertobject.js +2 -6
  132. package/src/model/utils/modifyselection.d.ts +4 -4
  133. package/src/model/utils/modifyselection.js +5 -5
  134. package/src/model/utils/selection-post-fixer.d.ts +4 -4
  135. package/src/model/utils/selection-post-fixer.js +3 -3
  136. package/src/model/writer.d.ts +13 -13
  137. package/src/model/writer.js +18 -18
  138. package/src/view/attributeelement.d.ts +4 -4
  139. package/src/view/attributeelement.js +4 -3
  140. package/src/view/containerelement.d.ts +4 -4
  141. package/src/view/containerelement.js +2 -2
  142. package/src/view/datatransfer.d.ts +1 -1
  143. package/src/view/datatransfer.js +1 -1
  144. package/src/view/document.d.ts +5 -5
  145. package/src/view/document.js +3 -3
  146. package/src/view/documentfragment.d.ts +5 -5
  147. package/src/view/documentfragment.js +4 -4
  148. package/src/view/documentselection.d.ts +9 -9
  149. package/src/view/documentselection.js +3 -3
  150. package/src/view/domconverter.d.ts +14 -14
  151. package/src/view/domconverter.js +11 -11
  152. package/src/view/downcastwriter.d.ts +18 -18
  153. package/src/view/downcastwriter.js +12 -12
  154. package/src/view/editableelement.d.ts +5 -5
  155. package/src/view/editableelement.js +2 -2
  156. package/src/view/element.d.ts +6 -6
  157. package/src/view/element.js +6 -6
  158. package/src/view/elementdefinition.d.ts +1 -1
  159. package/src/view/elementdefinition.js +1 -1
  160. package/src/view/emptyelement.d.ts +5 -5
  161. package/src/view/emptyelement.js +3 -3
  162. package/src/view/filler.d.ts +2 -2
  163. package/src/view/filler.js +1 -1
  164. package/src/view/item.d.ts +3 -3
  165. package/src/view/item.js +1 -1
  166. package/src/view/matcher.d.ts +2 -2
  167. package/src/view/matcher.js +1 -1
  168. package/src/view/node.d.ts +6 -6
  169. package/src/view/node.js +3 -3
  170. package/src/view/observer/arrowkeysobserver.d.ts +5 -5
  171. package/src/view/observer/arrowkeysobserver.js +3 -3
  172. package/src/view/observer/bubblingemittermixin.d.ts +3 -3
  173. package/src/view/observer/bubblingemittermixin.js +2 -2
  174. package/src/view/observer/bubblingeventinfo.d.ts +4 -4
  175. package/src/view/observer/bubblingeventinfo.js +1 -1
  176. package/src/view/observer/clickobserver.d.ts +4 -4
  177. package/src/view/observer/clickobserver.js +2 -2
  178. package/src/view/observer/compositionobserver.d.ts +4 -4
  179. package/src/view/observer/compositionobserver.js +2 -2
  180. package/src/view/observer/domeventdata.d.ts +4 -4
  181. package/src/view/observer/domeventdata.js +1 -1
  182. package/src/view/observer/domeventobserver.d.ts +2 -2
  183. package/src/view/observer/domeventobserver.js +3 -3
  184. package/src/view/observer/fakeselectionobserver.d.ts +3 -3
  185. package/src/view/observer/fakeselectionobserver.js +3 -3
  186. package/src/view/observer/focusobserver.d.ts +4 -4
  187. package/src/view/observer/focusobserver.js +2 -2
  188. package/src/view/observer/inputobserver.d.ts +5 -5
  189. package/src/view/observer/inputobserver.js +3 -3
  190. package/src/view/observer/keyobserver.d.ts +3 -3
  191. package/src/view/observer/keyobserver.js +2 -2
  192. package/src/view/observer/mouseobserver.d.ts +3 -3
  193. package/src/view/observer/mouseobserver.js +2 -2
  194. package/src/view/observer/mutationobserver.d.ts +5 -5
  195. package/src/view/observer/mutationobserver.js +3 -3
  196. package/src/view/observer/observer.d.ts +3 -3
  197. package/src/view/observer/observer.js +1 -1
  198. package/src/view/observer/selectionobserver.d.ts +8 -8
  199. package/src/view/observer/selectionobserver.js +4 -4
  200. package/src/view/observer/tabobserver.d.ts +5 -5
  201. package/src/view/observer/tabobserver.js +3 -3
  202. package/src/view/placeholder.d.ts +5 -5
  203. package/src/view/placeholder.js +1 -1
  204. package/src/view/position.d.ts +8 -8
  205. package/src/view/position.js +5 -5
  206. package/src/view/range.d.ts +8 -8
  207. package/src/view/range.js +4 -4
  208. package/src/view/rawelement.d.ts +6 -6
  209. package/src/view/rawelement.js +3 -3
  210. package/src/view/renderer.d.ts +6 -6
  211. package/src/view/renderer.js +4 -4
  212. package/src/view/rooteditableelement.d.ts +3 -3
  213. package/src/view/rooteditableelement.js +2 -2
  214. package/src/view/selection.d.ts +9 -9
  215. package/src/view/selection.js +6 -6
  216. package/src/view/styles/background.d.ts +2 -2
  217. package/src/view/styles/background.js +2 -2
  218. package/src/view/styles/border.d.ts +2 -2
  219. package/src/view/styles/border.js +2 -2
  220. package/src/view/styles/margin.d.ts +2 -2
  221. package/src/view/styles/margin.js +2 -2
  222. package/src/view/styles/padding.d.ts +2 -2
  223. package/src/view/styles/padding.js +2 -2
  224. package/src/view/styles/utils.d.ts +2 -2
  225. package/src/view/styles/utils.js +1 -1
  226. package/src/view/stylesmap.d.ts +2 -2
  227. package/src/view/stylesmap.js +4 -4
  228. package/src/view/text.d.ts +3 -3
  229. package/src/view/text.js +2 -2
  230. package/src/view/textproxy.d.ts +7 -7
  231. package/src/view/textproxy.js +2 -2
  232. package/src/view/treewalker.d.ts +4 -4
  233. package/src/view/treewalker.js +5 -5
  234. package/src/view/typecheckable.d.ts +17 -17
  235. package/src/view/typecheckable.js +1 -1
  236. package/src/view/uielement.d.ts +7 -7
  237. package/src/view/uielement.js +3 -3
  238. package/src/view/upcastwriter.d.ts +10 -10
  239. package/src/view/upcastwriter.js +7 -7
  240. package/src/view/view.d.ts +22 -22
  241. package/src/view/view.js +19 -19
  242. package/theme/placeholder.css +1 -1
  243. package/theme/renderer.css +1 -1
  244. package/src/model/utils/findoptimalinsertionrange.d.ts +0 -32
  245. package/src/model/utils/findoptimalinsertionrange.js +0 -57
@@ -1,12 +1,15 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- import type DocumentSelection from '../documentselection';
6
- import type Selection from '../selection';
7
- import type Element from '../element';
8
- import type Model from '../model';
9
- import type Range from '../range';
5
+ /**
6
+ * @module engine/model/utils/insertobject
7
+ */
8
+ import type DocumentSelection from '../documentselection.js';
9
+ import type Selection from '../selection.js';
10
+ import type Element from '../element.js';
11
+ import type Model from '../model.js';
12
+ import type Range from '../range.js';
10
13
  /**
11
14
  * Inserts an {@glink framework/deep-dive/schema#object-elements object element} at a specific position in the editor content.
12
15
  *
@@ -1,11 +1,7 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- /**
6
- * @module engine/model/utils/insertobject
7
- */
8
- import { findOptimalInsertionRange } from './findoptimalinsertionrange';
9
5
  import { CKEditorError, first } from '@ckeditor/ckeditor5-utils';
10
6
  /**
11
7
  * Inserts an {@glink framework/deep-dive/schema#object-elements object element} at a specific position in the editor content.
@@ -55,7 +51,7 @@ export default function insertObject(model, object, selectable, options = {}) {
55
51
  // Adjust the insertion selection.
56
52
  let insertionSelection = originalSelection;
57
53
  if (options.findOptimalPosition && model.schema.isBlock(object)) {
58
- insertionSelection = model.createSelection(findOptimalInsertionRange(originalSelection, model, options.findOptimalPosition));
54
+ insertionSelection = model.createSelection(model.schema.findOptimalInsertionRange(originalSelection, options.findOptimalPosition));
59
55
  }
60
56
  // Collect attributes to be copied on the inserted object.
61
57
  const firstSelectedBlock = first(originalSelection.getSelectedBlocks());
@@ -1,13 +1,13 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/model/utils/modifyselection
7
7
  */
8
- import DocumentSelection from '../documentselection';
9
- import type Model from '../model';
10
- import type Selection from '../selection';
8
+ import DocumentSelection from '../documentselection.js';
9
+ import type Model from '../model.js';
10
+ import type Selection from '../selection.js';
11
11
  /**
12
12
  * Modifies the selection. Currently, the supported modifications are:
13
13
  *
@@ -1,14 +1,14 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/model/utils/modifyselection
7
7
  */
8
- import DocumentSelection from '../documentselection';
9
- import Position from '../position';
10
- import Range from '../range';
11
- import TreeWalker from '../treewalker';
8
+ import DocumentSelection from '../documentselection.js';
9
+ import Position from '../position.js';
10
+ import Range from '../range.js';
11
+ import TreeWalker from '../treewalker.js';
12
12
  import { isInsideSurrogatePair, isInsideCombinedSymbol, isInsideEmojiSequence } from '@ckeditor/ckeditor5-utils';
13
13
  const wordBoundaryCharacters = ' ,.?!:;"-()';
14
14
  /**
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- import Range from '../range';
6
- import type Model from '../model';
7
- import type Schema from '../schema';
5
+ import Range from '../range.js';
6
+ import type Model from '../model.js';
7
+ import type Schema from '../schema.js';
8
8
  /**
9
9
  * Injects selection post-fixer to the model.
10
10
  *
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/model/utils/selection-post-fixer
7
7
  */
8
- import Position from '../position';
9
- import Range from '../range';
8
+ import Position from '../position.js';
9
+ import Range from '../range.js';
10
10
  /**
11
11
  * Injects selection post-fixer to the model.
12
12
  *
@@ -1,19 +1,19 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- import DocumentFragment from './documentfragment';
6
- import Element from './element';
7
- import Position, { type PositionOffset, type PositionStickiness } from './position';
8
- import Range from './range';
9
- import RootElement from './rootelement';
10
- import Text from './text';
11
- import type { Marker } from './markercollection';
12
- import type { default as Selection, PlaceOrOffset, Selectable } from './selection';
13
- import type Batch from './batch';
14
- import type Item from './item';
15
- import type Model from './model';
16
- import type { default as Node, NodeAttributes } from './node';
5
+ import DocumentFragment from './documentfragment.js';
6
+ import Element from './element.js';
7
+ import Position, { type PositionOffset, type PositionStickiness } from './position.js';
8
+ import Range from './range.js';
9
+ import RootElement from './rootelement.js';
10
+ import Text from './text.js';
11
+ import type { Marker } from './markercollection.js';
12
+ import type { default as Selection, PlaceOrOffset, Selectable } from './selection.js';
13
+ import type Batch from './batch.js';
14
+ import type Item from './item.js';
15
+ import type Model from './model.js';
16
+ import type { default as Node, NodeAttributes } from './node.js';
17
17
  /**
18
18
  * The model can only be modified by using the writer. It should be used whenever you want to create a node, modify
19
19
  * child nodes, attributes or text, set the selection's position and its attributes.
@@ -1,27 +1,27 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/model/writer
7
7
  */
8
- import AttributeOperation from './operation/attributeoperation';
9
- import DetachOperation from './operation/detachoperation';
10
- import InsertOperation from './operation/insertoperation';
11
- import MarkerOperation from './operation/markeroperation';
12
- import MergeOperation from './operation/mergeoperation';
13
- import MoveOperation from './operation/moveoperation';
14
- import RenameOperation from './operation/renameoperation';
15
- import RootAttributeOperation from './operation/rootattributeoperation';
16
- import RootOperation from './operation/rootoperation';
17
- import SplitOperation from './operation/splitoperation';
18
- import DocumentFragment from './documentfragment';
19
- import DocumentSelection from './documentselection';
20
- import Element from './element';
21
- import Position from './position';
22
- import Range from './range';
23
- import RootElement from './rootelement';
24
- import Text from './text';
8
+ import AttributeOperation from './operation/attributeoperation.js';
9
+ import DetachOperation from './operation/detachoperation.js';
10
+ import InsertOperation from './operation/insertoperation.js';
11
+ import MarkerOperation from './operation/markeroperation.js';
12
+ import MergeOperation from './operation/mergeoperation.js';
13
+ import MoveOperation from './operation/moveoperation.js';
14
+ import RenameOperation from './operation/renameoperation.js';
15
+ import RootAttributeOperation from './operation/rootattributeoperation.js';
16
+ import RootOperation from './operation/rootoperation.js';
17
+ import SplitOperation from './operation/splitoperation.js';
18
+ import DocumentFragment from './documentfragment.js';
19
+ import DocumentSelection from './documentselection.js';
20
+ import Element from './element.js';
21
+ import Position from './position.js';
22
+ import Range from './range.js';
23
+ import RootElement from './rootelement.js';
24
+ import Text from './text.js';
25
25
  import { CKEditorError, logWarning, toMap } from '@ckeditor/ckeditor5-utils';
26
26
  /**
27
27
  * The model can only be modified by using the writer. It should be used whenever you want to create a node, modify
@@ -1,13 +1,13 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/attributeelement
7
7
  */
8
- import Element, { type ElementAttributes } from './element';
9
- import type Document from './document';
10
- import type Node from './node';
8
+ import Element, { type ElementAttributes } from './element.js';
9
+ import type Document from './document.js';
10
+ import type Node from './node.js';
11
11
  /**
12
12
  * Attribute elements are used to represent formatting elements in the view (think – `<b>`, `<span style="font-size: 2em">`, etc.).
13
13
  * Most often they are created when downcasting model text attributes.
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/attributeelement
7
7
  */
8
- import Element from './element';
8
+ import Element from './element.js';
9
9
  import { CKEditorError } from '@ckeditor/ckeditor5-utils';
10
10
  // Default attribute priority.
11
11
  const DEFAULT_PRIORITY = 10;
@@ -20,7 +20,7 @@ const DEFAULT_PRIORITY = 10;
20
20
  * To create a new attribute element instance use the
21
21
  * {@link module:engine/view/downcastwriter~DowncastWriter#createAttributeElement `DowncastWriter#createAttributeElement()`} method.
22
22
  */
23
- export default class AttributeElement extends Element {
23
+ class AttributeElement extends Element {
24
24
  /**
25
25
  * Creates an attribute element.
26
26
  *
@@ -137,6 +137,7 @@ export default class AttributeElement extends Element {
137
137
  }
138
138
  }
139
139
  AttributeElement.DEFAULT_PRIORITY = DEFAULT_PRIORITY;
140
+ export default AttributeElement;
140
141
  // The magic of type inference using `is` method is centralized in `TypeCheckable` class.
141
142
  // Proper overload would interfere with that.
142
143
  AttributeElement.prototype.is = function (type, name) {
@@ -1,13 +1,13 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/containerelement
7
7
  */
8
- import Element, { type ElementAttributes } from './element';
9
- import type Document from './document';
10
- import type Node from './node';
8
+ import Element, { type ElementAttributes } from './element.js';
9
+ import type Document from './document.js';
10
+ import type Node from './node.js';
11
11
  /**
12
12
  * Containers are elements which define document structure. They define boundaries for
13
13
  * {@link module:engine/view/attributeelement~AttributeElement attributes}. They are mostly used for block elements like `<p>` or `<div>`.
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/containerelement
7
7
  */
8
- import Element from './element';
8
+ import Element from './element.js';
9
9
  /**
10
10
  * Containers are elements which define document structure. They define boundaries for
11
11
  * {@link module:engine/view/attributeelement~AttributeElement attributes}. They are mostly used for block elements like `<p>` or `<div>`.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
@@ -1,15 +1,15 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/document
7
7
  */
8
- import DocumentSelection from './documentselection';
8
+ import DocumentSelection from './documentselection.js';
9
9
  import { Collection } from '@ckeditor/ckeditor5-utils';
10
- import type { StylesProcessor } from './stylesmap';
11
- import type RootEditableElement from './rooteditableelement';
12
- import type DowncastWriter from './downcastwriter';
10
+ import type { StylesProcessor } from './stylesmap.js';
11
+ import type RootEditableElement from './rooteditableelement.js';
12
+ import type DowncastWriter from './downcastwriter.js';
13
13
  declare const Document_base: import("@ckeditor/ckeditor5-utils").Mixed<{
14
14
  new (): import("@ckeditor/ckeditor5-utils").Observable;
15
15
  prototype: import("@ckeditor/ckeditor5-utils").Observable;
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/document
7
7
  */
8
- import DocumentSelection from './documentselection';
9
- import BubblingEmitterMixin from './observer/bubblingemittermixin';
8
+ import DocumentSelection from './documentselection.js';
9
+ import BubblingEmitterMixin from './observer/bubblingemittermixin.js';
10
10
  import { Collection, ObservableMixin } from '@ckeditor/ckeditor5-utils';
11
11
  // @if CK_DEBUG_ENGINE // const { logDocument } = require( '../dev-utils/utils' );
12
12
  /**
@@ -1,14 +1,14 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/documentfragment
7
7
  */
8
- import TypeCheckable from './typecheckable';
9
- import type { default as Document, ChangeType } from './document';
10
- import type Item from './item';
11
- import type Node from './node';
8
+ import TypeCheckable from './typecheckable.js';
9
+ import type { default as Document, ChangeType } from './document.js';
10
+ import type Item from './item.js';
11
+ import type Node from './node.js';
12
12
  declare const DocumentFragment_base: import("@ckeditor/ckeditor5-utils").Mixed<typeof TypeCheckable, import("@ckeditor/ckeditor5-utils").Emitter>;
13
13
  /**
14
14
  * Document fragment.
@@ -1,13 +1,13 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/documentfragment
7
7
  */
8
- import TypeCheckable from './typecheckable';
9
- import Text from './text';
10
- import TextProxy from './textproxy';
8
+ import TypeCheckable from './typecheckable.js';
9
+ import Text from './text.js';
10
+ import TextProxy from './textproxy.js';
11
11
  import { EmitterMixin, isIterable } from '@ckeditor/ckeditor5-utils';
12
12
  /**
13
13
  * Document fragment.
@@ -1,18 +1,18 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/documentselection
7
7
  */
8
- import TypeCheckable from './typecheckable';
9
- import Selection, { type PlaceOrOffset, type Selectable, type SelectionOptions, type ViewSelectionChangeEvent } from './selection';
10
- import type EditableElement from './editableelement';
11
- import type Element from './element';
12
- import type Node from './node';
13
- import type Item from './item';
14
- import type { default as Position, PositionOffset } from './position';
15
- import type Range from './range';
8
+ import TypeCheckable from './typecheckable.js';
9
+ import Selection, { type PlaceOrOffset, type Selectable, type SelectionOptions, type ViewSelectionChangeEvent } from './selection.js';
10
+ import type EditableElement from './editableelement.js';
11
+ import type Element from './element.js';
12
+ import type Node from './node.js';
13
+ import type Item from './item.js';
14
+ import type { default as Position, PositionOffset } from './position.js';
15
+ import type Range from './range.js';
16
16
  declare const DocumentSelection_base: import("@ckeditor/ckeditor5-utils").Mixed<typeof TypeCheckable, import("@ckeditor/ckeditor5-utils").Emitter>;
17
17
  /**
18
18
  * Class representing the document selection in the view.
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/documentselection
7
7
  */
8
- import TypeCheckable from './typecheckable';
9
- import Selection from './selection';
8
+ import TypeCheckable from './typecheckable.js';
9
+ import Selection from './selection.js';
10
10
  import { EmitterMixin } from '@ckeditor/ckeditor5-utils';
11
11
  /**
12
12
  * Class representing the document selection in the view.
@@ -1,23 +1,23 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/domconverter
7
7
  */
8
- import ViewText from './text';
9
- import ViewElement from './element';
10
- import ViewUIElement from './uielement';
11
- import ViewPosition from './position';
12
- import ViewRange from './range';
13
- import ViewSelection from './selection';
14
- import ViewDocumentFragment from './documentfragment';
15
- import { type MatcherPattern } from './matcher';
16
- import type ViewNode from './node';
17
- import type Document from './document';
18
- import type DocumentSelection from './documentselection';
19
- import type EditableElement from './editableelement';
20
- import type ViewRawElement from './rawelement';
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
+ 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';
21
21
  type DomNode = globalThis.Node;
22
22
  type DomElement = globalThis.HTMLElement;
23
23
  type DomDocumentFragment = globalThis.DocumentFragment;
@@ -1,21 +1,21 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/domconverter
7
7
  */
8
8
  /* globals Node, NodeFilter, DOMParser */
9
- import ViewText from './text';
10
- import ViewElement from './element';
11
- import ViewUIElement from './uielement';
12
- import ViewPosition from './position';
13
- import ViewRange from './range';
14
- import ViewSelection from './selection';
15
- import ViewDocumentFragment from './documentfragment';
16
- import ViewTreeWalker from './treewalker';
17
- import { default as Matcher } from './matcher';
18
- import { BR_FILLER, INLINE_FILLER_LENGTH, NBSP_FILLER, MARKED_NBSP_FILLER, getDataWithoutFiller, isInlineFiller, startsWithFiller } from './filler';
9
+ import ViewText from './text.js';
10
+ import ViewElement from './element.js';
11
+ import ViewUIElement from './uielement.js';
12
+ import ViewPosition from './position.js';
13
+ import ViewRange from './range.js';
14
+ import ViewSelection from './selection.js';
15
+ import ViewDocumentFragment from './documentfragment.js';
16
+ import ViewTreeWalker from './treewalker.js';
17
+ import { default as Matcher } from './matcher.js';
18
+ import { BR_FILLER, INLINE_FILLER_LENGTH, NBSP_FILLER, MARKED_NBSP_FILLER, getDataWithoutFiller, isInlineFiller, startsWithFiller } from './filler.js';
19
19
  import { global, logWarning, indexOf, getAncestors, isText, isComment, isValidAttributeName, first, env } from '@ckeditor/ckeditor5-utils';
20
20
  const BR_FILLER_REF = BR_FILLER(global.document); // eslint-disable-line new-cap
21
21
  const NBSP_FILLER_REF = NBSP_FILLER(global.document); // eslint-disable-line new-cap
@@ -1,27 +1,27 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/downcastwriter
7
7
  */
8
- import Position, { type PositionOffset } from './position';
9
- import Range from './range';
10
- import Selection, { type PlaceOrOffset, type Selectable, type SelectionOptions } from './selection';
11
- import ContainerElement from './containerelement';
12
- import AttributeElement from './attributeelement';
13
- import EmptyElement from './emptyelement';
14
- import UIElement from './uielement';
15
- import RawElement from './rawelement';
16
- import DocumentFragment from './documentfragment';
17
- import Text from './text';
18
- import EditableElement from './editableelement';
19
- import type Document from './document';
20
- import type Node from './node';
21
- import type { default as Element, ElementAttributes } from './element';
22
- import type DomConverter from './domconverter';
23
- import type Item from './item';
24
- import type { SlotFilter } from '../conversion/downcasthelpers';
8
+ import Position, { type PositionOffset } from './position.js';
9
+ import Range from './range.js';
10
+ import Selection, { type PlaceOrOffset, type Selectable, type SelectionOptions } from './selection.js';
11
+ import ContainerElement from './containerelement.js';
12
+ import AttributeElement from './attributeelement.js';
13
+ import EmptyElement from './emptyelement.js';
14
+ import UIElement from './uielement.js';
15
+ import RawElement from './rawelement.js';
16
+ import DocumentFragment from './documentfragment.js';
17
+ import Text from './text.js';
18
+ import EditableElement from './editableelement.js';
19
+ import type Document from './document.js';
20
+ import type Node from './node.js';
21
+ import type { default as Element, ElementAttributes } from './element.js';
22
+ import type DomConverter from './domconverter.js';
23
+ import type Item from './item.js';
24
+ import type { SlotFilter } from '../conversion/downcasthelpers.js';
25
25
  type DomDocument = globalThis.Document;
26
26
  type DomElement = globalThis.HTMLElement;
27
27
  /**
@@ -1,22 +1,22 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/downcastwriter
7
7
  */
8
- import Position from './position';
9
- import Range from './range';
10
- import Selection from './selection';
11
- import ContainerElement from './containerelement';
12
- import AttributeElement from './attributeelement';
13
- import EmptyElement from './emptyelement';
14
- import UIElement from './uielement';
15
- import RawElement from './rawelement';
8
+ import Position from './position.js';
9
+ import Range from './range.js';
10
+ import Selection from './selection.js';
11
+ import ContainerElement from './containerelement.js';
12
+ import AttributeElement from './attributeelement.js';
13
+ import EmptyElement from './emptyelement.js';
14
+ import UIElement from './uielement.js';
15
+ import RawElement from './rawelement.js';
16
16
  import { CKEditorError, isIterable } from '@ckeditor/ckeditor5-utils';
17
- import DocumentFragment from './documentfragment';
18
- import Text from './text';
19
- import EditableElement from './editableelement';
17
+ import DocumentFragment from './documentfragment.js';
18
+ import Text from './text.js';
19
+ import EditableElement from './editableelement.js';
20
20
  import { isPlainObject } from 'lodash-es';
21
21
  /**
22
22
  * View downcast writer.
@@ -1,14 +1,14 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/editableelement
7
7
  */
8
- import ContainerElement from './containerelement';
9
- import type { ElementAttributes } from './element';
10
- import type Document from './document';
11
- import type Node from './node';
8
+ import ContainerElement from './containerelement.js';
9
+ import type { ElementAttributes } from './element.js';
10
+ import type Document from './document.js';
11
+ import type Node from './node.js';
12
12
  declare const EditableElement_base: import("@ckeditor/ckeditor5-utils").Mixed<typeof ContainerElement, import("@ckeditor/ckeditor5-utils").Observable>;
13
13
  /**
14
14
  * Editable element which can be a {@link module:engine/view/rooteditableelement~RootEditableElement root}
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module engine/view/editableelement
7
7
  */
8
- import ContainerElement from './containerelement';
8
+ import ContainerElement from './containerelement.js';
9
9
  import { ObservableMixin } from '@ckeditor/ckeditor5-utils';
10
10
  /**
11
11
  * Editable element which can be a {@link module:engine/view/rooteditableelement~RootEditableElement root}