@ckeditor/ckeditor5-editor-multi-root 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-editor-multi-root",
3
- "version": "44.3.0-alpha.7",
3
+ "version": "45.0.0-alpha.0",
4
4
  "description": "Multi-root editor implementation for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -12,12 +12,12 @@
12
12
  "type": "module",
13
13
  "main": "src/index.js",
14
14
  "dependencies": {
15
- "@ckeditor/ckeditor5-core": "44.3.0-alpha.7",
16
- "@ckeditor/ckeditor5-engine": "44.3.0-alpha.7",
17
- "@ckeditor/ckeditor5-ui": "44.3.0-alpha.7",
18
- "@ckeditor/ckeditor5-utils": "44.3.0-alpha.7",
19
- "ckeditor5": "44.3.0-alpha.7",
20
- "lodash-es": "4.17.21"
15
+ "@ckeditor/ckeditor5-core": "45.0.0-alpha.0",
16
+ "@ckeditor/ckeditor5-engine": "45.0.0-alpha.0",
17
+ "@ckeditor/ckeditor5-ui": "45.0.0-alpha.0",
18
+ "@ckeditor/ckeditor5-utils": "45.0.0-alpha.0",
19
+ "ckeditor5": "45.0.0-alpha.0",
20
+ "es-toolkit": "1.32.0"
21
21
  },
22
22
  "author": "CKSource (http://cksource.com/)",
23
23
  "license": "SEE LICENSE IN LICENSE.md",
@@ -9,7 +9,7 @@ import { Editor, secureSourceElement } from 'ckeditor5/src/core.js';
9
9
  import { CKEditorError, getDataFromElement, setDataInElement, logWarning } from 'ckeditor5/src/utils.js';
10
10
  import MultiRootEditorUI from './multirooteditorui.js';
11
11
  import MultiRootEditorUIView from './multirooteditoruiview.js';
12
- import { isElement as _isElement } from 'lodash-es';
12
+ import { isElement as _isElement } from 'es-toolkit/compat';
13
13
  /**
14
14
  * The multi-root editor implementation.
15
15
  *
@@ -31,6 +31,23 @@ export default class MultiRootEditor extends Editor {
31
31
  static get editorName() {
32
32
  return 'MultiRootEditor';
33
33
  }
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ ui;
38
+ /**
39
+ * The elements on which the editor has been initialized.
40
+ */
41
+ sourceElements;
42
+ /**
43
+ * Holds attributes keys that were passed in {@link module:core/editor/editorconfig~EditorConfig#rootsAttributes `rootsAttributes`}
44
+ * config property and should be returned by {@link #getRootsAttributes}.
45
+ */
46
+ _registeredRootsAttributesKeys = new Set();
47
+ /**
48
+ * A set of lock IDs for enabling or disabling particular root.
49
+ */
50
+ _readOnlyRootLocks = new Map();
34
51
  /**
35
52
  * Creates an instance of the multi-root editor.
36
53
  *
@@ -51,15 +68,6 @@ export default class MultiRootEditor extends Editor {
51
68
  throw new CKEditorError('editor-create-initial-data', null);
52
69
  }
53
70
  super(config);
54
- /**
55
- * Holds attributes keys that were passed in {@link module:core/editor/editorconfig~EditorConfig#rootsAttributes `rootsAttributes`}
56
- * config property and should be returned by {@link #getRootsAttributes}.
57
- */
58
- this._registeredRootsAttributesKeys = new Set();
59
- /**
60
- * A set of lock IDs for enabling or disabling particular root.
61
- */
62
- this._readOnlyRootLocks = new Map();
63
71
  if (!sourceIsData) {
64
72
  this.sourceElements = sourceElementsOrData;
65
73
  }
@@ -8,6 +8,14 @@ import { enablePlaceholder } from 'ckeditor5/src/engine.js';
8
8
  * The multi-root editor UI class.
9
9
  */
10
10
  export default class MultiRootEditorUI extends EditorUI {
11
+ /**
12
+ * The main (top–most) view of the editor UI.
13
+ */
14
+ view;
15
+ /**
16
+ * The editable element that was focused the last time when any of the editables had focus.
17
+ */
18
+ _lastFocusedEditableElement;
11
19
  /**
12
20
  * Creates an instance of the multi-root editor UI class.
13
21
  *
@@ -50,7 +58,7 @@ export default class MultiRootEditorUI extends EditorUI {
50
58
  this.addEditable(editable);
51
59
  }
52
60
  this._initToolbar();
53
- this._initMenuBar(this.view.menuBarView);
61
+ this.initMenuBar(this.view.menuBarView);
54
62
  this.fire('ready');
55
63
  }
56
64
  /**
@@ -16,6 +16,23 @@ import { EditorUIView, InlineEditableUIView, MenuBarView, ToolbarView } from 'ck
16
16
  * to learn more about this view.
17
17
  */
18
18
  export default class MultiRootEditorUIView extends EditorUIView {
19
+ /**
20
+ * The main toolbar of the multi-root editor UI.
21
+ */
22
+ toolbar;
23
+ /**
24
+ * Editable elements used by the multi-root editor UI.
25
+ */
26
+ editables;
27
+ editable;
28
+ /**
29
+ * Menu bar view instance.
30
+ */
31
+ menuBarView;
32
+ /**
33
+ * The editing view instance this view is related to.
34
+ */
35
+ _editingView;
19
36
  /**
20
37
  * Creates an instance of the multi-root editor UI view.
21
38
  *