@fern-api/fdr-sdk 1.2.51-403b2eae4f → 1.2.51-c32b5f74fd

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.
@@ -2408,27 +2408,8 @@ function buildLandingPage(ctx, scopeSegs) {
2408
2408
  landingSegment?.nav.find((route) => route.type === "markdown")
2409
2409
  );
2410
2410
  }
2411
- function buildSlugOwnerContentKeys(roots) {
2412
- const slugOwnerKeys = /* @__PURE__ */ new Map();
2413
- for (const root of roots) {
2414
- traverseDF(root, (child, parents) => {
2415
- if (hasMetadata(child) && isPage(child) && !slugOwnerKeys.has(child.slug)) {
2416
- slugOwnerKeys.set(child.slug, new Set(crossVersionDedupKeys(child, parents)));
2417
- }
2418
- });
2419
- }
2420
- return slugOwnerKeys;
2421
- }
2422
- function canonicalOwnerSharesContent(slugOwnerKeys, canonical, keys) {
2423
- const ownerKeys = slugOwnerKeys.get(canonical);
2424
- if (ownerKeys == null) {
2425
- return false;
2426
- }
2427
- return keys.some((key) => key.startsWith("pid:") && ownerKeys.has(key));
2428
- }
2429
2411
  function markWithinScopeCanonicalSlugs(scopeNode) {
2430
2412
  const keyToCanonical = /* @__PURE__ */ new Map();
2431
- const slugOwnerKeys = buildSlugOwnerContentKeys([scopeNode]);
2432
2413
  traverseDF(scopeNode, (child, parents) => {
2433
2414
  if (hasMetadata(child) && isPage(child)) {
2434
2415
  const keys = crossVersionDedupKeys(child, parents);
@@ -2436,7 +2417,7 @@ function markWithinScopeCanonicalSlugs(scopeNode) {
2436
2417
  for (const key of keys) {
2437
2418
  const canonical = keyToCanonical.get(key);
2438
2419
  if (canonical != null && canonical !== child.slug) {
2439
- if (child.slug.startsWith(canonical + "/") && getChildren(child).length > 0 && !canonicalOwnerSharesContent(slugOwnerKeys, canonical, keys)) {
2420
+ if (child.slug.startsWith(canonical + "/") && getChildren(child).length > 0) {
2440
2421
  continue;
2441
2422
  }
2442
2423
  child.canonicalSlug = canonical;
@@ -2463,7 +2444,6 @@ function markCrossVersionCanonicalSlugs(versionNodes) {
2463
2444
  }
2464
2445
  return 0;
2465
2446
  });
2466
- const slugOwnerKeys = buildSlugOwnerContentKeys(sorted);
2467
2447
  for (const version of sorted) {
2468
2448
  traverseDF(version, (child, parents) => {
2469
2449
  if (hasMetadata(child) && isPage(child)) {
@@ -2472,7 +2452,7 @@ function markCrossVersionCanonicalSlugs(versionNodes) {
2472
2452
  for (const key of keys) {
2473
2453
  const canonical = keyToCanonical.get(key);
2474
2454
  if (canonical != null && !version.default) {
2475
- if (child.slug.startsWith(canonical + "/") && getChildren(child).length > 0 && !canonicalOwnerSharesContent(slugOwnerKeys, canonical, keys)) {
2455
+ if (child.slug.startsWith(canonical + "/") && getChildren(child).length > 0) {
2476
2456
  continue;
2477
2457
  }
2478
2458
  child.canonicalSlug = canonical;