@ckeditor/ckeditor5-engine 45.2.1-alpha.9 → 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.
- package/dist/index.js +2563 -2257
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/controller/datacontroller.d.ts +33 -32
- package/src/controller/datacontroller.js +29 -28
- package/src/controller/editingcontroller.d.ts +8 -8
- package/src/controller/editingcontroller.js +10 -10
- package/src/conversion/conversion.d.ts +18 -19
- package/src/conversion/conversion.js +4 -4
- package/src/conversion/conversionhelpers.d.ts +1 -1
- package/src/conversion/conversionhelpers.js +1 -1
- package/src/conversion/downcastdispatcher.d.ts +63 -69
- package/src/conversion/downcastdispatcher.js +16 -16
- package/src/conversion/downcasthelpers.d.ts +94 -83
- package/src/conversion/downcasthelpers.js +63 -53
- package/src/conversion/mapper.d.ts +27 -27
- package/src/conversion/mapper.js +15 -15
- package/src/conversion/modelconsumable.d.ts +26 -26
- package/src/conversion/modelconsumable.js +23 -23
- package/src/conversion/upcastdispatcher.d.ts +33 -32
- package/src/conversion/upcastdispatcher.js +19 -19
- package/src/conversion/upcasthelpers.d.ts +46 -38
- package/src/conversion/upcasthelpers.js +33 -24
- package/src/conversion/viewconsumable.d.ts +50 -45
- package/src/conversion/viewconsumable.js +32 -27
- package/src/dataprocessor/basichtmlwriter.d.ts +4 -2
- package/src/dataprocessor/basichtmlwriter.js +3 -1
- package/src/dataprocessor/dataprocessor.d.ts +7 -6
- package/src/dataprocessor/htmldataprocessor.d.ts +10 -10
- package/src/dataprocessor/htmldataprocessor.js +6 -6
- package/src/dataprocessor/htmlwriter.d.ts +1 -1
- package/src/dataprocessor/xmldataprocessor.d.ts +10 -10
- package/src/dataprocessor/xmldataprocessor.js +6 -6
- package/src/dev-utils/model.d.ts +25 -26
- package/src/dev-utils/model.js +35 -36
- package/src/dev-utils/operationreplayer.d.ts +5 -3
- package/src/dev-utils/operationreplayer.js +4 -2
- package/src/dev-utils/utils.d.ts +8 -0
- package/src/dev-utils/utils.js +8 -0
- package/src/dev-utils/view.d.ts +66 -63
- package/src/dev-utils/view.js +144 -134
- package/src/index.d.ts +135 -106
- package/src/index.js +120 -71
- package/src/legacyerrors.d.ts +5 -0
- package/src/legacyerrors.js +17 -0
- package/src/model/batch.d.ts +2 -15
- package/src/model/batch.js +1 -23
- package/src/model/differ.d.ts +54 -31
- package/src/model/differ.js +15 -15
- package/src/model/document.d.ts +31 -31
- package/src/model/document.js +13 -13
- package/src/model/documentfragment.d.ts +45 -45
- package/src/model/documentfragment.js +40 -40
- package/src/model/documentselection.d.ts +92 -92
- package/src/model/documentselection.js +71 -70
- package/src/model/element.d.ts +31 -31
- package/src/model/element.js +29 -29
- package/src/model/history.d.ts +3 -3
- package/src/model/history.js +2 -2
- package/src/model/item.d.ts +4 -5
- package/src/model/liveposition.d.ts +31 -31
- package/src/model/liveposition.js +18 -18
- package/src/model/liverange.d.ts +42 -38
- package/src/model/liverange.js +17 -16
- package/src/model/markercollection.d.ts +41 -40
- package/src/model/markercollection.js +22 -20
- package/src/model/model.d.ts +82 -81
- package/src/model/model.js +54 -54
- package/src/model/node.d.ts +48 -48
- package/src/model/node.js +31 -31
- package/src/model/nodelist.d.ts +17 -17
- package/src/model/nodelist.js +11 -11
- package/src/model/operation/attributeoperation.d.ts +10 -10
- package/src/model/operation/attributeoperation.js +7 -7
- package/src/model/operation/detachoperation.d.ts +11 -9
- package/src/model/operation/detachoperation.js +8 -6
- package/src/model/operation/insertoperation.d.ts +13 -13
- package/src/model/operation/insertoperation.js +15 -15
- package/src/model/operation/markeroperation.d.ts +12 -12
- package/src/model/operation/markeroperation.js +5 -5
- package/src/model/operation/mergeoperation.d.ts +16 -16
- package/src/model/operation/mergeoperation.js +18 -18
- package/src/model/operation/moveoperation.d.ts +16 -16
- package/src/model/operation/moveoperation.js +18 -15
- package/src/model/operation/nooperation.d.ts +4 -4
- package/src/model/operation/nooperation.js +2 -2
- package/src/model/operation/operation.d.ts +10 -10
- package/src/model/operation/operation.js +5 -5
- package/src/model/operation/operationfactory.d.ts +4 -4
- package/src/model/operation/operationfactory.js +12 -12
- package/src/model/operation/renameoperation.d.ts +10 -10
- package/src/model/operation/renameoperation.js +7 -7
- package/src/model/operation/rootattributeoperation.d.ts +12 -12
- package/src/model/operation/rootattributeoperation.js +8 -8
- package/src/model/operation/rootoperation.d.ts +8 -8
- package/src/model/operation/rootoperation.js +3 -3
- package/src/model/operation/splitoperation.d.ts +17 -17
- package/src/model/operation/splitoperation.js +19 -19
- package/src/model/operation/transform.d.ts +11 -8
- package/src/model/operation/transform.js +66 -49
- package/src/model/operation/utils.d.ts +24 -23
- package/src/model/operation/utils.js +20 -20
- package/src/model/position.d.ts +101 -97
- package/src/model/position.js +69 -64
- package/src/model/range.d.ts +90 -90
- package/src/model/range.js +87 -87
- package/src/model/rootelement.d.ts +11 -11
- package/src/model/rootelement.js +9 -9
- package/src/model/schema.d.ts +158 -154
- package/src/model/schema.js +93 -90
- package/src/model/selection.d.ts +73 -73
- package/src/model/selection.js +62 -62
- package/src/model/text.d.ts +11 -10
- package/src/model/text.js +11 -10
- package/src/model/textproxy.d.ts +39 -38
- package/src/model/textproxy.js +31 -30
- package/src/model/treewalker.d.ts +37 -37
- package/src/model/treewalker.js +14 -14
- package/src/model/typecheckable.d.ts +45 -45
- package/src/model/typecheckable.js +1 -1
- package/src/model/utils/autoparagraphing.d.ts +7 -7
- package/src/model/utils/deletecontent.d.ts +7 -5
- package/src/model/utils/deletecontent.js +13 -11
- package/src/model/utils/getselectedcontent.d.ts +6 -5
- package/src/model/utils/getselectedcontent.js +2 -1
- package/src/model/utils/insertcontent.d.ts +9 -8
- package/src/model/utils/insertcontent.js +41 -40
- package/src/model/utils/insertobject.d.ts +9 -9
- package/src/model/utils/insertobject.js +4 -4
- package/src/model/utils/modifyselection.d.ts +5 -4
- package/src/model/utils/modifyselection.js +12 -11
- package/src/model/utils/selection-post-fixer.d.ts +12 -8
- package/src/model/utils/selection-post-fixer.js +15 -11
- package/src/model/writer.d.ts +102 -101
- package/src/model/writer.js +99 -98
- package/src/view/attributeelement.d.ts +29 -29
- package/src/view/attributeelement.js +25 -25
- package/src/view/containerelement.d.ts +16 -15
- package/src/view/containerelement.js +15 -14
- package/src/view/datatransfer.d.ts +7 -7
- package/src/view/datatransfer.js +1 -1
- package/src/view/document.d.ts +25 -25
- package/src/view/document.js +15 -15
- package/src/view/documentfragment.d.ts +21 -21
- package/src/view/documentfragment.js +14 -14
- package/src/view/documentselection.d.ts +65 -63
- package/src/view/documentselection.js +27 -25
- package/src/view/domconverter.d.ts +94 -89
- package/src/view/domconverter.js +78 -73
- package/src/view/downcastwriter.d.ts +185 -181
- package/src/view/downcastwriter.js +222 -210
- package/src/view/editableelement.d.ts +13 -13
- package/src/view/editableelement.js +8 -8
- package/src/view/element.d.ts +75 -74
- package/src/view/element.js +58 -58
- package/src/view/elementdefinition.d.ts +3 -4
- package/src/view/emptyelement.d.ts +13 -13
- package/src/view/emptyelement.js +13 -13
- package/src/view/filler.d.ts +14 -3
- package/src/view/filler.js +12 -1
- package/src/view/item.d.ts +4 -5
- package/src/view/matcher.d.ts +22 -19
- package/src/view/matcher.js +6 -6
- package/src/view/node.d.ts +33 -33
- package/src/view/node.js +9 -9
- package/src/view/observer/arrowkeysobserver.d.ts +10 -10
- package/src/view/observer/arrowkeysobserver.js +5 -5
- package/src/view/observer/bubblingemittermixin.d.ts +5 -5
- package/src/view/observer/bubblingemittermixin.js +2 -9
- package/src/view/observer/bubblingeventinfo.d.ts +9 -9
- package/src/view/observer/bubblingeventinfo.js +1 -1
- package/src/view/observer/clickobserver.d.ts +8 -8
- package/src/view/observer/clickobserver.js +4 -4
- package/src/view/observer/compositionobserver.d.ts +19 -19
- package/src/view/observer/compositionobserver.js +6 -6
- package/src/view/observer/domeventdata.d.ts +9 -9
- package/src/view/observer/domeventdata.js +2 -2
- package/src/view/observer/domeventobserver.d.ts +3 -3
- package/src/view/observer/domeventobserver.js +5 -5
- package/src/view/observer/fakeselectionobserver.d.ts +9 -9
- package/src/view/observer/fakeselectionobserver.js +8 -8
- package/src/view/observer/focusobserver.d.ts +16 -16
- package/src/view/observer/focusobserver.js +7 -7
- package/src/view/observer/inputobserver.d.ts +18 -18
- package/src/view/observer/inputobserver.js +5 -5
- package/src/view/observer/keyobserver.d.ts +11 -11
- package/src/view/observer/keyobserver.js +3 -3
- package/src/view/observer/mouseobserver.d.ts +16 -16
- package/src/view/observer/mouseobserver.js +3 -3
- package/src/view/observer/mutationobserver.d.ts +21 -21
- package/src/view/observer/mutationobserver.js +7 -7
- package/src/view/observer/observer.d.ts +12 -12
- package/src/view/observer/observer.js +6 -6
- package/src/view/observer/selectionobserver.d.ts +33 -33
- package/src/view/observer/selectionobserver.js +14 -14
- package/src/view/observer/tabobserver.d.ts +10 -10
- package/src/view/observer/tabobserver.js +5 -5
- package/src/view/observer/touchobserver.d.ts +13 -13
- package/src/view/observer/touchobserver.js +3 -3
- package/src/view/placeholder.d.ts +21 -21
- package/src/view/placeholder.js +23 -23
- package/src/view/position.d.ts +49 -49
- package/src/view/position.js +42 -42
- package/src/view/range.d.ts +76 -74
- package/src/view/range.js +67 -65
- package/src/view/rawelement.d.ts +19 -19
- package/src/view/rawelement.js +16 -16
- package/src/view/renderer.d.ts +14 -14
- package/src/view/renderer.js +7 -7
- package/src/view/rooteditableelement.d.ts +8 -7
- package/src/view/rooteditableelement.js +7 -6
- package/src/view/selection.d.ts +66 -64
- package/src/view/selection.js +50 -48
- package/src/view/styles/background.d.ts +2 -2
- package/src/view/styles/background.js +9 -9
- package/src/view/styles/border.d.ts +2 -2
- package/src/view/styles/border.js +13 -13
- package/src/view/styles/margin.d.ts +2 -2
- package/src/view/styles/margin.js +5 -5
- package/src/view/styles/padding.d.ts +2 -2
- package/src/view/styles/padding.js +5 -5
- package/src/view/styles/utils.d.ts +24 -24
- package/src/view/styles/utils.js +25 -25
- package/src/view/stylesmap.d.ts +28 -32
- package/src/view/stylesmap.js +52 -39
- package/src/view/text.d.ts +11 -11
- package/src/view/text.js +10 -10
- package/src/view/textproxy.d.ts +33 -32
- package/src/view/textproxy.js +23 -22
- package/src/view/tokenlist.d.ts +14 -14
- package/src/view/tokenlist.js +10 -10
- package/src/view/treewalker.d.ts +42 -40
- package/src/view/treewalker.js +36 -35
- package/src/view/typecheckable.d.ts +76 -75
- package/src/view/typecheckable.js +1 -1
- package/src/view/uielement.d.ts +22 -21
- package/src/view/uielement.js +17 -16
- package/src/view/upcastwriter.d.ts +70 -70
- package/src/view/upcastwriter.js +42 -42
- package/src/view/view.d.ts +70 -69
- package/src/view/view.js +56 -55
package/src/model/model.js
CHANGED
|
@@ -5,24 +5,24 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/model/model
|
|
7
7
|
*/
|
|
8
|
-
import Batch from './batch.js';
|
|
9
|
-
import
|
|
10
|
-
import MarkerCollection from './markercollection.js';
|
|
11
|
-
import ModelPosition from './position.js';
|
|
12
|
-
import ModelRange from './range.js';
|
|
13
|
-
import ModelSelection from './selection.js';
|
|
14
|
-
import OperationFactory from './operation/operationfactory.js';
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
8
|
+
import { Batch } from './batch.js';
|
|
9
|
+
import { ModelDocument } from './document.js';
|
|
10
|
+
import { MarkerCollection } from './markercollection.js';
|
|
11
|
+
import { ModelPosition } from './position.js';
|
|
12
|
+
import { ModelRange } from './range.js';
|
|
13
|
+
import { ModelSelection } from './selection.js';
|
|
14
|
+
import { OperationFactory } from './operation/operationfactory.js';
|
|
15
|
+
import { ModelDocumentSelection } from './documentselection.js';
|
|
16
|
+
import { ModelSchema } from './schema.js';
|
|
17
|
+
import { ModelWriter } from './writer.js';
|
|
18
|
+
import { ModelNode } from './node.js';
|
|
19
19
|
import { autoParagraphEmptyRoots } from './utils/autoparagraphing.js';
|
|
20
20
|
import { injectSelectionPostFixer } from './utils/selection-post-fixer.js';
|
|
21
|
-
import deleteContent from './utils/deletecontent.js';
|
|
22
|
-
import getSelectedContent from './utils/getselectedcontent.js';
|
|
23
|
-
import insertContent from './utils/insertcontent.js';
|
|
24
|
-
import insertObject from './utils/insertobject.js';
|
|
25
|
-
import modifySelection from './utils/modifyselection.js';
|
|
21
|
+
import { deleteContent } from './utils/deletecontent.js';
|
|
22
|
+
import { getSelectedContent } from './utils/getselectedcontent.js';
|
|
23
|
+
import { insertContent } from './utils/insertcontent.js';
|
|
24
|
+
import { insertObject } from './utils/insertobject.js';
|
|
25
|
+
import { modifySelection } from './utils/modifyselection.js';
|
|
26
26
|
import { CKEditorError, ObservableMixin } from '@ckeditor/ckeditor5-utils';
|
|
27
27
|
// @if CK_DEBUG_ENGINE // const { dumpTrees, initDocumentDumping } = require( '../dev-utils/utils' );
|
|
28
28
|
// @if CK_DEBUG_ENGINE // const { OperationReplayer } = require( '../dev-utils/operationreplayer' ).default;
|
|
@@ -30,7 +30,7 @@ import { CKEditorError, ObservableMixin } from '@ckeditor/ckeditor5-utils';
|
|
|
30
30
|
* Editor's data model. Read about the model in the
|
|
31
31
|
* {@glink framework/architecture/editing-engine engine architecture} guide.
|
|
32
32
|
*/
|
|
33
|
-
export
|
|
33
|
+
export class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
34
34
|
/**
|
|
35
35
|
* Model's marker collection.
|
|
36
36
|
*/
|
|
@@ -57,8 +57,8 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
57
57
|
constructor() {
|
|
58
58
|
super();
|
|
59
59
|
this.markers = new MarkerCollection();
|
|
60
|
-
this.document = new
|
|
61
|
-
this.schema = new
|
|
60
|
+
this.document = new ModelDocument(this);
|
|
61
|
+
this.schema = new ModelSchema();
|
|
62
62
|
this._pendingChanges = [];
|
|
63
63
|
this._currentWriter = null;
|
|
64
64
|
['deleteContent', 'modifySelection', 'getSelectedContent', 'applyOperation']
|
|
@@ -142,7 +142,7 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
142
142
|
/**
|
|
143
143
|
* The `change()` method is the primary way of changing the model. You should use it to modify all document nodes
|
|
144
144
|
* (including detached nodes – i.e. nodes not added to the {@link module:engine/model/model~Model#document model document}),
|
|
145
|
-
* the {@link module:engine/model/document~
|
|
145
|
+
* the {@link module:engine/model/document~ModelDocument#selection document's selection}, and
|
|
146
146
|
* {@link module:engine/model/model~Model#markers model markers}.
|
|
147
147
|
*
|
|
148
148
|
* ```ts
|
|
@@ -226,7 +226,7 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
226
226
|
* {@link module:engine/model/operation/operation~Operation operations} to the model.
|
|
227
227
|
*
|
|
228
228
|
* This is a low-level way of changing the model. It is exposed for very specific use cases (like the undo feature).
|
|
229
|
-
* Normally, to modify the model, you will want to use {@link module:engine/model/writer~
|
|
229
|
+
* Normally, to modify the model, you will want to use {@link module:engine/model/writer~ModelWriter `Writer`}.
|
|
230
230
|
* See also {@glink framework/architecture/editing-engine#changing-the-model Changing the model} section
|
|
231
231
|
* of the {@glink framework/architecture/editing-engine Editing architecture} guide.
|
|
232
232
|
*
|
|
@@ -260,9 +260,9 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
260
260
|
* It can split elements, merge them, wrap bare text nodes with paragraphs, etc. – just like the
|
|
261
261
|
* pasting feature should do.
|
|
262
262
|
*
|
|
263
|
-
* For lower-level methods see {@link module:engine/model/writer~
|
|
263
|
+
* For lower-level methods see {@link module:engine/model/writer~ModelWriter `Writer`}.
|
|
264
264
|
*
|
|
265
|
-
* This method, unlike {@link module:engine/model/writer~
|
|
265
|
+
* This method, unlike {@link module:engine/model/writer~ModelWriter `Writer`}'s methods, does not have to be used
|
|
266
266
|
* inside a {@link #change `change()` block}.
|
|
267
267
|
*
|
|
268
268
|
* # Conversion and schema
|
|
@@ -349,7 +349,7 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
349
349
|
* ```
|
|
350
350
|
*
|
|
351
351
|
* If you want the document selection to be moved to the inserted content, use the
|
|
352
|
-
* {@link module:engine/model/writer~
|
|
352
|
+
* {@link module:engine/model/writer~ModelWriter#setSelection `setSelection()`} method of the writer after inserting
|
|
353
353
|
* the content:
|
|
354
354
|
*
|
|
355
355
|
* ```ts
|
|
@@ -364,7 +364,7 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
364
364
|
* } );
|
|
365
365
|
* ```
|
|
366
366
|
*
|
|
367
|
-
* If an instance of the {@link module:engine/model/selection~
|
|
367
|
+
* If an instance of the {@link module:engine/model/selection~ModelSelection model selection} is passed as `selectable`,
|
|
368
368
|
* the new content will be inserted at the passed selection (instead of document selection):
|
|
369
369
|
*
|
|
370
370
|
* ```ts
|
|
@@ -408,8 +408,8 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
408
408
|
* # Notes
|
|
409
409
|
*
|
|
410
410
|
* * If you want to insert a non-object content, see {@link #insertContent} instead.
|
|
411
|
-
* * For lower-level API, see {@link module:engine/model/writer~
|
|
412
|
-
* * Unlike {@link module:engine/model/writer~
|
|
411
|
+
* * For lower-level API, see {@link module:engine/model/writer~ModelWriter `Writer`}.
|
|
412
|
+
* * Unlike {@link module:engine/model/writer~ModelWriter `Writer`}, this method does not have to be used inside
|
|
413
413
|
* a {@link #change `change()` block}.
|
|
414
414
|
* * Inserting object into the model is not enough to make CKEditor 5 render that content to the user.
|
|
415
415
|
* CKEditor 5 implements a model-view-controller architecture and what `model.insertObject()` does
|
|
@@ -460,7 +460,7 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
460
460
|
*
|
|
461
461
|
* @param element An object to be inserted into the model document.
|
|
462
462
|
* @param selectable A selectable where the content should be inserted. If not specified, the current
|
|
463
|
-
* {@link module:engine/model/document~
|
|
463
|
+
* {@link module:engine/model/document~ModelDocument#selection document selection} will be used instead.
|
|
464
464
|
* @param placeOrOffset Specifies the exact place or offset for the insertion to take place, relative to `selectable`.
|
|
465
465
|
* @param options Additional options.
|
|
466
466
|
* @param options.findOptimalPosition An option that, when set, adjusts the insertion position (relative to
|
|
@@ -471,7 +471,7 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
471
471
|
*
|
|
472
472
|
* Note that this option only works for block objects. Inline objects are inserted into text and do not split blocks.
|
|
473
473
|
* @param options.setSelection An option that, when set, moves the
|
|
474
|
-
* {@link module:engine/model/document~
|
|
474
|
+
* {@link module:engine/model/document~ModelDocument#selection document selection} after inserting the object.
|
|
475
475
|
* * When `'on'`, the document selection will be set on the inserted object.
|
|
476
476
|
* * When `'after'`, the document selection will move to the closest text node after the inserted object. If there is no
|
|
477
477
|
* such text node, a paragraph will be created and the document selection will be moved inside it.
|
|
@@ -503,7 +503,7 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
503
503
|
* * `<heading1>x^y</heading1>` with the option disabled (`leaveUnmerged == false`)
|
|
504
504
|
* * `<heading1>x^</heading1><paragraph>y</paragraph>` with enabled (`leaveUnmerged == true`).
|
|
505
505
|
*
|
|
506
|
-
* Note: {@link module:engine/model/schema~
|
|
506
|
+
* Note: {@link module:engine/model/schema~ModelSchema#isObject object} and {@link module:engine/model/schema~ModelSchema#isLimit limit}
|
|
507
507
|
* elements will not be merged.
|
|
508
508
|
*
|
|
509
509
|
* @param options.doNotResetEntireContent Whether to skip replacing the entire content with a
|
|
@@ -595,14 +595,14 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
595
595
|
return getSelectedContent(this, selection);
|
|
596
596
|
}
|
|
597
597
|
/**
|
|
598
|
-
* Checks whether the given {@link module:engine/model/range~
|
|
599
|
-
* {@link module:engine/model/element~
|
|
598
|
+
* Checks whether the given {@link module:engine/model/range~ModelRange range} or
|
|
599
|
+
* {@link module:engine/model/element~ModelElement element} has any meaningful content.
|
|
600
600
|
*
|
|
601
601
|
* Meaningful content is:
|
|
602
602
|
*
|
|
603
603
|
* * any text node (`options.ignoreWhitespaces` allows controlling whether this text node must also contain
|
|
604
604
|
* any non-whitespace characters),
|
|
605
|
-
* * or any {@link module:engine/model/schema~
|
|
605
|
+
* * or any {@link module:engine/model/schema~ModelSchema#isContent content element},
|
|
606
606
|
* * or any {@link module:engine/model/markercollection~Marker marker} which
|
|
607
607
|
* {@link module:engine/model/markercollection~Marker#_affectsData affects data}.
|
|
608
608
|
*
|
|
@@ -654,7 +654,7 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
654
654
|
*
|
|
655
655
|
* This method is decorated. Although this method accepts any parameter of `Selectable` type, the
|
|
656
656
|
* {@link ~Model#event:canEditAt `canEditAt` event} is fired with `selectable` normalized to an instance of
|
|
657
|
-
* {@link module:engine/model/selection~
|
|
657
|
+
* {@link module:engine/model/selection~ModelSelection} or {@link module:engine/model/documentselection~ModelDocumentSelection}
|
|
658
658
|
*
|
|
659
659
|
* @fires canEditAt
|
|
660
660
|
*/
|
|
@@ -666,11 +666,11 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
666
666
|
* Creates a position from the given root and path in that root.
|
|
667
667
|
*
|
|
668
668
|
* Note: This method is also available as
|
|
669
|
-
* {@link module:engine/model/writer~
|
|
669
|
+
* {@link module:engine/model/writer~ModelWriter#createPositionFromPath `Writer#createPositionFromPath()`}.
|
|
670
670
|
*
|
|
671
671
|
* @param root Root of the position.
|
|
672
|
-
* @param path Position path. See {@link module:engine/model/position~
|
|
673
|
-
* @param stickiness Position stickiness. See {@link module:engine/model/position~
|
|
672
|
+
* @param path Position path. See {@link module:engine/model/position~ModelPosition#path}.
|
|
673
|
+
* @param stickiness Position stickiness. See {@link module:engine/model/position~ModelPositionStickiness}.
|
|
674
674
|
*/
|
|
675
675
|
createPositionFromPath(root, path, stickiness) {
|
|
676
676
|
return new ModelPosition(root, path, stickiness);
|
|
@@ -678,10 +678,10 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
678
678
|
/**
|
|
679
679
|
* Creates position at the given location. The location can be specified as:
|
|
680
680
|
*
|
|
681
|
-
* * a {@link module:engine/model/position~
|
|
681
|
+
* * a {@link module:engine/model/position~ModelPosition position},
|
|
682
682
|
* * a parent element and offset in that element,
|
|
683
683
|
* * a parent element and `'end'` (the position will be set at the end of that element),
|
|
684
|
-
* * a {@link module:engine/model/item~
|
|
684
|
+
* * a {@link module:engine/model/item~ModelItem model item} and `'before'` or `'after'`
|
|
685
685
|
* (the position will be set before or after the given model item).
|
|
686
686
|
*
|
|
687
687
|
* This method is a shortcut to other factory methods such as:
|
|
@@ -690,19 +690,19 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
690
690
|
* * {@link module:engine/model/model~Model#createPositionAfter `createPositionAfter()`}.
|
|
691
691
|
*
|
|
692
692
|
* Note: This method is also available as
|
|
693
|
-
* {@link module:engine/model/writer~
|
|
693
|
+
* {@link module:engine/model/writer~ModelWriter#createPositionAt `Writer#createPositionAt()`},
|
|
694
694
|
*
|
|
695
695
|
* @param itemOrPosition
|
|
696
|
-
* @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/model/item~
|
|
696
|
+
* @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/model/item~ModelItem model item}.
|
|
697
697
|
*/
|
|
698
698
|
createPositionAt(itemOrPosition, offset) {
|
|
699
699
|
return ModelPosition._createAt(itemOrPosition, offset);
|
|
700
700
|
}
|
|
701
701
|
/**
|
|
702
|
-
* Creates a new position after the given {@link module:engine/model/item~
|
|
702
|
+
* Creates a new position after the given {@link module:engine/model/item~ModelItem model item}.
|
|
703
703
|
*
|
|
704
704
|
* Note: This method is also available as
|
|
705
|
-
* {@link module:engine/model/writer~
|
|
705
|
+
* {@link module:engine/model/writer~ModelWriter#createPositionAfter `Writer#createPositionAfter()`}.
|
|
706
706
|
*
|
|
707
707
|
* @param item Item after which the position should be placed.
|
|
708
708
|
*/
|
|
@@ -710,10 +710,10 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
710
710
|
return ModelPosition._createAfter(item);
|
|
711
711
|
}
|
|
712
712
|
/**
|
|
713
|
-
* Creates a new position before the given {@link module:engine/model/item~
|
|
713
|
+
* Creates a new position before the given {@link module:engine/model/item~ModelItem model item}.
|
|
714
714
|
*
|
|
715
715
|
* Note: This method is also available as
|
|
716
|
-
* {@link module:engine/model/writer~
|
|
716
|
+
* {@link module:engine/model/writer~ModelWriter#createPositionBefore `Writer#createPositionBefore()`}.
|
|
717
717
|
*
|
|
718
718
|
* @param item Item before which the position should be placed.
|
|
719
719
|
*/
|
|
@@ -724,7 +724,7 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
724
724
|
* Creates a range spanning from the `start` position to the `end` position.
|
|
725
725
|
*
|
|
726
726
|
* Note: This method is also available as
|
|
727
|
-
* {@link module:engine/model/writer~
|
|
727
|
+
* {@link module:engine/model/writer~ModelWriter#createRange `Writer#createRange()`}:
|
|
728
728
|
*
|
|
729
729
|
* ```ts
|
|
730
730
|
* model.change( writer => {
|
|
@@ -743,7 +743,7 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
743
743
|
* that element and ends after the last child of that element.
|
|
744
744
|
*
|
|
745
745
|
* Note: This method is also available as
|
|
746
|
-
* {@link module:engine/model/writer~
|
|
746
|
+
* {@link module:engine/model/writer~ModelWriter#createRangeIn `Writer#createRangeIn()`}:
|
|
747
747
|
*
|
|
748
748
|
* ```ts
|
|
749
749
|
* model.change( writer => {
|
|
@@ -757,10 +757,10 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
757
757
|
return ModelRange._createIn(element);
|
|
758
758
|
}
|
|
759
759
|
/**
|
|
760
|
-
* Creates a range that starts before the given {@link module:engine/model/item~
|
|
760
|
+
* Creates a range that starts before the given {@link module:engine/model/item~ModelItem model item} and ends after it.
|
|
761
761
|
*
|
|
762
762
|
* Note: This method is also available on `writer` instance as
|
|
763
|
-
* {@link module:engine/model/writer~
|
|
763
|
+
* {@link module:engine/model/writer~ModelWriter#createRangeOn `Writer.createRangeOn()`}:
|
|
764
764
|
*
|
|
765
765
|
* ```ts
|
|
766
766
|
* model.change( writer => {
|
|
@@ -800,7 +800,7 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
800
800
|
return OperationFactory.fromJSON(json, this.document);
|
|
801
801
|
}
|
|
802
802
|
/**
|
|
803
|
-
* Removes all events listeners set by model instance and destroys {@link module:engine/model/document~
|
|
803
|
+
* Removes all events listeners set by model instance and destroys {@link module:engine/model/document~ModelDocument}.
|
|
804
804
|
*/
|
|
805
805
|
destroy() {
|
|
806
806
|
this.document.destroy();
|
|
@@ -817,7 +817,7 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
817
817
|
while (this._pendingChanges.length) {
|
|
818
818
|
// Create a new writer using batch instance created for this chain of changes.
|
|
819
819
|
const currentBatch = this._pendingChanges[0].batch;
|
|
820
|
-
this._currentWriter = new
|
|
820
|
+
this._currentWriter = new ModelWriter(this, currentBatch);
|
|
821
821
|
// Execute changes callback and gather the returned value.
|
|
822
822
|
const callbackReturnValue = this._pendingChanges[0].callback(this._currentWriter);
|
|
823
823
|
ret.push(callbackReturnValue);
|
|
@@ -835,16 +835,16 @@ export default class Model extends /* #__PURE__ */ ObservableMixin() {
|
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
837
|
/**
|
|
838
|
-
* Normalizes a selectable to a Selection or
|
|
838
|
+
* Normalizes a selectable to a Selection or ModelDocumentSelection.
|
|
839
839
|
*/
|
|
840
840
|
function normalizeSelectable(selectable, placeOrOffset) {
|
|
841
841
|
if (!selectable) {
|
|
842
842
|
return;
|
|
843
843
|
}
|
|
844
|
-
if (selectable instanceof ModelSelection || selectable instanceof
|
|
844
|
+
if (selectable instanceof ModelSelection || selectable instanceof ModelDocumentSelection) {
|
|
845
845
|
return selectable;
|
|
846
846
|
}
|
|
847
|
-
if (selectable instanceof
|
|
847
|
+
if (selectable instanceof ModelNode) {
|
|
848
848
|
if (placeOrOffset || placeOrOffset === 0) {
|
|
849
849
|
return new ModelSelection(selectable, placeOrOffset);
|
|
850
850
|
}
|
package/src/model/node.d.ts
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module engine/model/node
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
9
|
-
import type
|
|
10
|
-
import type
|
|
11
|
-
import type
|
|
8
|
+
import { ModelTypeCheckable } from './typecheckable.js';
|
|
9
|
+
import { type ModelDocument } from './document.js';
|
|
10
|
+
import { type ModelDocumentFragment } from './documentfragment.js';
|
|
11
|
+
import { type ModelElement } from './element.js';
|
|
12
12
|
/**
|
|
13
13
|
* Model node. Most basic structure of model tree.
|
|
14
14
|
*
|
|
@@ -16,12 +16,12 @@ import type Element from './element.js';
|
|
|
16
16
|
*
|
|
17
17
|
* **Note:** If a node is detached from the model tree, you can manipulate it using it's API.
|
|
18
18
|
* However, it is **very important** that nodes already attached to model tree should be only changed through
|
|
19
|
-
* {@link module:engine/model/writer~
|
|
19
|
+
* {@link module:engine/model/writer~ModelWriter Writer API}.
|
|
20
20
|
*
|
|
21
|
-
* Changes done by `Node` methods, like {@link module:engine/model/element~
|
|
22
|
-
* {@link module:engine/model/node~
|
|
21
|
+
* Changes done by `Node` methods, like {@link module:engine/model/element~ModelElement#_insertChild _insertChild} or
|
|
22
|
+
* {@link module:engine/model/node~ModelNode#_setAttribute _setAttribute}
|
|
23
23
|
* do not generate {@link module:engine/model/operation/operation~Operation operations}
|
|
24
|
-
* which are essential for correct editor work if you modify nodes in {@link module:engine/model/document~
|
|
24
|
+
* which are essential for correct editor work if you modify nodes in {@link module:engine/model/document~ModelDocument document} root.
|
|
25
25
|
*
|
|
26
26
|
* The flow of working on `Node` (and classes that inherits from it) is as such:
|
|
27
27
|
* 1. You can create a `Node` instance, modify it using it's API.
|
|
@@ -29,23 +29,23 @@ import type Element from './element.js';
|
|
|
29
29
|
* 3. Change `Node` that was already added to the model using `Batch` API.
|
|
30
30
|
*
|
|
31
31
|
* Similarly, you cannot use `Batch` API on a node that has not been added to the model tree, with the exception
|
|
32
|
-
* of {@link module:engine/model/writer~
|
|
32
|
+
* of {@link module:engine/model/writer~ModelWriter#insert inserting} that node to the model tree.
|
|
33
33
|
*
|
|
34
|
-
* Be aware that using {@link module:engine/model/writer~
|
|
34
|
+
* Be aware that using {@link module:engine/model/writer~ModelWriter#remove remove from Batch API} does not allow to use `Node` API because
|
|
35
35
|
* the information about `Node` is still kept in model document.
|
|
36
36
|
*
|
|
37
|
-
* In case of {@link module:engine/model/element~
|
|
37
|
+
* In case of {@link module:engine/model/element~ModelElement element node}, adding and removing children also counts as changing a node and
|
|
38
38
|
* follows same rules.
|
|
39
39
|
*/
|
|
40
|
-
export
|
|
40
|
+
export declare abstract class ModelNode extends ModelTypeCheckable {
|
|
41
41
|
/**
|
|
42
|
-
* Parent of this node. It could be {@link module:engine/model/element~
|
|
43
|
-
* or {@link module:engine/model/documentfragment~
|
|
42
|
+
* Parent of this node. It could be {@link module:engine/model/element~ModelElement}
|
|
43
|
+
* or {@link module:engine/model/documentfragment~ModelDocumentFragment}.
|
|
44
44
|
* Equals to `null` if the node has no parent.
|
|
45
45
|
*/
|
|
46
|
-
readonly parent:
|
|
46
|
+
readonly parent: ModelElement | ModelDocumentFragment | null;
|
|
47
47
|
/**
|
|
48
|
-
* Unique root name used to identify this root element by {@link module:engine/model/document~
|
|
48
|
+
* Unique root name used to identify this root element by {@link module:engine/model/document~ModelDocument}.
|
|
49
49
|
*/
|
|
50
50
|
readonly rootName: string | undefined;
|
|
51
51
|
/**
|
|
@@ -71,11 +71,11 @@ export default abstract class Node extends TypeCheckable {
|
|
|
71
71
|
*
|
|
72
72
|
* @param attrs Node's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.
|
|
73
73
|
*/
|
|
74
|
-
constructor(attrs?:
|
|
74
|
+
constructor(attrs?: ModelNodeAttributes);
|
|
75
75
|
/**
|
|
76
|
-
* {@link module:engine/model/document~
|
|
76
|
+
* {@link module:engine/model/document~ModelDocument Document} that owns this root element.
|
|
77
77
|
*/
|
|
78
|
-
get document():
|
|
78
|
+
get document(): ModelDocument | null;
|
|
79
79
|
/**
|
|
80
80
|
* Index of this node in its parent or `null` if the node has no parent.
|
|
81
81
|
*/
|
|
@@ -89,45 +89,45 @@ export default abstract class Node extends TypeCheckable {
|
|
|
89
89
|
* Offset size of this node.
|
|
90
90
|
*
|
|
91
91
|
* Represents how much "offset space" is occupied by the node in its parent. It is important for
|
|
92
|
-
* {@link module:engine/model/position~
|
|
93
|
-
* that node start and end. `offsetSize` greater than `1` is for
|
|
94
|
-
* a {@link module:engine/model/text~
|
|
92
|
+
* {@link module:engine/model/position~ModelPosition position}. When node has `offsetSize` greater
|
|
93
|
+
* than `1`, position can be placed between that node start and end. `offsetSize` greater than `1` is for
|
|
94
|
+
* nodes that represents more than one entity, i.e. a {@link module:engine/model/text~ModelText text node}.
|
|
95
95
|
*/
|
|
96
96
|
get offsetSize(): number;
|
|
97
97
|
/**
|
|
98
98
|
* Offset at which this node ends in its parent. It is equal to the sum of this node's
|
|
99
|
-
* {@link module:engine/model/node~
|
|
99
|
+
* {@link module:engine/model/node~ModelNode#startOffset start offset} and {@link #offsetSize offset size}.
|
|
100
100
|
* Equals to `null` if the node has no parent.
|
|
101
101
|
*/
|
|
102
102
|
get endOffset(): number | null;
|
|
103
103
|
/**
|
|
104
104
|
* Node's next sibling or `null` if the node is a last child of it's parent or if the node has no parent.
|
|
105
105
|
*/
|
|
106
|
-
get nextSibling():
|
|
106
|
+
get nextSibling(): ModelNode | null;
|
|
107
107
|
/**
|
|
108
108
|
* Node's previous sibling or `null` if the node is a first child of it's parent or if the node has no parent.
|
|
109
109
|
*/
|
|
110
|
-
get previousSibling():
|
|
110
|
+
get previousSibling(): ModelNode | null;
|
|
111
111
|
/**
|
|
112
112
|
* The top-most ancestor of the node. If node has no parent it is the root itself. If the node is a part
|
|
113
|
-
* of {@link module:engine/model/documentfragment~
|
|
113
|
+
* of {@link module:engine/model/documentfragment~ModelDocumentFragment}, it's `root` is equal to that `DocumentFragment`.
|
|
114
114
|
*/
|
|
115
|
-
get root():
|
|
115
|
+
get root(): ModelNode | ModelDocumentFragment;
|
|
116
116
|
/**
|
|
117
117
|
* Returns `true` if the node is inside a document root that is attached to the document.
|
|
118
118
|
*/
|
|
119
119
|
isAttached(): boolean;
|
|
120
120
|
/**
|
|
121
121
|
* Gets path to the node. The path is an array containing starting offsets of consecutive ancestors of this node,
|
|
122
|
-
* beginning from {@link module:engine/model/node~
|
|
123
|
-
* create {@link module:engine/model/position~
|
|
122
|
+
* beginning from {@link module:engine/model/node~ModelNode#root root}, down to this node's starting offset. The path can be used to
|
|
123
|
+
* create {@link module:engine/model/position~ModelPosition Position} instance.
|
|
124
124
|
*
|
|
125
125
|
* ```ts
|
|
126
126
|
* const abc = new Text( 'abc' );
|
|
127
127
|
* const foo = new Text( 'foo' );
|
|
128
|
-
* const h1 = new
|
|
129
|
-
* const p = new
|
|
130
|
-
* const div = new
|
|
128
|
+
* const h1 = new ModelElement( 'h1', null, new Text( 'header' ) );
|
|
129
|
+
* const p = new ModelElement( 'p', null, [ abc, foo ] );
|
|
130
|
+
* const div = new ModelElement( 'div', null, [ h1, p ] );
|
|
131
131
|
* foo.getPath(); // Returns [ 1, 3 ]. `foo` is in `p` which is in `div`. `p` starts at offset 1, while `foo` at 3.
|
|
132
132
|
* h1.getPath(); // Returns [ 0 ].
|
|
133
133
|
* div.getPath(); // Returns [].
|
|
@@ -146,9 +146,9 @@ export default abstract class Node extends TypeCheckable {
|
|
|
146
146
|
getAncestors(options?: {
|
|
147
147
|
includeSelf?: boolean;
|
|
148
148
|
parentFirst?: boolean;
|
|
149
|
-
}): Array<
|
|
149
|
+
}): Array<ModelNode | ModelDocumentFragment>;
|
|
150
150
|
/**
|
|
151
|
-
* Returns a {@link module:engine/model/element~
|
|
151
|
+
* Returns a {@link module:engine/model/element~ModelElement} or {@link module:engine/model/documentfragment~ModelDocumentFragment}
|
|
152
152
|
* which is a common ancestor of both nodes.
|
|
153
153
|
*
|
|
154
154
|
* @param node The second node.
|
|
@@ -156,23 +156,23 @@ export default abstract class Node extends TypeCheckable {
|
|
|
156
156
|
* @param options.includeSelf When set to `true` both nodes will be considered "ancestors" too.
|
|
157
157
|
* Which means that if e.g. node A is inside B, then their common ancestor will be B.
|
|
158
158
|
*/
|
|
159
|
-
getCommonAncestor(node:
|
|
159
|
+
getCommonAncestor(node: ModelNode, options?: {
|
|
160
160
|
includeSelf?: boolean;
|
|
161
|
-
}):
|
|
161
|
+
}): ModelElement | ModelDocumentFragment | null;
|
|
162
162
|
/**
|
|
163
163
|
* Returns whether this node is before given node. `false` is returned if nodes are in different trees (for example,
|
|
164
|
-
* in different {@link module:engine/model/documentfragment~
|
|
164
|
+
* in different {@link module:engine/model/documentfragment~ModelDocumentFragment}s).
|
|
165
165
|
*
|
|
166
166
|
* @param node Node to compare with.
|
|
167
167
|
*/
|
|
168
|
-
isBefore(node:
|
|
168
|
+
isBefore(node: ModelNode): boolean;
|
|
169
169
|
/**
|
|
170
170
|
* Returns whether this node is after given node. `false` is returned if nodes are in different trees (for example,
|
|
171
|
-
* in different {@link module:engine/model/documentfragment~
|
|
171
|
+
* in different {@link module:engine/model/documentfragment~ModelDocumentFragment}s).
|
|
172
172
|
*
|
|
173
173
|
* @param node Node to compare with.
|
|
174
174
|
*/
|
|
175
|
-
isAfter(node:
|
|
175
|
+
isAfter(node: ModelNode): boolean;
|
|
176
176
|
/**
|
|
177
177
|
* Checks if the node has an attribute with given key.
|
|
178
178
|
*
|
|
@@ -210,18 +210,18 @@ export default abstract class Node extends TypeCheckable {
|
|
|
210
210
|
* @internal
|
|
211
211
|
* @returns Node with same attributes as this node.
|
|
212
212
|
*/
|
|
213
|
-
_clone(_deep?: boolean):
|
|
213
|
+
_clone(_deep?: boolean): ModelNode;
|
|
214
214
|
/**
|
|
215
215
|
* Removes this node from its parent.
|
|
216
216
|
*
|
|
217
217
|
* @internal
|
|
218
|
-
* @see module:engine/model/writer~
|
|
218
|
+
* @see module:engine/model/writer~ModelWriter#remove
|
|
219
219
|
*/
|
|
220
220
|
_remove(): void;
|
|
221
221
|
/**
|
|
222
222
|
* Sets attribute on the node. If attribute with the same key already is set, it's value is overwritten.
|
|
223
223
|
*
|
|
224
|
-
* @see module:engine/model/writer~
|
|
224
|
+
* @see module:engine/model/writer~ModelWriter#setAttribute
|
|
225
225
|
* @internal
|
|
226
226
|
* @param key Key of attribute to set.
|
|
227
227
|
* @param value Attribute value.
|
|
@@ -230,15 +230,15 @@ export default abstract class Node extends TypeCheckable {
|
|
|
230
230
|
/**
|
|
231
231
|
* Removes all attributes from the node and sets given attributes.
|
|
232
232
|
*
|
|
233
|
-
* @see module:engine/model/writer~
|
|
233
|
+
* @see module:engine/model/writer~ModelWriter#setAttributes
|
|
234
234
|
* @internal
|
|
235
235
|
* @param attrs Attributes to set. See {@link module:utils/tomap~toMap} for a list of accepted values.
|
|
236
236
|
*/
|
|
237
|
-
_setAttributesTo(attrs:
|
|
237
|
+
_setAttributesTo(attrs: ModelNodeAttributes): void;
|
|
238
238
|
/**
|
|
239
239
|
* Removes an attribute with given key from the node.
|
|
240
240
|
*
|
|
241
|
-
* @see module:engine/model/writer~
|
|
241
|
+
* @see module:engine/model/writer~ModelWriter#removeAttribute
|
|
242
242
|
* @internal
|
|
243
243
|
* @param key Key of attribute to remove.
|
|
244
244
|
* @returns `true` if the attribute was set on the element, `false` otherwise.
|
|
@@ -247,7 +247,7 @@ export default abstract class Node extends TypeCheckable {
|
|
|
247
247
|
/**
|
|
248
248
|
* Removes all attributes from the node.
|
|
249
249
|
*
|
|
250
|
-
* @see module:engine/model/writer~
|
|
250
|
+
* @see module:engine/model/writer~ModelWriter#clearAttributes
|
|
251
251
|
* @internal
|
|
252
252
|
*/
|
|
253
253
|
_clearAttributes(): void;
|
|
@@ -255,4 +255,4 @@ export default abstract class Node extends TypeCheckable {
|
|
|
255
255
|
/**
|
|
256
256
|
* Node's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.
|
|
257
257
|
*/
|
|
258
|
-
export type
|
|
258
|
+
export type ModelNodeAttributes = Record<string, unknown> | Iterable<[string, unknown]>;
|