@fern-api/fdr-sdk 1.2.56-4cf0b0d54d → 1.2.56-d742990ae1
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/api-definition/snippets/backfill.d.ts.map +1 -1
- package/dist/api-definition/snippets/backfill.js +20 -37
- package/dist/api-definition/snippets/backfill.js.map +1 -1
- package/dist/js/api-definition/snippets/server.js +25 -27
- package/dist/js/api-definition/snippets/server.js.map +1 -1
- package/dist/js/api-definition/snippets/server.mjs +25 -27
- package/dist/js/api-definition/snippets/server.mjs.map +1 -1
- 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/api-definition/snippets/backfill.d.ts.map +1 -1
- package/dist/types/navigation/ledger-root-builder.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1908,31 +1908,17 @@ function buildSidebarRootChildren(ctx, scopeSegs, scopePrefix, changelogScopePre
|
|
|
1908
1908
|
const sectionChildren = isUnboundedSkipSlugSibling && !hasDepthMarkedChildren ? [] : buildSectionTree(ctx, ownedSegs, sec, scopePrefix, changelogScopePrefix);
|
|
1909
1909
|
node = sectionNode(ctx, s, sectionChildren, scopePrefix);
|
|
1910
1910
|
}
|
|
1911
|
+
const isSharedSection = siblingBoundaries.size > 0 && scopePrefix !== "" && sec !== "" && !sec.startsWith(scopePrefix);
|
|
1911
1912
|
annotated.push({
|
|
1912
1913
|
node,
|
|
1913
|
-
pos: metaNum(s.seg.metadata, "childIndex"),
|
|
1914
|
+
pos: isSharedSection ? void 0 : metaNum(s.seg.metadata, "childIndex"),
|
|
1914
1915
|
isLeaf: false
|
|
1915
1916
|
});
|
|
1916
1917
|
}
|
|
1917
1918
|
}
|
|
1918
1919
|
const hasLeafPos = annotated.some((a) => a.isLeaf && a.pos != null);
|
|
1919
1920
|
const hasSegmentPos = annotated.some((a) => !a.isLeaf && a.pos != null);
|
|
1920
|
-
const
|
|
1921
|
-
if (hasLeafPos && hasSegmentPos) {
|
|
1922
|
-
let nextSegPos;
|
|
1923
|
-
for (let i = annotated.length - 1; i >= 0; i--) {
|
|
1924
|
-
const a = annotated[i];
|
|
1925
|
-
if (a == null || a.isLeaf) {
|
|
1926
|
-
continue;
|
|
1927
|
-
}
|
|
1928
|
-
if (a.pos != null) {
|
|
1929
|
-
nextSegPos = a.pos;
|
|
1930
|
-
} else if (nextSegPos != null) {
|
|
1931
|
-
inferredPos[i] = nextSegPos - 0.5;
|
|
1932
|
-
}
|
|
1933
|
-
}
|
|
1934
|
-
}
|
|
1935
|
-
const flat = hasLeafPos && hasSegmentPos ? annotated.map((a, seq) => ({ ...a, pos: inferredPos[seq], seq })).sort(
|
|
1921
|
+
const flat = hasLeafPos && hasSegmentPos ? annotated.map((a, seq) => ({ ...a, seq })).sort(
|
|
1936
1922
|
(x, y) => (x.pos ?? Number.MAX_SAFE_INTEGER) - (y.pos ?? Number.MAX_SAFE_INTEGER) || // When positions tie, prefer structural nodes (sections) over
|
|
1937
1923
|
// leaves (pages). This handles stale tabRoot nav entries whose
|
|
1938
1924
|
// displaySortOrder wasn't updated due to content-addressing
|
|
@@ -1959,7 +1945,7 @@ function groupSidebarRootChildren(ctx, children) {
|
|
|
1959
1945
|
if (child.type === "apiReference" || child.type === "varianted") {
|
|
1960
1946
|
flushRun();
|
|
1961
1947
|
out.push(child);
|
|
1962
|
-
} else if (child.type === "section" &&
|
|
1948
|
+
} else if (child.type === "section" && !child.collapsible) {
|
|
1963
1949
|
flushRun();
|
|
1964
1950
|
out.push(child);
|
|
1965
1951
|
} else {
|