// Declarative shape components. These never render a native view themselves — // they are descriptors that collects into a scene. Each carries a // static `shapeType` marker so can identify it. export interface RectProps { x?: number y?: number width: number height: number /** Corner radii (rounded rect). */ rx?: number ry?: number /** Omit `fill` for a borders-only rectangle. */ fill?: string stroke?: string strokeWidth?: number } export function Rect(_props: RectProps): null { return null } Rect.shapeType = 'rect' as const export interface CircleProps { cx: number cy: number radius: number fill?: string stroke?: string strokeWidth?: number } export function Circle(_props: CircleProps): null { return null } Circle.shapeType = 'circle' as const export interface LineProps { x1: number y1: number x2: number y2: number stroke: string strokeWidth?: number } export function Line(_props: LineProps): null { return null } Line.shapeType = 'line' as const export interface PolygonProps { /** Flattened [x0, y0, x1, y1, ...] vertices. */ points: number[] fill?: string stroke?: string strokeWidth?: number /** Whether to close the path back to the first point (default true). */ closed?: boolean } export function Polygon(_props: PolygonProps): null { return null } Polygon.shapeType = 'polygon' as const