@ones-editor/editor 0.0.9-beta.4 → 0.0.9-beta.6

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
@@ -42217,7 +42217,7 @@ var __publicField = (obj, key, value) => {
42217
42217
  }
42218
42218
  function getListMarker(listData) {
42219
42219
  var _a, _b;
42220
- if (listData.checkbox || listData.textOnly) {
42220
+ if (listData.checkbox) {
42221
42221
  return "";
42222
42222
  }
42223
42223
  const level = (_a = listData.level) != null ? _a : 1;
@@ -42247,7 +42247,7 @@ var __publicField = (obj, key, value) => {
42247
42247
  return true;
42248
42248
  }
42249
42249
  }
42250
- if (list2.level > prev.level) {
42250
+ if ((list2.level || 1) > (prev.level || 1)) {
42251
42251
  return true;
42252
42252
  }
42253
42253
  return false;
@@ -42269,7 +42269,7 @@ var __publicField = (obj, key, value) => {
42269
42269
  return true;
42270
42270
  }
42271
42271
  }
42272
- if (list2.level > next.level) {
42272
+ if ((list2.level || 1) > (next.level || 1)) {
42273
42273
  return true;
42274
42274
  }
42275
42275
  return false;
@@ -42343,7 +42343,7 @@ var __publicField = (obj, key, value) => {
42343
42343
  }
42344
42344
  function updateMarker(marker, listData) {
42345
42345
  const type = getListType(listData);
42346
- if (type === "text-only") {
42346
+ if (type === "text-only" && !listData.level) {
42347
42347
  return;
42348
42348
  }
42349
42349
  if (type === "checked") {
@@ -42466,7 +42466,7 @@ var __publicField = (obj, key, value) => {
42466
42466
  editor.updateBlockData(c.block, {
42467
42467
  ...oldData,
42468
42468
  groupId,
42469
- level: oldData.level - 1
42469
+ level: (oldData.level || 1) - 1
42470
42470
  });
42471
42471
  if (c.children.length) {
42472
42472
  changeChildrenGroupId(editor, c.children, oldData.groupId);
@@ -42668,7 +42668,7 @@ var __publicField = (obj, key, value) => {
42668
42668
  const oldData2 = editor.getBlockData(b);
42669
42669
  editor.updateBlockData(b, {
42670
42670
  ...oldData2,
42671
- level: oldData2.level + 1
42671
+ level: (oldData2.level || 1) + 1
42672
42672
  });
42673
42673
  });
42674
42674
  editor.doc.endBatchUpdate();
@@ -43118,7 +43118,7 @@ var __publicField = (obj, key, value) => {
43118
43118
  const listData = blockData;
43119
43119
  const { level, start, groupId } = listData;
43120
43120
  const type = getListType(listData);
43121
- blockElement.setAttribute("data-list-level", `${level}`);
43121
+ blockElement.setAttribute("data-list-level", `${level || 1}`);
43122
43122
  blockElement.setAttribute("data-list-start", `${start || 1}`);
43123
43123
  blockElement.setAttribute("data-list-group-id", `${groupId}`);
43124
43124
  blockElement.setAttribute("data-list-type", type);
@@ -49290,7 +49290,7 @@ ${codeText}
49290
49290
  i18n$1.mergeLang(langs$1);
49291
49291
  function isEmptyTextBlockWithoutCompositionText(editor, block) {
49292
49292
  const titleBlockData = editorGetBlockData(editor, block);
49293
- if (titleBlockData.text && getTextLength(titleBlockData.text) === 0) {
49293
+ if (isTextKindBlock(editor, block) && titleBlockData.text && getTextLength(titleBlockData.text) === 0) {
49294
49294
  if (!block.querySelector(".inputting-insertion")) {
49295
49295
  return true;
49296
49296
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "0.0.9-beta.4",
3
+ "version": "0.0.9-beta.6",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",