circuit-to-svg 0.0.228 → 0.0.230
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/README.md +5 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +524 -207
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -102,7 +102,11 @@ const pcbSvg = convertCircuitJsonToPcbSvg(circuitJson, {
|
|
|
102
102
|
`"#000"`.
|
|
103
103
|
- `drawPaddingOutsideBoard` – if `false`, omit the board outline and extra
|
|
104
104
|
padding around it. Defaults to `true`.
|
|
105
|
-
- `shouldDrawErrors` – if `true`, display visual error indicators (red diamonds with text) for
|
|
105
|
+
- `shouldDrawErrors` – if `true`, display visual error indicators (red diamonds with text) for error elements in the circuit JSON. Supports:
|
|
106
|
+
- `pcb_trace_error` – errors related to PCB traces
|
|
107
|
+
- `pcb_footprint_overlap_error` – errors for overlapping pads, plated holes, and holes (displays error indicators at each affected element with connecting lines)
|
|
108
|
+
|
|
109
|
+
Defaults to `false`.
|
|
106
110
|
- `includeVersion` – if `true`, add a `data-circuit-to-svg-version` attribute to
|
|
107
111
|
the root `<svg>`.
|
|
108
112
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,13 @@ import { AnyCircuitElement, PcbPort, SchematicComponent } from 'circuit-json';
|
|
|
2
2
|
import { Matrix } from 'transformation-matrix';
|
|
3
3
|
import { INode } from 'svgson';
|
|
4
4
|
|
|
5
|
+
interface PcbGridOptions {
|
|
6
|
+
cellSize: number;
|
|
7
|
+
lineColor?: string;
|
|
8
|
+
majorCellSize?: number;
|
|
9
|
+
majorLineColor?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
5
12
|
type CopperLayerName = "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
6
13
|
type CopperColorMap = Record<CopperLayerName, string> & {
|
|
7
14
|
[layer: string]: string;
|
|
@@ -44,6 +51,7 @@ interface Options$4 {
|
|
|
44
51
|
drawPaddingOutsideBoard?: boolean;
|
|
45
52
|
includeVersion?: boolean;
|
|
46
53
|
renderSolderMask?: boolean;
|
|
54
|
+
grid?: PcbGridOptions;
|
|
47
55
|
}
|
|
48
56
|
interface PcbContext {
|
|
49
57
|
transform: Matrix;
|