//#region src/layoutEngine.d.ts /** * The LayoutEngine seam (DESIGN.md §3.2): determinism demands the SAME layout * engine in browser preview and headless export, so layout never delegates to * the platform. Yoga implements this interface in the separately-budgeted * '@glissade/scene/layout' entry; the seam keeps Taffy adoptable later and * the base embed path free of wasm. */ interface LayoutBox { x: number; y: number; width: number; height: number; } interface LayoutChildSpec { width: number; height: number; grow?: number; margin?: number; } interface LayoutContainerSpec { /** 'auto': size the axis from content (Yoga computes it). */ width: number | 'auto'; height: number | 'auto'; direction: 'row' | 'column'; gap: number; padding: number; justify: 'start' | 'center' | 'end' | 'space-between' | 'space-around'; align: 'start' | 'center' | 'end' | 'stretch'; } interface LayoutResult { /** Resolved container size — equals the spec on fixed axes, content-driven on 'auto'. */ width: number; height: number; /** Child boxes (top-left relative to the container's top-left). */ boxes: LayoutBox[]; } interface LayoutEngine { /** Pure: resolved container size + child boxes. */ compute(container: LayoutContainerSpec, children: LayoutChildSpec[]): LayoutResult; } declare class LayoutEngineMissingError extends Error { constructor(); } declare function setLayoutEngine(e: LayoutEngine): void; declare function getLayoutEngine(): LayoutEngine | null; declare function requireLayoutEngine(): LayoutEngine; //#endregion export { LayoutEngineMissingError as a, requireLayoutEngine as c, LayoutEngine as i, setLayoutEngine as l, LayoutChildSpec as n, LayoutResult as o, LayoutContainerSpec as r, getLayoutEngine as s, LayoutBox as t };