import type { App } from '../App'; import type { Node } from '../Node'; import type { EventType, LightDrawEvent, SceneJSON } from '../types'; export declare function clamp(v: number, min: number, max: number): number; export type ComponentState = Record; export declare function getState(node: Node): ComponentState; export declare function setState(node: Node, patch: ComponentState): void; /** Minimal synthetic event for component state changes (Phase 6). */ export declare function syntheticEvent(type: EventType, target: unknown, extra?: Partial): LightDrawEvent; export declare function emitChange(node: Node, value: unknown, field?: string): void; export declare function componentToJSON(node: Node): SceneJSON; export declare function bindApp(node: Node, app: App): void; export declare function num(props: Record, key: string, fallback: number): number; export declare function str(props: Record, key: string, fallback?: string): string; export declare function bool(props: Record, key: string, fallback?: boolean): boolean; export declare function getParts(node: Node): Record; export declare function setParts(node: Node, parts: Record): void;