/** * ZUI Component * Base component class for all ZUI components */ import type { BaseProps, ComponentInstance, LayoutProps, Rect, Widget, WidgetOptions, WidgetType, Padding, PaddingInput, EventCallback } from './types'; import { EventEmitter } from './EventEmitter'; /** * Normalize padding input to full Padding object */ export declare function normalizePadding(input?: PaddingInput): Padding; /** * Abstract base component class */ export declare abstract class Component
implements ComponentInstance { readonly id: string; abstract readonly type: string; protected _props: P; protected _children: Component[]; protected _parent: Component | null; protected _widgets: Widget[]; protected _rect: Rect; protected _mounted: boolean; protected _events: EventEmitter; constructor(props: P); /** * Get default props for the component */ protected getDefaultProps(): Partial
;
/**
* Get current props
*/
get props(): P;
/**
* Get child components
*/
get children(): Component[];
/**
* Get parent component
*/
get parent(): Component | null;
/**
* Get underlying widgets
*/
get widgets(): Widget[];
/**
* Check if component is mounted
*/
get isMounted(): boolean;
/**
* Get computed layout rect
*/
getRect(): Rect;
/**
* Set component rect
*/
setRect(rect: Partial ): void;
/**
* Add a child component
*/
addChild(child: Component): void;
/**
* Remove a child component
*/
removeChild(child: Component): void;
/**
* Remove all children
*/
clearChildren(): void;
/**
* Mount the component and its children
*/
mount(parentRect?: Rect): void;
/**
* Update the component
*/
update(): void;
/**
* Destroy and cleanup component
*/
destroy(): void;
/**
* Subscribe to component events
*/
on extends Component {
constructor(props: P);
protected getDefaultProps(): Partial ;
}
/**
* Widget type mapping
*/
export declare const WIDGET_TYPES: Record