@fern-api/fdr-sdk 1.2.43-60e226c2d6 → 1.2.44-2a040afc4c

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.
@@ -1718,6 +1718,13 @@ function buildSectionTree(ctx, scopeSegs, parentPath, scopePrefix, changelogScop
1718
1718
  if (!sectionPaths.has(parent)) {
1719
1719
  return nearestExistingAncestor(sec, sectionPaths) === parentPath;
1720
1720
  }
1721
+ if (depth != null) {
1722
+ const pSeg = scopeSegs.find((c) => c.seg.section === parent);
1723
+ const pDepth = pSeg != null ? metaNum(pSeg.seg.metadata, "sidebarDepth") : void 0;
1724
+ if (pDepth != null && depth <= pDepth) {
1725
+ return nearestExistingAncestor(parent, sectionPaths) === parentPath;
1726
+ }
1727
+ }
1721
1728
  return false;
1722
1729
  }).sort((a, b) => a.seg.sortOrder - b.seg.sortOrder);
1723
1730
  const siblingBoundaries = computeDuplicateSiblingSortBoundaries(direct);