@skillpet/circuit
Version:
Circuit diagram library — render electrical schematics from JSON, with interactive SVG, themes, and Vue/React components
32 lines (31 loc) • 1.19 kB
TypeScript
/**
* Grouping box — aligned with Python `elements/container.py` (subset).
*/
import type { BBox } from "./types.js";
import { Element } from "./element.js";
import type { Drawing } from "./drawing.js";
export declare class Container extends Element {
readonly parent: Drawing | Container;
readonly inner: Element[];
constructor(parent: Drawing | Container, userParams?: Record<string, unknown>);
/**
* Nested container (Python `Container.container()`).
*/
container(opts?: {
cornerradius?: number;
padx?: number;
pady?: number;
}): Container;
add(el: Element): Element;
containsElement(el: Element): boolean;
enter(): void;
exit(): void;
containerBBox(transform?: boolean): BBox;
getBBox(transform: boolean, _includetext?: boolean): BBox;
_place(dwgxy: import("./geometry/point.js").XY, dwgtheta: number, dwgparams: Record<string, unknown>): {
point: import("./geometry/point.js").Point;
theta: number;
};
}
/** Parent for {@link Container} — {@link Drawing} or nested {@link Container} (Python `Union[Drawing, Container]`). */
export type ContainerParent = Drawing | Container;