@ones-editor/editor 2.9.8-beta.63 → 2.9.8-beta.65

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 CHANGED
@@ -29318,10 +29318,11 @@ var __publicField = (obj, key, value) => {
29318
29318
  editor.selection.selectBlock(prevBlock2, getBlockTextLength$6(editor, prevBlock2));
29319
29319
  }
29320
29320
  } else {
29321
- if (!isTitleBlock$2(block) && isHeadingBlock$1(block)) {
29321
+ if (!isTitleBlock$2(block) && isHeadingBlock$1(block) && getBlockTextLength$6(editor, block) === 0) {
29322
29322
  const blockData = editor.getBlockData(block);
29323
29323
  const { heading, id, type, ...rest } = blockData;
29324
29324
  editorUpdateBlockData(editor, block, rest, editor.selection.range.toDocRange());
29325
+ editor.emit("selectionChanged", editor);
29325
29326
  }
29326
29327
  }
29327
29328
  }
@@ -94752,6 +94753,15 @@ ${JSON.stringify(error2, null, 2)}`);
94752
94753
  });
94753
94754
  this.children = children;
94754
94755
  subBar.updateItems(this.children);
94756
+ } else if (focusBlock.closest('[data-block-type="layout"]')) {
94757
+ const children = this.allChildren.filter((c) => {
94758
+ if (c.id === "insert-layout") {
94759
+ return false;
94760
+ }
94761
+ return true;
94762
+ });
94763
+ this.children = children;
94764
+ subBar.updateItems(this.children);
94755
94765
  } else {
94756
94766
  this.children = this.allChildren;
94757
94767
  subBar.updateItems(this.children);
@@ -95901,7 +95911,7 @@ ${JSON.stringify(error2, null, 2)}`);
95901
95911
  }
95902
95912
  }
95903
95913
  });
95904
- editor.version = "2.9.8-beta.63";
95914
+ editor.version = "2.9.8-beta.65";
95905
95915
  return editor;
95906
95916
  }
95907
95917
  function isDoc(doc2) {
@@ -96035,7 +96045,7 @@ ${JSON.stringify(error2, null, 2)}`);
96035
96045
  OnesEditorDropTarget.register(editor);
96036
96046
  OnesEditorTocProvider.register(editor);
96037
96047
  OnesEditorExclusiveBlock.register(editor);
96038
- editor.version = "2.9.8-beta.63";
96048
+ editor.version = "2.9.8-beta.65";
96039
96049
  return editor;
96040
96050
  }
96041
96051
  async function showDocVersions(editor, options, serverUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "2.9.8-beta.63",
3
+ "version": "2.9.8-beta.65",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {