@skillpet/circuit
Version:
Circuit diagram library — render electrical schematics from JSON, with interactive SVG, themes, and Vue/React components
18 lines (17 loc) • 984 B
TypeScript
/**
* Drawing style validation — aligned with Python `schemdraw/style.py` (SVG / non-matplotlib branch).
*/
/** https://developer.mozilla.org/en-US/docs/Web/CSS/named-color — same list as Python `NAMED_COLORS`. */
export declare const NAMED_COLORS: readonly string[];
export declare function colorHex(color: string): boolean;
export declare function colorRgb(color: string): boolean;
export declare function colorRgba(color: string): boolean;
export declare function colorHsl(color: string): boolean;
export declare function colorHsla(color: string): boolean;
export declare function dasharray(ls: string): boolean;
/**
* Python `validate_color` — raise if not a valid CSS color (SVG backend rules).
*/
export declare function validateColor(color: string | boolean | readonly [number, number, number] | null | undefined): void;
/** Python `validate_linestyle` — raise if not a valid line style or dasharray. */
export declare function validateLinestyle(ls: string): void;