circuit-to-svg 0.0.197 → 0.0.199
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +37 -5
- package/dist/index.js +1166 -144
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ interface PcbColorOverrides {
|
|
|
31
31
|
debugComponent?: Partial<PcbColorMap["debugComponent"]>;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
interface Options$
|
|
34
|
+
interface Options$4 {
|
|
35
35
|
colorOverrides?: PcbColorOverrides;
|
|
36
36
|
width?: number;
|
|
37
37
|
height?: number;
|
|
@@ -50,13 +50,13 @@ interface PcbContext {
|
|
|
50
50
|
drawPaddingOutsideBoard?: boolean;
|
|
51
51
|
colorMap: PcbColorMap;
|
|
52
52
|
}
|
|
53
|
-
declare function convertCircuitJsonToPcbSvg(circuitJson: AnyCircuitElement[], options?: Options$
|
|
53
|
+
declare function convertCircuitJsonToPcbSvg(circuitJson: AnyCircuitElement[], options?: Options$4): string;
|
|
54
54
|
/**
|
|
55
55
|
* @deprecated use `convertCircuitJsonToPcbSvg` instead
|
|
56
56
|
*/
|
|
57
57
|
declare const circuitJsonToPcbSvg: typeof convertCircuitJsonToPcbSvg;
|
|
58
58
|
|
|
59
|
-
interface Options$
|
|
59
|
+
interface Options$3 {
|
|
60
60
|
width?: number;
|
|
61
61
|
height?: number;
|
|
62
62
|
includeVersion?: boolean;
|
|
@@ -64,7 +64,39 @@ interface Options$2 {
|
|
|
64
64
|
interface AssemblySvgContext {
|
|
65
65
|
transform: Matrix;
|
|
66
66
|
}
|
|
67
|
-
declare function convertCircuitJsonToAssemblySvg(soup: AnyCircuitElement[], options?: Options$
|
|
67
|
+
declare function convertCircuitJsonToAssemblySvg(soup: AnyCircuitElement[], options?: Options$3): string;
|
|
68
|
+
|
|
69
|
+
type LabelPosition = {
|
|
70
|
+
text: string;
|
|
71
|
+
aliases: string[];
|
|
72
|
+
elbow_end: {
|
|
73
|
+
x: number;
|
|
74
|
+
y: number;
|
|
75
|
+
};
|
|
76
|
+
label_pos: {
|
|
77
|
+
x: number;
|
|
78
|
+
y: number;
|
|
79
|
+
};
|
|
80
|
+
edge: "left" | "right" | "top" | "bottom";
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
interface Options$2 {
|
|
84
|
+
width?: number;
|
|
85
|
+
height?: number;
|
|
86
|
+
includeVersion?: boolean;
|
|
87
|
+
}
|
|
88
|
+
interface PinoutSvgContext {
|
|
89
|
+
transform: Matrix;
|
|
90
|
+
soup: AnyCircuitElement[];
|
|
91
|
+
board_bounds: {
|
|
92
|
+
minX: number;
|
|
93
|
+
minY: number;
|
|
94
|
+
maxX: number;
|
|
95
|
+
maxY: number;
|
|
96
|
+
};
|
|
97
|
+
label_positions: Map<string, LabelPosition>;
|
|
98
|
+
}
|
|
99
|
+
declare function convertCircuitJsonToPinoutSvg(soup: AnyCircuitElement[], options?: Options$2): string;
|
|
68
100
|
|
|
69
101
|
declare const colorMap: {
|
|
70
102
|
"3d_viewer": {
|
|
@@ -269,4 +301,4 @@ declare const createSvgObjectsForSchComponentPortHovers: ({ component, transform
|
|
|
269
301
|
circuitJson: AnyCircuitElement[];
|
|
270
302
|
}) => INode[];
|
|
271
303
|
|
|
272
|
-
export { type AssemblySvgContext, CIRCUIT_TO_SVG_VERSION, type ColorMap, type ColorOverrides, type PcbColorMap, type PcbColorOverrides, type PcbContext, circuitJsonToPcbSvg, circuitJsonToSchematicSvg, convertCircuitJsonToAssemblySvg, convertCircuitJsonToPcbSvg, convertCircuitJsonToSchematicSvg, convertCircuitJsonToSolderPasteMask, createSvgObjectsForSchComponentPortHovers, getSoftwareUsedString };
|
|
304
|
+
export { type AssemblySvgContext, CIRCUIT_TO_SVG_VERSION, type ColorMap, type ColorOverrides, type PcbColorMap, type PcbColorOverrides, type PcbContext, type PinoutSvgContext, circuitJsonToPcbSvg, circuitJsonToSchematicSvg, convertCircuitJsonToAssemblySvg, convertCircuitJsonToPcbSvg, convertCircuitJsonToPinoutSvg, convertCircuitJsonToSchematicSvg, convertCircuitJsonToSolderPasteMask, createSvgObjectsForSchComponentPortHovers, getSoftwareUsedString };
|