blume 0.6.4 → 0.6.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/cli/index.js CHANGED
@@ -9734,12 +9734,14 @@ var sortNodes = (nodes) => {
9734
9734
  }
9735
9735
  }
9736
9736
  };
9737
- var hoistPages = (nodes) => {
9737
+ var hoistPages = (nodes, recurse) => {
9738
9738
  const pages = nodes.filter((node) => node.kind === "page");
9739
9739
  const groups = nodes.filter((node) => node.kind === "group");
9740
9740
  nodes.splice(0, nodes.length, ...pages, ...groups);
9741
- for (const group of groups) {
9742
- hoistPages(group.children);
9741
+ if (recurse) {
9742
+ for (const group of groups) {
9743
+ hoistPages(group.children, recurse);
9744
+ }
9743
9745
  }
9744
9746
  };
9745
9747
  var toNavNode = (node, display) => {
@@ -9803,9 +9805,7 @@ var buildFileSystemSidebar = (pages, folderMeta, sharedMeta, metaPrefix, display
9803
9805
  }
9804
9806
  applyFolderMeta(root, folderMeta, sharedMeta, metaPrefix);
9805
9807
  sortNodes(root.children);
9806
- if (display === "flat") {
9807
- hoistPages(root.children);
9808
- }
9808
+ hoistPages(root.children, display === "flat");
9809
9809
  return root.children.map((child) => toNavNode(child, display));
9810
9810
  };
9811
9811
  var normalizeRef = (ref) => {
@@ -11911,5 +11911,5 @@ process.on("unhandledRejection", (error) => {
11911
11911
  });
11912
11912
  runMain(main);
11913
11913
 
11914
- //# debugId=E4B96AC474347DAD64756E2164756E21
11914
+ //# debugId=45C17FD85BF8188D64756E2164756E21
11915
11915
  //# sourceMappingURL=index.js.map