UNPKG

@skillpet/circuit

Version:

Circuit diagram library — render electrical schematics from JSON, with interactive SVG, themes, and Vue/React components

92 lines (91 loc) 2.9 kB
/** * Flowchart primitives — aligned with Python `flow/flow.py` (major classes). */ import { Element } from "../element.js"; import type { XY } from "../geometry/point.js"; /** Python `Box._set_anchors` — 16 compass points on a rectangle `w`×`h`. */ export declare function setBoxAnchors16(anchors: Record<string, XY>, w: number, h: number): void; /** Process box with rounded corners (`flow.RoundBox`). */ export declare class RoundBox extends Element { constructor(userParams?: Record<string, unknown> & { w?: number; h?: number; cornerradius?: number; }); } /** Start/end terminal (pill shape); `cornerradius` becomes `h/2`. */ export declare class Terminal extends RoundBox { constructor(userParams?: Record<string, unknown> & { w?: number; h?: number; }); } /** Alias for Python `RoundProcess`. */ export declare const RoundProcess: typeof RoundBox; /** Process box (rectangle). */ export declare class FlowBox extends Element { constructor(userParams?: Record<string, unknown> & { w?: number; h?: number; }); } /** Python `Process` — same as `FlowBox`. */ export declare const Process: typeof FlowBox; /** Python `Start` — same as `Terminal`. */ export declare const Start: typeof Terminal; /** Subroutine / predefined process box with side bars. */ export declare class Subroutine extends Element { constructor(userParams?: Record<string, unknown> & { w?: number; h?: number; s?: number; }); } /** Parallelogram (data / I/O). */ export declare class Data extends Element { constructor(userParams?: Record<string, unknown> & { w?: number; h?: number; slant?: number; }); } /** Ellipse outline (sampled polygon). */ export declare class Ellipse extends Element { constructor(userParams?: Record<string, unknown> & { w?: number; h?: number; }); } /** Diamond decision; optional branch labels `N`/`E`/`S`/`W` (Python keywords). */ export declare class Decision extends Element { constructor(userParams?: Record<string, unknown> & { w?: number; h?: number; N?: string; E?: string; S?: string; W?: string; fontsize?: number; font?: string; }); } /** Connector circle (`flow.Connect`). */ export declare class Connect extends Element { constructor(userParams?: Record<string, unknown> & { w?: number; h?: number; r?: number; }); } /** Python `Circle` / `State` — same as `Connect`. */ export declare const Circle: typeof Connect; export declare const State: typeof Connect; /** Double circle (accept / end state). */ export declare class StateEnd extends Connect { constructor(userParams?: Record<string, unknown> & { dr?: number; w?: number; h?: number; r?: number; }); }