import { U as NodeProps, V as Node, o as Group } from "./nodes.js"; //#region src/grid.d.ts declare class GridError extends Error { constructor(message: string); } /** * A single column track. A bare number is a FIXED px width; `{ fr }` is a * flexible track that shares the leftover width (after fixed tracks + gaps) * proportionally — the CSS `fr` unit. The array form `columns: [1, { fr: 1 }, …]` * mixes them; the scalar form `columns: 3` is sugar for three equal `{ fr: 1 }`. */ type GridTrack = number | { fr: number; }; interface GridProps extends NodeProps { /** * Column tracks. A number N is sugar for N equal `fr` columns; an array spells * each track (`5` = 5px fixed, `{ fr: 2 }` = a 2-fraction flexible track). */ columns: number | readonly GridTrack[]; /** The nodes to place, row-major (child[i] → row floor(i/cols), col i%cols). */ children?: Node[]; /** Gap between columns AND rows (px). Overridden per-axis by columnGap/rowGap. */ gap?: number; /** Horizontal gap between columns (px). Defaults to `gap`. */ columnGap?: number; /** Vertical gap between rows (px). Defaults to `gap`. */ rowGap?: number; /** * Total content width the tracks divide (px). REQUIRED when any `fr` track is * present (an `fr` needs a total to resolve against). Fixed-only track lists * may omit it — the width is then the sum of the fixed tracks + gaps. */ width?: number; /** * Row pitch (px) — the center-to-center distance between rows is * `cellHeight + rowGap`. REQUIRED when the children span more than one row. * (v1 is position-only, so the grid does not measure child heights.) */ cellHeight?: number; /** * Stretch each child to fill its cell (0.25): sets the child's `width` to its * resolved column-track width and, when `cellHeight` is given, its `height` to * `cellHeight` — a plain `signal.set`, so a later explicit bind still wins. * Only children that expose a settable `width`/`height` signal (Rect/Image) are * sized; others (Circle/Text/Path) keep their own size and are just positioned. * Default false (position-only, byte-identical to v1). */ stretch?: boolean; } /** * Lay `children` out into a column grid and return a `Group` holding them, each * repositioned to its cell center. Center-anchored: the grid's own origin is the * center of its content box, so child positions are symmetric about [0, 0] * (matching every other glissade node's center-anchor convention). * * The children are NOT cloned — their `position` signal is SET to the resolved * cell center (a plain `signal.set`, so a later bind still wins if the author * rebinds it). Pass freshly constructed nodes for a clean, deterministic layout. */ declare function Grid(props: GridProps): Group; //#endregion export { Grid, GridError, GridProps, GridTrack };