@ones-editor/editor 2.3.0-beta.3 → 2.3.0-beta.5

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
@@ -80184,7 +80184,7 @@ ${docStr}
80184
80184
  text2.setAttribute("data-block-id", node.block.id);
80185
80185
  if (node.children.length > 0) {
80186
80186
  const children = createElement("div", ["toc-children"], content);
80187
- renderNodes(children, node.children);
80187
+ renderNodes(children, node.children, hiddenHeadings);
80188
80188
  }
80189
80189
  });
80190
80190
  }
@@ -80239,14 +80239,18 @@ ${docStr}
80239
80239
  const embedData = blockData.embedData;
80240
80240
  const hiddenHeadingsCustomIds = new Set(embedData.hiddenHeadings || []);
80241
80241
  const hiddenHeadings = /* @__PURE__ */ new Set();
80242
- toc.nodes.forEach((node) => {
80242
+ const addCustomId = (node) => {
80243
80243
  var _a;
80244
80244
  const text2 = node.block.text || [];
80245
80245
  const first = text2[0];
80246
80246
  const customId = (_a = first == null ? void 0 : first.attributes) == null ? void 0 : _a["custom-heading-id"];
80247
80247
  if (customId && hiddenHeadingsCustomIds.has(customId)) {
80248
- hiddenHeadings.add(customId);
80248
+ hiddenHeadings.add(node.block.id);
80249
80249
  }
80250
+ };
80251
+ toc.nodes.forEach((node) => {
80252
+ addCustomId(node);
80253
+ node.children.forEach(addCustomId);
80250
80254
  });
80251
80255
  renderToc(editor, parent, toc, hiddenHeadings);
80252
80256
  }
@@ -89669,7 +89673,7 @@ ${data2.flowchartText}
89669
89673
  }
89670
89674
  }
89671
89675
  });
89672
- editor.version = "2.3.0-beta.3";
89676
+ editor.version = "2.3.0-beta.5";
89673
89677
  return editor;
89674
89678
  }
89675
89679
  function isDoc(doc2) {
@@ -89783,7 +89787,7 @@ ${data2.flowchartText}
89783
89787
  }
89784
89788
  }
89785
89789
  OnesEditorToolbar.register(editor);
89786
- editor.version = "2.3.0-beta.3";
89790
+ editor.version = "2.3.0-beta.5";
89787
89791
  return editor;
89788
89792
  }
89789
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.3",
3
+ "version": "2.3.0-beta.5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",