@ones-editor/editor 2.1.1-beta.33 → 2.1.1-beta.34

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
@@ -77753,7 +77753,6 @@ ${codeText}
77753
77753
  });
77754
77754
  }
77755
77755
  filter(editor, range, items, source) {
77756
- var _a;
77757
77756
  if (!range.isCollapsed())
77758
77757
  return items;
77759
77758
  const { anchor: anchor2 } = range;
@@ -77763,25 +77762,32 @@ ${codeText}
77763
77762
  return items;
77764
77763
  if (getBlockType(parentBlock) !== "callout")
77765
77764
  return items;
77766
- const filterItems = [];
77767
- items.forEach((item) => {
77768
- var _a2, _b;
77769
- const lastItem = filterItems[filterItems.length - 1];
77770
- if ((lastItem == null ? void 0 : lastItem.type) === "section" && item.type === "section")
77771
- return;
77772
- if (item.blockOptions)
77773
- return;
77774
- const ret = (_b = (_a2 = item.commandProvider) == null ? void 0 : _a2.filterCommands) == null ? void 0 : _b.call(_a2, editor, items, range);
77775
- if (ret) {
77776
- filterItems.push(...ret);
77777
- return;
77765
+ const deep = (items2) => {
77766
+ var _a;
77767
+ const filterItems = [];
77768
+ items2.forEach((item) => {
77769
+ var _a2, _b;
77770
+ const lastItem = filterItems[filterItems.length - 1];
77771
+ if ((lastItem == null ? void 0 : lastItem.type) === "section" && item.type === "section")
77772
+ return;
77773
+ if (item.blockOptions)
77774
+ return;
77775
+ const ret = (_b = (_a2 = item.commandProvider) == null ? void 0 : _a2.filterCommands) == null ? void 0 : _b.call(_a2, editor, items2, range);
77776
+ if (ret) {
77777
+ filterItems.push(...ret);
77778
+ return;
77779
+ }
77780
+ filterItems.push(item);
77781
+ if (item.children) {
77782
+ item.children = deep(item.children);
77783
+ }
77784
+ });
77785
+ if (((_a = filterItems[filterItems.length - 1]) == null ? void 0 : _a.type) === "section") {
77786
+ filterItems.pop();
77778
77787
  }
77779
- filterItems.push(item);
77780
- });
77781
- if (((_a = filterItems[filterItems.length - 1]) == null ? void 0 : _a.type) === "section") {
77782
- filterItems.pop();
77783
- }
77784
- return filterItems;
77788
+ return filterItems;
77789
+ };
77790
+ return deep(items);
77785
77791
  }
77786
77792
  destroy() {
77787
77793
  }
@@ -84974,7 +84980,7 @@ ${data2.flowchartText}
84974
84980
  }
84975
84981
  }
84976
84982
  });
84977
- editor.version = "2.1.1-beta.33";
84983
+ editor.version = "2.1.1-beta.34";
84978
84984
  if (Logger$2.level === LogLevel.DEBUG) {
84979
84985
  window.setReauthFail = (fail) => {
84980
84986
  window.isReauthError = fail;
@@ -85073,7 +85079,7 @@ ${data2.flowchartText}
85073
85079
  });
85074
85080
  editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
85075
85081
  OnesEditorToolbar.register(editor);
85076
- editor.version = "2.1.1-beta.33";
85082
+ editor.version = "2.1.1-beta.34";
85077
85083
  return editor;
85078
85084
  }
85079
85085
  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.1.1-beta.33",
3
+ "version": "2.1.1-beta.34",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",