/** * Flex Layout - items flow in a direction (row or column) * * Use case: Button rows, vertical lists, toolbars * Features: auto-spacing, grow/shrink, alignment */ export function beginFlex(x: any, y: any, w: any, h: any, direction?: string, options?: {}): FlexLayout; /** * Grid Layout - cells in rows and columns * * Use case: Forms, settings panels, game boards * Features: fixed/proportional sizing, row/column spanning */ export function beginGrid(x: any, y: any, w: any, h: any, rows: any, cols: any, options?: {}): GridLayout; /** * Helper: Calculate optimal grid dimensions for N items */ export function calcGridDimensions(itemCount: any, preferredCols?: any): { rows: number; cols: any; }; declare class FlexLayout { constructor(x: any, y: any, w: any, h: any, direction: any, options: any); x: any; y: any; w: any; h: any; direction: any; gap: any; padding: any; align: any; justify: any; currentX: any; currentY: any; items: any[]; availableSpace: number; /** * Add item to layout * @param {Object} options - { w, h, grow, shrink, basis } * @returns {Object} - { x, y, w, h } bounds for this item */ addItem(options?: any): any; /** * Calculate final layout and assign bounds to all items * Must be called after all addItem() calls */ layout(): void; _positionItems(): void; /** * Get bounds array for all items (call after layout()) */ getBounds(): { x: any; y: any; w: any; h: any; }[]; } declare class GridLayout { constructor(x: any, y: any, w: any, h: any, rows: any, cols: any, options: any); x: any; y: any; w: any; h: any; rows: any; cols: any; gap: any; padding: any; rowHeights: any; colWidths: any; occupied: any[]; _calculateCellSizes(): void; calculatedColWidths: any[]; calculatedRowHeights: any[]; /** * Get cell bounds * @param {number} row - row index (0-based) * @param {number} col - column index (0-based) * @param {number} rowSpan - number of rows to span (default 1) * @param {number} colSpan - number of columns to span (default 1) * @returns {Object} - { x, y, w, h } */ cell(row: number, col: number, rowSpan?: number, colSpan?: number): any; /** * Get next available cell (auto-flow) */ nextCell(): any; } export {};