@ckeditor/ckeditor5-engine 44.3.0-alpha.7 → 45.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 (93) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/index.js +304 -128
  3. package/dist/index.js.map +1 -1
  4. package/package.json +3 -3
  5. package/src/controller/datacontroller.js +40 -0
  6. package/src/controller/editingcontroller.js +16 -0
  7. package/src/conversion/conversion.js +6 -4
  8. package/src/conversion/conversionhelpers.js +1 -0
  9. package/src/conversion/downcastdispatcher.js +10 -0
  10. package/src/conversion/downcasthelpers.js +1 -1
  11. package/src/conversion/mapper.js +92 -95
  12. package/src/conversion/modelconsumable.js +13 -15
  13. package/src/conversion/upcastdispatcher.js +28 -24
  14. package/src/conversion/upcasthelpers.js +1 -1
  15. package/src/conversion/viewconsumable.js +19 -20
  16. package/src/dataprocessor/htmldataprocessor.js +13 -1
  17. package/src/dataprocessor/xmldataprocessor.js +21 -1
  18. package/src/dev-utils/model.js +1 -1
  19. package/src/dev-utils/operationreplayer.js +3 -0
  20. package/src/dev-utils/utils.js +35 -1
  21. package/src/dev-utils/view.js +13 -0
  22. package/src/model/batch.js +20 -0
  23. package/src/model/differ.js +92 -88
  24. package/src/model/document.d.ts +1 -3
  25. package/src/model/document.js +38 -1
  26. package/src/model/documentfragment.js +10 -10
  27. package/src/model/documentselection.js +44 -32
  28. package/src/model/element.js +8 -4
  29. package/src/model/history.js +31 -33
  30. package/src/model/markercollection.js +25 -7
  31. package/src/model/model.js +21 -0
  32. package/src/model/node.js +22 -18
  33. package/src/model/nodelist.js +12 -12
  34. package/src/model/operation/attributeoperation.js +25 -1
  35. package/src/model/operation/detachoperation.js +8 -0
  36. package/src/model/operation/insertoperation.js +18 -0
  37. package/src/model/operation/markeroperation.js +29 -0
  38. package/src/model/operation/mergeoperation.js +16 -0
  39. package/src/model/operation/moveoperation.js +12 -0
  40. package/src/model/operation/operation.js +19 -0
  41. package/src/model/operation/renameoperation.js +12 -0
  42. package/src/model/operation/rootattributeoperation.js +20 -0
  43. package/src/model/operation/rootoperation.js +16 -0
  44. package/src/model/operation/splitoperation.js +19 -0
  45. package/src/model/operation/transform.js +5 -0
  46. package/src/model/position.js +40 -0
  47. package/src/model/range.js +8 -0
  48. package/src/model/rootelement.js +18 -10
  49. package/src/model/schema.js +25 -23
  50. package/src/model/selection.js +10 -10
  51. package/src/model/text.js +6 -0
  52. package/src/model/textproxy.js +12 -0
  53. package/src/model/treewalker.js +49 -0
  54. package/src/model/utils/insertcontent.js +60 -25
  55. package/src/model/writer.js +8 -0
  56. package/src/view/attributeelement.js +23 -23
  57. package/src/view/datatransfer.js +8 -0
  58. package/src/view/document.js +21 -4
  59. package/src/view/documentfragment.js +13 -9
  60. package/src/view/documentselection.js +4 -0
  61. package/src/view/domconverter.d.ts +6 -1
  62. package/src/view/domconverter.js +109 -48
  63. package/src/view/downcastwriter.js +14 -10
  64. package/src/view/element.js +29 -17
  65. package/src/view/matcher.js +1 -1
  66. package/src/view/node.js +9 -1
  67. package/src/view/observer/bubblingeventinfo.js +12 -0
  68. package/src/view/observer/clickobserver.js +4 -7
  69. package/src/view/observer/compositionobserver.js +14 -12
  70. package/src/view/observer/domeventdata.js +17 -1
  71. package/src/view/observer/domeventobserver.js +10 -13
  72. package/src/view/observer/fakeselectionobserver.d.ts +1 -1
  73. package/src/view/observer/fakeselectionobserver.js +5 -1
  74. package/src/view/observer/focusobserver.js +65 -14
  75. package/src/view/observer/inputobserver.js +33 -26
  76. package/src/view/observer/keyobserver.js +4 -7
  77. package/src/view/observer/mouseobserver.js +4 -7
  78. package/src/view/observer/mutationobserver.js +23 -6
  79. package/src/view/observer/observer.js +12 -4
  80. package/src/view/observer/selectionobserver.d.ts +6 -1
  81. package/src/view/observer/selectionobserver.js +94 -17
  82. package/src/view/observer/touchobserver.js +4 -7
  83. package/src/view/position.js +8 -0
  84. package/src/view/range.js +8 -0
  85. package/src/view/renderer.js +142 -70
  86. package/src/view/selection.js +16 -0
  87. package/src/view/stylesmap.js +26 -11
  88. package/src/view/text.js +6 -0
  89. package/src/view/textproxy.js +12 -0
  90. package/src/view/tokenlist.js +4 -6
  91. package/src/view/treewalker.js +42 -0
  92. package/src/view/upcastwriter.js +5 -1
  93. package/src/view/view.js +51 -33
package/src/model/node.js CHANGED
@@ -37,6 +37,28 @@ import { compareArrays, toMap } from '@ckeditor/ckeditor5-utils';
37
37
  * follows same rules.
38
38
  */
39
39
  export default class Node extends TypeCheckable {
40
+ /**
41
+ * Parent of this node. It could be {@link module:engine/model/element~Element}
42
+ * or {@link module:engine/model/documentfragment~DocumentFragment}.
43
+ * Equals to `null` if the node has no parent.
44
+ */
45
+ parent = null;
46
+ /**
47
+ * Attributes set on this node.
48
+ */
49
+ _attrs;
50
+ /**
51
+ * Index of this node in its parent or `null` if the node has no parent.
52
+ *
53
+ * @internal
54
+ */
55
+ _index = null;
56
+ /**
57
+ * Offset at which this node starts in its parent or `null` if the node has no parent.
58
+ *
59
+ * @internal
60
+ */
61
+ _startOffset = null;
40
62
  /**
41
63
  * Creates a model node.
42
64
  *
@@ -46,24 +68,6 @@ export default class Node extends TypeCheckable {
46
68
  */
47
69
  constructor(attrs) {
48
70
  super();
49
- /**
50
- * Parent of this node. It could be {@link module:engine/model/element~Element}
51
- * or {@link module:engine/model/documentfragment~DocumentFragment}.
52
- * Equals to `null` if the node has no parent.
53
- */
54
- this.parent = null;
55
- /**
56
- * Index of this node in its parent or `null` if the node has no parent.
57
- *
58
- * @internal
59
- */
60
- this._index = null;
61
- /**
62
- * Offset at which this node starts in its parent or `null` if the node has no parent.
63
- *
64
- * @internal
65
- */
66
- this._startOffset = null;
67
71
  this._attrs = toMap(attrs);
68
72
  }
69
73
  /**
@@ -13,6 +13,18 @@ import { CKEditorError, spliceArray } from '@ckeditor/ckeditor5-utils';
13
13
  * or {@link module:engine/model/documentfragment~DocumentFragment DocumentFragment}.
14
14
  */
15
15
  export default class NodeList {
16
+ /**
17
+ * Nodes contained in this node list.
18
+ */
19
+ _nodes = [];
20
+ /**
21
+ * This array maps numbers (offsets) to node that is placed at that offset.
22
+ *
23
+ * This array is similar to `_nodes` with the difference that one node may occupy multiple consecutive items in the array.
24
+ *
25
+ * This array is needed to quickly retrieve a node that is placed at given offset.
26
+ */
27
+ _offsetToNode = [];
16
28
  /**
17
29
  * Creates a node list.
18
30
  *
@@ -20,18 +32,6 @@ export default class NodeList {
20
32
  * @param nodes Nodes contained in this node list.
21
33
  */
22
34
  constructor(nodes) {
23
- /**
24
- * Nodes contained in this node list.
25
- */
26
- this._nodes = [];
27
- /**
28
- * This array maps numbers (offsets) to node that is placed at that offset.
29
- *
30
- * This array is similar to `_nodes` with the difference that one node may occupy multiple consecutive items in the array.
31
- *
32
- * This array is needed to quickly retrieve a node that is placed at given offset.
33
- */
34
- this._offsetToNode = [];
35
35
  if (nodes) {
36
36
  this._insertNodes(0, nodes);
37
37
  }
@@ -9,13 +9,37 @@ import Operation from './operation.js';
9
9
  import { _setAttribute } from './utils.js';
10
10
  import Range from '../range.js';
11
11
  import { CKEditorError } from '@ckeditor/ckeditor5-utils';
12
- import { isEqual } from 'lodash-es';
12
+ import { isEqual } from 'es-toolkit/compat';
13
13
  /**
14
14
  * Operation to change nodes' attribute.
15
15
  *
16
16
  * Using this class you can add, remove or change value of the attribute.
17
17
  */
18
18
  export default class AttributeOperation extends Operation {
19
+ /**
20
+ * Range on which operation should be applied.
21
+ *
22
+ * @readonly
23
+ */
24
+ range;
25
+ /**
26
+ * Key of an attribute to change or remove.
27
+ *
28
+ * @readonly
29
+ */
30
+ key;
31
+ /**
32
+ * Old value of the attribute with given key or `null`, if attribute was not set before.
33
+ *
34
+ * @readonly
35
+ */
36
+ oldValue;
37
+ /**
38
+ * New value of the attribute with given key or `null`, if operation should remove attribute.
39
+ *
40
+ * @readonly
41
+ */
42
+ newValue;
19
43
  /**
20
44
  * Creates an operation that changes, removes or adds attributes.
21
45
  *
@@ -15,6 +15,14 @@ import { CKEditorError } from '@ckeditor/ckeditor5-utils';
15
15
  * Note this operation is only a local operation and won't be send to the other clients.
16
16
  */
17
17
  export default class DetachOperation extends Operation {
18
+ /**
19
+ * Position before the first {@link module:engine/model/item~Item model item} to detach.
20
+ */
21
+ sourcePosition;
22
+ /**
23
+ * Offset size of moved range.
24
+ */
25
+ howMany;
18
26
  /**
19
27
  * Creates an insert operation.
20
28
  *
@@ -17,6 +17,24 @@ import { CKEditorError } from '@ckeditor/ckeditor5-utils';
17
17
  * Operation to insert one or more nodes at given position in the model.
18
18
  */
19
19
  export default class InsertOperation extends Operation {
20
+ /**
21
+ * Position of insertion.
22
+ *
23
+ * @readonly
24
+ */
25
+ position;
26
+ /**
27
+ * List of nodes to insert.
28
+ *
29
+ * @readonly
30
+ */
31
+ nodes;
32
+ /**
33
+ * Flag deciding how the operation should be transformed. If set to `true`, nodes might get additional attributes
34
+ * during operational transformation. This happens when the operation insertion position is inside of a range
35
+ * where attributes have changed.
36
+ */
37
+ shouldReceiveAttributes;
20
38
  /**
21
39
  * Creates an insert operation.
22
40
  *
@@ -8,6 +8,35 @@
8
8
  import Operation from './operation.js';
9
9
  import Range from '../range.js';
10
10
  export default class MarkerOperation extends Operation {
11
+ /**
12
+ * Marker name.
13
+ *
14
+ * @readonly
15
+ */
16
+ name;
17
+ /**
18
+ * Marker range before the change.
19
+ *
20
+ * @readonly
21
+ */
22
+ oldRange;
23
+ /**
24
+ * Marker range after the change.
25
+ *
26
+ * @readonly
27
+ */
28
+ newRange;
29
+ /**
30
+ * Specifies whether the marker operation affects the data produced by the data pipeline
31
+ * (is persisted in the editor's data).
32
+ *
33
+ * @readonly
34
+ */
35
+ affectsData;
36
+ /**
37
+ * Marker collection on which change should be executed.
38
+ */
39
+ _markers;
11
40
  /**
12
41
  * @param name Marker name.
13
42
  * @param oldRange Marker range before the change.
@@ -20,6 +20,22 @@ import { CKEditorError } from '@ckeditor/ckeditor5-utils';
20
20
  * The merged element is moved to the graveyard at {@link ~MergeOperation#graveyardPosition}.
21
21
  */
22
22
  export default class MergeOperation extends Operation {
23
+ /**
24
+ * Position inside the merged element. All nodes from that element after that position will be moved to {@link #targetPosition}.
25
+ */
26
+ sourcePosition;
27
+ /**
28
+ * Summary offset size of nodes which will be moved from the merged element to the new parent.
29
+ */
30
+ howMany;
31
+ /**
32
+ * Position which the nodes from the merged elements will be moved to.
33
+ */
34
+ targetPosition;
35
+ /**
36
+ * Position in graveyard to which the merged element will be moved.
37
+ */
38
+ graveyardPosition;
23
39
  /**
24
40
  * Creates a merge operation.
25
41
  *
@@ -16,6 +16,18 @@ import { CKEditorError, compareArrays } from '@ckeditor/ckeditor5-utils';
16
16
  * to given {@link module:engine/model/position~Position target position}.
17
17
  */
18
18
  export default class MoveOperation extends Operation {
19
+ /**
20
+ * Position before the first {@link module:engine/model/item~Item model item} to move.
21
+ */
22
+ sourcePosition;
23
+ /**
24
+ * Offset size of moved range.
25
+ */
26
+ howMany;
27
+ /**
28
+ * Position at which moved nodes will be inserted.
29
+ */
30
+ targetPosition;
19
31
  /**
20
32
  * Creates a move operation.
21
33
  *
@@ -6,6 +6,25 @@
6
6
  * Abstract base operation class.
7
7
  */
8
8
  export default class Operation {
9
+ /**
10
+ * {@link module:engine/model/document~Document#version} on which operation can be applied. If you try to
11
+ * {@link module:engine/model/model~Model#applyOperation apply} operation with different base version than the
12
+ * {@link module:engine/model/document~Document#version document version} the
13
+ * {@link module:utils/ckeditorerror~CKEditorError model-document-applyOperation-wrong-version} error is thrown.
14
+ */
15
+ baseVersion;
16
+ /**
17
+ * Defines whether operation is executed on attached or detached {@link module:engine/model/item~Item items}.
18
+ */
19
+ isDocumentOperation;
20
+ /**
21
+ * {@link module:engine/model/batch~Batch Batch} to which the operation is added or `null` if the operation is not
22
+ * added to any batch yet.
23
+ *
24
+ * Note, that a {@link #isDocumentOperation non-document operation} has this property always set to `null`, and is never added
25
+ * to any batch.
26
+ */
27
+ batch;
9
28
  /**
10
29
  * Base operation constructor.
11
30
  *
@@ -15,6 +15,18 @@ import { CKEditorError } from '@ckeditor/ckeditor5-utils';
15
15
  * Using this class you can change element's name.
16
16
  */
17
17
  export default class RenameOperation extends Operation {
18
+ /**
19
+ * Position before an element to change.
20
+ */
21
+ position;
22
+ /**
23
+ * Current name of the element.
24
+ */
25
+ oldName;
26
+ /**
27
+ * New name for the element.
28
+ */
29
+ newName;
18
30
  /**
19
31
  * Creates an operation that changes element's name.
20
32
  *
@@ -18,6 +18,26 @@ import { CKEditorError } from '@ckeditor/ckeditor5-utils';
18
18
  * {@link module:engine/model/position~Position} can't be created before a root element.
19
19
  */
20
20
  export default class RootAttributeOperation extends Operation {
21
+ /**
22
+ * Root element to change.
23
+ */
24
+ root;
25
+ /**
26
+ * Key of an attribute to change or remove.
27
+ */
28
+ key;
29
+ /**
30
+ * Old value of the attribute with given key or `null`, if attribute was not set before.
31
+ *
32
+ * @readonly
33
+ */
34
+ oldValue;
35
+ /**
36
+ * New value of the attribute with given key or `null`, if operation should remove attribute.
37
+ *
38
+ * @readonly
39
+ */
40
+ newValue;
21
41
  /**
22
42
  * Creates an operation that changes, removes or adds attributes on root element.
23
43
  *
@@ -10,6 +10,22 @@ import Operation from './operation.js';
10
10
  * Operation that creates (or attaches) or detaches a root element.
11
11
  */
12
12
  export default class RootOperation extends Operation {
13
+ /**
14
+ * Root name to create or detach.
15
+ */
16
+ rootName;
17
+ /**
18
+ * Root element name.
19
+ */
20
+ elementName;
21
+ /**
22
+ * Specifies whether the operation adds (`true`) or detaches the root (`false`).
23
+ */
24
+ isAdd;
25
+ /**
26
+ * Document which owns the root.
27
+ */
28
+ _document;
13
29
  /**
14
30
  * Creates an operation that creates or removes a root element.
15
31
  *
@@ -17,6 +17,25 @@ import { CKEditorError } from '@ckeditor/ckeditor5-utils';
17
17
  * both containing a part of the element's original content.
18
18
  */
19
19
  export default class SplitOperation extends Operation {
20
+ /**
21
+ * Position at which an element should be split.
22
+ */
23
+ splitPosition;
24
+ /**
25
+ * Total offset size of elements that are in the split element after `position`.
26
+ */
27
+ howMany;
28
+ /**
29
+ * Position at which the clone of split element (or element from graveyard) will be inserted.
30
+ */
31
+ insertionPosition;
32
+ /**
33
+ * Position in the graveyard root before the element which should be used as a parent of the nodes after `position`.
34
+ * If it is not set, a copy of the the `position` parent will be used.
35
+ *
36
+ * The default behavior is to clone the split element. Element from graveyard is used during undo.
37
+ */
38
+ graveyardPosition;
20
39
  /**
21
40
  * Creates a split operation.
22
41
  *
@@ -342,6 +342,11 @@ export function transformSets(operationsA, operationsB, options) {
342
342
  * about two operations that are about to be transformed. This contextual information can be used for better conflict resolution.
343
343
  */
344
344
  class ContextFactory {
345
+ originalOperations;
346
+ _history;
347
+ _useRelations;
348
+ _forceWeakRemove;
349
+ _relations;
345
350
  /**
346
351
  * Creates `ContextFactory` instance.
347
352
  *
@@ -36,6 +36,46 @@ import { CKEditorError, compareArrays } from '@ckeditor/ckeditor5-utils';
36
36
  * In most cases, position with wrong path is caused by an error in code, but it is sometimes needed, as described above.
37
37
  */
38
38
  export default class Position extends TypeCheckable {
39
+ /**
40
+ * Root of the position path.
41
+ */
42
+ root;
43
+ /**
44
+ * Position of the node in the tree. **Path contains offsets, not indexes.**
45
+ *
46
+ * Position can be placed before, after or in a {@link module:engine/model/node~Node node} if that node has
47
+ * {@link module:engine/model/node~Node#offsetSize} greater than `1`. Items in position path are
48
+ * {@link module:engine/model/node~Node#startOffset starting offsets} of position ancestors, starting from direct root children,
49
+ * down to the position offset in it's parent.
50
+ *
51
+ * ```
52
+ * ROOT
53
+ * |- P before: [ 0 ] after: [ 1 ]
54
+ * |- UL before: [ 1 ] after: [ 2 ]
55
+ * |- LI before: [ 1, 0 ] after: [ 1, 1 ]
56
+ * | |- foo before: [ 1, 0, 0 ] after: [ 1, 0, 3 ]
57
+ * |- LI before: [ 1, 1 ] after: [ 1, 2 ]
58
+ * |- bar before: [ 1, 1, 0 ] after: [ 1, 1, 3 ]
59
+ * ```
60
+ *
61
+ * `foo` and `bar` are representing {@link module:engine/model/text~Text text nodes}. Since text nodes has offset size
62
+ * greater than `1` you can place position offset between their start and end:
63
+ *
64
+ * ```
65
+ * ROOT
66
+ * |- P
67
+ * |- UL
68
+ * |- LI
69
+ * | |- f^o|o ^ has path: [ 1, 0, 1 ] | has path: [ 1, 0, 2 ]
70
+ * |- LI
71
+ * |- b^a|r ^ has path: [ 1, 1, 1 ] | has path: [ 1, 1, 2 ]
72
+ * ```
73
+ */
74
+ path;
75
+ /**
76
+ * Position stickiness. See {@link module:engine/model/position~PositionStickiness}.
77
+ */
78
+ stickiness;
39
79
  /**
40
80
  * Creates a position.
41
81
  *
@@ -19,6 +19,14 @@ import { CKEditorError, compareArrays } from '@ckeditor/ckeditor5-utils';
19
19
  * {@link module:engine/model/model~Model} and {@link module:engine/model/writer~Writer}.
20
20
  */
21
21
  export default class Range extends TypeCheckable {
22
+ /**
23
+ * Start position.
24
+ */
25
+ start;
26
+ /**
27
+ * End position.
28
+ */
29
+ end;
22
30
  /**
23
31
  * Creates a range spanning from `start` position to `end` position.
24
32
  *
@@ -10,6 +10,24 @@ import Element from './element.js';
10
10
  * Type of {@link module:engine/model/element~Element} that is a root of a model tree.
11
11
  */
12
12
  export default class RootElement extends Element {
13
+ /**
14
+ * Unique root name used to identify this root element by {@link module:engine/model/document~Document}.
15
+ */
16
+ rootName;
17
+ /**
18
+ * Document that is an owner of this root.
19
+ */
20
+ _document;
21
+ /**
22
+ * @internal
23
+ */
24
+ _isAttached = true;
25
+ /**
26
+ * Informs if the root element is loaded (default).
27
+ *
28
+ * @internal
29
+ */
30
+ _isLoaded = true;
13
31
  /**
14
32
  * Creates root element.
15
33
  *
@@ -19,16 +37,6 @@ export default class RootElement extends Element {
19
37
  */
20
38
  constructor(document, name, rootName = 'main') {
21
39
  super(name);
22
- /**
23
- * @internal
24
- */
25
- this._isAttached = true;
26
- /**
27
- * Informs if the root element is loaded (default).
28
- *
29
- * @internal
30
- */
31
- this._isLoaded = true;
32
40
  this._document = document;
33
41
  this.rootName = rootName;
34
42
  }
@@ -25,34 +25,35 @@ import { CKEditorError, first, ObservableMixin } from '@ckeditor/ckeditor5-utils
25
25
  * * The {@glink framework/deep-dive/schema Schema deep-dive} guide.
26
26
  */
27
27
  export default class Schema extends /* #__PURE__ */ ObservableMixin() {
28
+ _sourceDefinitions = {};
29
+ /**
30
+ * A dictionary containing attribute properties.
31
+ */
32
+ _attributeProperties = Object.create(null);
33
+ /**
34
+ * Stores additional callbacks registered for schema items, which are evaluated when {@link ~Schema#checkChild} is called.
35
+ *
36
+ * Keys are schema item names for which the callbacks are registered. Values are arrays with the callbacks.
37
+ *
38
+ * Some checks are added under {@link ~Schema#_genericCheckSymbol} key, these are evaluated for every {@link ~Schema#checkChild} call.
39
+ */
40
+ _customChildChecks = new Map();
41
+ /**
42
+ * Stores additional callbacks registered for attribute names, which are evaluated when {@link ~Schema#checkAttribute} is called.
43
+ *
44
+ * Keys are schema attribute names for which the callbacks are registered. Values are arrays with the callbacks.
45
+ *
46
+ * Some checks are added under {@link ~Schema#_genericCheckSymbol} key, these are evaluated for every
47
+ * {@link ~Schema#checkAttribute} call.
48
+ */
49
+ _customAttributeChecks = new Map();
50
+ _genericCheckSymbol = Symbol('$generic');
51
+ _compiledDefinitions;
28
52
  /**
29
53
  * Creates a schema instance.
30
54
  */
31
55
  constructor() {
32
56
  super();
33
- this._sourceDefinitions = {};
34
- /**
35
- * A dictionary containing attribute properties.
36
- */
37
- this._attributeProperties = Object.create(null);
38
- /**
39
- * Stores additional callbacks registered for schema items, which are evaluated when {@link ~Schema#checkChild} is called.
40
- *
41
- * Keys are schema item names for which the callbacks are registered. Values are arrays with the callbacks.
42
- *
43
- * Some checks are added under {@link ~Schema#_genericCheckSymbol} key, these are evaluated for every {@link ~Schema#checkChild} call.
44
- */
45
- this._customChildChecks = new Map();
46
- /**
47
- * Stores additional callbacks registered for attribute names, which are evaluated when {@link ~Schema#checkAttribute} is called.
48
- *
49
- * Keys are schema attribute names for which the callbacks are registered. Values are arrays with the callbacks.
50
- *
51
- * Some checks are added under {@link ~Schema#_genericCheckSymbol} key, these are evaluated for every
52
- * {@link ~Schema#checkAttribute} call.
53
- */
54
- this._customAttributeChecks = new Map();
55
- this._genericCheckSymbol = Symbol('$generic');
56
57
  this.decorate('checkChild');
57
58
  this.decorate('checkAttribute');
58
59
  this.on('checkAttribute', (evt, args) => {
@@ -1092,6 +1093,7 @@ export default class Schema extends /* #__PURE__ */ ObservableMixin() {
1092
1093
  * using these methods you need to use {@link module:engine/model/schema~SchemaContextDefinition}s.
1093
1094
  */
1094
1095
  export class SchemaContext {
1096
+ _items;
1095
1097
  /**
1096
1098
  * Creates an instance of the context.
1097
1099
  */
@@ -18,6 +18,16 @@ import { CKEditorError, EmitterMixin, isIterable } from '@ckeditor/ckeditor5-uti
18
18
  * should have those attributes – e.g. whether you type a bolded text).
19
19
  */
20
20
  export default class Selection extends /* #__PURE__ */ EmitterMixin(TypeCheckable) {
21
+ /**
22
+ * Specifies whether the last added range was added as a backward or forward range.
23
+ */
24
+ _lastRangeBackward = false;
25
+ /**
26
+ * List of attributes set on current selection.
27
+ */
28
+ _attrs = new Map();
29
+ /** @internal */
30
+ _ranges = [];
21
31
  /**
22
32
  * Creates a new selection instance based on the given {@link module:engine/model/selection~Selectable selectable}
23
33
  * or creates an empty selection if no arguments were passed.
@@ -72,16 +82,6 @@ export default class Selection extends /* #__PURE__ */ EmitterMixin(TypeCheckabl
72
82
  */
73
83
  constructor(...args) {
74
84
  super();
75
- /**
76
- * Specifies whether the last added range was added as a backward or forward range.
77
- */
78
- this._lastRangeBackward = false;
79
- /**
80
- * List of attributes set on current selection.
81
- */
82
- this._attrs = new Map();
83
- /** @internal */
84
- this._ranges = [];
85
85
  if (args.length) {
86
86
  this.setTo(...args);
87
87
  }
package/src/model/text.js CHANGED
@@ -19,6 +19,12 @@ import Node from './node.js';
19
19
  * {@link module:engine/model/liveposition~LivePosition live position} placed before the text node.
20
20
  */
21
21
  export default class Text extends Node {
22
+ /**
23
+ * Text data contained in this text node.
24
+ *
25
+ * @internal
26
+ */
27
+ _data;
22
28
  /**
23
29
  * Creates a text node.
24
30
  *
@@ -38,6 +38,18 @@ import { CKEditorError } from '@ckeditor/ckeditor5-utils';
38
38
  * an instance of this class by your own.
39
39
  */
40
40
  export default class TextProxy extends TypeCheckable {
41
+ /**
42
+ * Text node which part is represented by this text proxy.
43
+ */
44
+ textNode;
45
+ /**
46
+ * Text data represented by this text proxy.
47
+ */
48
+ data;
49
+ /**
50
+ * Offset in {@link module:engine/model/textproxy~TextProxy#textNode text node} from which the text proxy starts.
51
+ */
52
+ offsetInText;
41
53
  /**
42
54
  * Creates a text proxy.
43
55
  *