UNPKG

@skillpet/circuit

Version:

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

39 lines (38 loc) 1.42 kB
/** * Schemdraw-style literals (aligned with Python `schemdraw/types.py`). */ export type Capstyle = "butt" | "round" | "square" | "projecting"; export type Joinstyle = "bevel" | "miter" | "round"; export type Linestyle = "-" | ":" | "--" | "-." | "None"; export type Halign = "center" | "left" | "right"; export type Valign = "center" | "top" | "bottom" | "base"; export type Arcdirection = "cw" | "ccw"; export type EndRef = "start" | "end"; export type Backends = "svg" | "matplotlib"; export type RotationMode = "anchor" | "default"; export type TextMode = "path" | "text"; /** Axis-aligned bounding box (drawing units). */ export type BBox = { readonly xmin: number; readonly ymin: number; readonly xmax: number; readonly ymax: number; }; export declare function bbox(xmin: number, ymin: number, xmax: number, ymax: number): BBox; /** Gradient: color1, color2, vertical flag. */ export type Gradient = readonly [string, string, boolean]; /** Python `schemdraw.types.ImageFormat` — matplotlib / save formats (TS 仅 SVG 管线常用 `svg`). */ export declare enum ImageFormat { EPS = "eps", JPG = "jpg", PDF = "pdf", PGF = "pgf", PNG = "png", PS = "ps", RAW = "raw", RGBA = "rgba", SVG = "svg", TIF = "tif" } /** Python `ImageType` literal union. */ export type ImageType = "eps" | "jpg" | "pdf" | "pgf" | "png" | "ps" | "raw" | "rgba" | "svg" | "tif";