UNPKG

@skillpet/circuit

Version:

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

16 lines (15 loc) 694 B
/** * Implicit `add` stack — aligned with Python `drawing_stack.py`. */ import type { Element } from "./element.js"; export type DrawingLike = { add(el: Element): unknown; containsElement(el: Element): boolean; }; export declare const drawingStack: Map<DrawingLike, Element | null>; export declare let pause: boolean; /** Temporarily pause implicit `pushElement` (e.g. `ElementCompound` children). Returns previous value. */ export declare function swapPause(value: boolean): boolean; export declare function pushDrawing(drawing: DrawingLike): void; export declare function popDrawing(drawing: DrawingLike): void; export declare function pushElement(element: Element | null): void;