@fern-api/fdr-sdk 1.2.91-ddab979b89 → 1.2.92-44ed75bcdd

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.
@@ -16228,9 +16228,6 @@ function toUnversionedSlug(slug, versionSlug) {
16228
16228
  return Slug(slug.replace(new RegExp(`^${escapeRegExp4(versionSlug)}(/|$)`), ""));
16229
16229
  }
16230
16230
 
16231
- // src/navigation/utils/pruneNavigationTree.ts
16232
- import structuredClone from "@ungap/structured-clone";
16233
-
16234
16231
  // src/utils/traversers/prunetree.ts
16235
16232
  function prunetree(root, opts) {
16236
16233
  const { predicate, getChildren: getChildren3, deleter, getPointer = (node) => node } = opts;
@@ -16367,11 +16364,20 @@ function mutableDeleteChild(parent, node) {
16367
16364
  // src/navigation/utils/pruneNavigationTree.ts
16368
16365
  var Pruner = class _Pruner {
16369
16366
  static from(tree) {
16367
+ return new _Pruner(structuredClone(tree));
16368
+ }
16369
+ /**
16370
+ * Skips the defensive clone `from` makes: the caller transfers ownership of
16371
+ * `tree` and must not read it afterwards. Use when the tree is already a
16372
+ * private copy (e.g. cloned one step earlier in the same pipeline) — cloning
16373
+ * a megabyte-scale nav tree twice per page dominates static-build GC.
16374
+ */
16375
+ static fromOwned(tree) {
16370
16376
  return new _Pruner(tree);
16371
16377
  }
16372
16378
  tree;
16373
16379
  constructor(tree) {
16374
- this.tree = structuredClone(tree);
16380
+ this.tree = tree;
16375
16381
  }
16376
16382
  keep(predicate) {
16377
16383
  if (this.tree == null) {