asciitorium
Version:
an ASCII CLUI framework
31 lines (30 loc) • 930 B
TypeScript
import type { Component } from '../Component.js';
/**
* Interface for layouts that handle child component positioning
*/
export interface Layout {
/**
* Calculate positions and sizes for child components
* @param parent The parent component containing the children
* @param children Array of child components to layout
*/
layout(parent: Component, children: Component[]): void;
}
/**
* Available layout types that can be specified by name
*/
export type LayoutType = 'row' | 'column';
/**
* Configuration options for specific layouts
*/
export interface LayoutOptions {
}
/**
* Registry of available layouts
*/
export declare class LayoutRegistry {
private static layouts;
static register(type: LayoutType, layoutClass: new (options?: LayoutOptions) => Layout): void;
static create(type: LayoutType, options?: LayoutOptions): Layout;
static getAvailableTypes(): LayoutType[];
}