@fern-api/fdr-sdk 1.2.56-4cf0b0d54d → 1.2.56-a6947428a1
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/js/navigation/ledger-root-builder.js +4 -18
- package/dist/js/navigation/ledger-root-builder.js.map +1 -1
- package/dist/js/navigation/ledger-root-builder.mjs +4 -18
- package/dist/js/navigation/ledger-root-builder.mjs.map +1 -1
- package/dist/navigation/__test__/ledger-root-builder.rootChildOrder.test.js +5 -7
- package/dist/navigation/__test__/ledger-root-builder.rootChildOrder.test.js.map +1 -1
- package/dist/navigation/ledger-root-builder.d.ts.map +1 -1
- package/dist/navigation/ledger-root-builder.js +14 -44
- package/dist/navigation/ledger-root-builder.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/navigation/ledger-root-builder.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1949,31 +1949,17 @@ function buildSidebarRootChildren(ctx, scopeSegs, scopePrefix, changelogScopePre
|
|
|
1949
1949
|
const sectionChildren = isUnboundedSkipSlugSibling && !hasDepthMarkedChildren ? [] : buildSectionTree(ctx, ownedSegs, sec, scopePrefix, changelogScopePrefix);
|
|
1950
1950
|
node = sectionNode(ctx, s, sectionChildren, scopePrefix);
|
|
1951
1951
|
}
|
|
1952
|
+
const isSharedSection = siblingBoundaries.size > 0 && scopePrefix !== "" && sec !== "" && !sec.startsWith(scopePrefix);
|
|
1952
1953
|
annotated.push({
|
|
1953
1954
|
node,
|
|
1954
|
-
pos: metaNum(s.seg.metadata, "childIndex"),
|
|
1955
|
+
pos: isSharedSection ? void 0 : metaNum(s.seg.metadata, "childIndex"),
|
|
1955
1956
|
isLeaf: false
|
|
1956
1957
|
});
|
|
1957
1958
|
}
|
|
1958
1959
|
}
|
|
1959
1960
|
const hasLeafPos = annotated.some((a) => a.isLeaf && a.pos != null);
|
|
1960
1961
|
const hasSegmentPos = annotated.some((a) => !a.isLeaf && a.pos != null);
|
|
1961
|
-
const
|
|
1962
|
-
if (hasLeafPos && hasSegmentPos) {
|
|
1963
|
-
let nextSegPos;
|
|
1964
|
-
for (let i = annotated.length - 1; i >= 0; i--) {
|
|
1965
|
-
const a = annotated[i];
|
|
1966
|
-
if (a == null || a.isLeaf) {
|
|
1967
|
-
continue;
|
|
1968
|
-
}
|
|
1969
|
-
if (a.pos != null) {
|
|
1970
|
-
nextSegPos = a.pos;
|
|
1971
|
-
} else if (nextSegPos != null) {
|
|
1972
|
-
inferredPos[i] = nextSegPos - 0.5;
|
|
1973
|
-
}
|
|
1974
|
-
}
|
|
1975
|
-
}
|
|
1976
|
-
const flat = hasLeafPos && hasSegmentPos ? annotated.map((a, seq) => ({ ...a, pos: inferredPos[seq], seq })).sort(
|
|
1962
|
+
const flat = hasLeafPos && hasSegmentPos ? annotated.map((a, seq) => ({ ...a, seq })).sort(
|
|
1977
1963
|
(x, y) => (x.pos ?? Number.MAX_SAFE_INTEGER) - (y.pos ?? Number.MAX_SAFE_INTEGER) || // When positions tie, prefer structural nodes (sections) over
|
|
1978
1964
|
// leaves (pages). This handles stale tabRoot nav entries whose
|
|
1979
1965
|
// displaySortOrder wasn't updated due to content-addressing
|
|
@@ -2000,7 +1986,7 @@ function groupSidebarRootChildren(ctx, children) {
|
|
|
2000
1986
|
if (child.type === "apiReference" || child.type === "varianted") {
|
|
2001
1987
|
flushRun();
|
|
2002
1988
|
out.push(child);
|
|
2003
|
-
} else if (child.type === "section" &&
|
|
1989
|
+
} else if (child.type === "section" && !child.collapsible) {
|
|
2004
1990
|
flushRun();
|
|
2005
1991
|
out.push(child);
|
|
2006
1992
|
} else {
|