/** * Self-healing for persisted layout trees — pure TS (no react/electron). * * A FLEXIBLE child (`constraints[i]` null / no constraints) has no enforced * lower weight bound in the serialized tree: `validateTree` only rejects * NON-FINITE sizes, not non-positive ones. A user who dragged a flexible panel * to ~0 width writes a ~0 (or 0, or negative) weight into the tree; on the next * restore that panel comes back at 0 width, invisible and effectively stuck. * * `sanitizeFlexibleWeights` heals such a tree: every flexible child whose weight * is NON-POSITIVE (≤ 0 or non-finite) is lifted to a minimum positive weight, so * a restored panel is always visible. A small-but-POSITIVE weight is left as-is * — weights are a relative ratio (any positive scale is valid), so a tiny * positive weight is healthy, not collapsed. PX-SIZED children * (`fixedPx`/`minPx`) are sized in pixels, NOT weights — their `sizes[i]` entry * is a preserved-but-unused placeholder — so they are left untouched. The * function is pure (clone-on-write, never mutates the input). */ import type { LayoutTree } from './types.js'; /** * Return a tree in which every FLEXIBLE child with a non-positive (≤ tiny * threshold) weight is healed to a minimum positive weight, recursively. Px * children are untouched. Pure: the input is never mutated; a fully-healthy tree * is returned structurally unchanged (same weights). */ export declare function sanitizeFlexibleWeights(tree: LayoutTree): LayoutTree; //# sourceMappingURL=sanitize.d.ts.map