@skillpet/circuit
Version:
Circuit diagram library — render electrical schematics from JSON, with interactive SVG, themes, and Vue/React components
22 lines (21 loc) • 1.01 kB
TypeScript
import { type CSSProperties } from "react";
import { type CircuitJson, type RenderOptions, type SchemdrawController, type ElementInfo, type CanvasPoint } from "../index.js";
export interface CircuitDiagramProps {
circuit: CircuitJson;
options?: RenderOptions;
interactive?: boolean;
className?: string;
style?: CSSProperties;
onElementClick?: (info: ElementInfo) => void;
onElementHover?: (info: ElementInfo) => void;
onElementLeave?: (info: ElementInfo) => void;
onElementSelect?: (info: ElementInfo | null) => void;
onCanvasClick?: (pt: CanvasPoint) => void;
onReady?: (ctrl: SchemdrawController) => void;
}
export declare function CircuitDiagram(props: CircuitDiagramProps): import("react").DetailedReactHTMLElement<{
ref: import("react").RefObject<HTMLDivElement | null>;
className: string | undefined;
style: CSSProperties | undefined;
}, HTMLDivElement>;
export type { CircuitJson, RenderOptions, SchemdrawController, ElementInfo, CanvasPoint };