@ones-editor/editor 2.3.0-beta.2 → 2.3.0-beta.4

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
@@ -80237,8 +80237,22 @@ ${docStr}
80237
80237
  if (parent) {
80238
80238
  const blockData = editor.getBlockData(block);
80239
80239
  const embedData = blockData.embedData;
80240
- const hiddenHeadings = embedData.hiddenHeadings || [];
80241
- renderToc(editor, parent, toc, new Set(hiddenHeadings));
80240
+ const hiddenHeadingsCustomIds = new Set(embedData.hiddenHeadings || []);
80241
+ const hiddenHeadings = /* @__PURE__ */ new Set();
80242
+ const addCustomId = (node) => {
80243
+ var _a;
80244
+ const text2 = node.block.text || [];
80245
+ const first = text2[0];
80246
+ const customId = (_a = first == null ? void 0 : first.attributes) == null ? void 0 : _a["custom-heading-id"];
80247
+ if (customId && hiddenHeadingsCustomIds.has(customId)) {
80248
+ hiddenHeadings.add(node.block.id);
80249
+ }
80250
+ };
80251
+ toc.nodes.forEach((node) => {
80252
+ addCustomId(node);
80253
+ node.children.forEach(addCustomId);
80254
+ });
80255
+ renderToc(editor, parent, toc, hiddenHeadings);
80242
80256
  }
80243
80257
  });
80244
80258
  });
@@ -89659,7 +89673,7 @@ ${data2.flowchartText}
89659
89673
  }
89660
89674
  }
89661
89675
  });
89662
- editor.version = "2.3.0-beta.2";
89676
+ editor.version = "2.3.0-beta.4";
89663
89677
  return editor;
89664
89678
  }
89665
89679
  function isDoc(doc2) {
@@ -89773,7 +89787,7 @@ ${data2.flowchartText}
89773
89787
  }
89774
89788
  }
89775
89789
  OnesEditorToolbar.register(editor);
89776
- editor.version = "2.3.0-beta.2";
89790
+ editor.version = "2.3.0-beta.4";
89777
89791
  return editor;
89778
89792
  }
89779
89793
  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.3.0-beta.2",
3
+ "version": "2.3.0-beta.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",