circuit-to-svg 0.0.164 → 0.0.166

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 CHANGED
@@ -72,6 +72,11 @@ writeFileSync('board.svg', pcbSvg)
72
72
 
73
73
  Converts a schematic circuit description to an SVG string.
74
74
 
75
+ #### Options
76
+
77
+ - `includeVersion` – if `true`, add a `data-circuit-to-svg-version` attribute to
78
+ the root `<svg>`.
79
+
75
80
  ### convertCircuitJsonToPcbSvg
76
81
 
77
82
  `convertCircuitJsonToPcbSvg(circuitJson: AnyCircuitElement[], options?): string`
@@ -87,6 +92,8 @@ Converts a PCB layout description to an SVG string.
87
92
  `"#000"`.
88
93
  - `drawPaddingOutsideBoard` – if `false`, omit the board outline and extra
89
94
  padding around it. Defaults to `true`.
95
+ - `includeVersion` – if `true`, add a `data-circuit-to-svg-version` attribute to
96
+ the root `<svg>`.
90
97
 
91
98
  ### convertCircuitJsonToAssemblySvg
92
99
 
@@ -97,6 +104,8 @@ Converts circuit JSON into an assembly view of the board and components.
97
104
  #### Options
98
105
 
99
106
  - `width` and `height` – dimensions of the output SVG. Defaults to `800x600`.
107
+ - `includeVersion` – if `true`, add a `data-circuit-to-svg-version` attribute to
108
+ the root `<svg>`.
100
109
 
101
110
  ## Contributing
102
111
 
package/dist/index.d.ts CHANGED
@@ -40,6 +40,7 @@ interface Options$3 {
40
40
  matchBoardAspectRatio?: boolean;
41
41
  backgroundColor?: string;
42
42
  drawPaddingOutsideBoard?: boolean;
43
+ includeVersion?: boolean;
43
44
  }
44
45
  interface PcbContext {
45
46
  transform: Matrix;
@@ -57,6 +58,7 @@ declare const circuitJsonToPcbSvg: typeof convertCircuitJsonToPcbSvg;
57
58
  interface Options$2 {
58
59
  width?: number;
59
60
  height?: number;
61
+ includeVersion?: boolean;
60
62
  }
61
63
  interface AssemblySvgContext {
62
64
  transform: Matrix;
@@ -239,6 +241,7 @@ interface Options$1 {
239
241
  y: number;
240
242
  label: string;
241
243
  }>;
244
+ includeVersion?: boolean;
242
245
  }
243
246
  declare function convertCircuitJsonToSchematicSvg(circuitJson: AnyCircuitElement[], options?: Options$1): string;
244
247
  /**
@@ -250,9 +253,12 @@ interface Options {
250
253
  layer: "top" | "bottom";
251
254
  width?: number;
252
255
  height?: number;
256
+ includeVersion?: boolean;
253
257
  }
254
258
  declare function convertCircuitJsonToSolderPasteMask(circuitJson: AnyCircuitElement[], options: Options): string;
255
259
 
256
260
  declare function getSoftwareUsedString(circuitJson: AnyCircuitElement[]): string | undefined;
257
261
 
258
- export { type AssemblySvgContext, type ColorMap, type ColorOverrides, type PcbColorMap, type PcbColorOverrides, type PcbContext, circuitJsonToPcbSvg, circuitJsonToSchematicSvg, convertCircuitJsonToAssemblySvg, convertCircuitJsonToPcbSvg, convertCircuitJsonToSchematicSvg, convertCircuitJsonToSolderPasteMask, getSoftwareUsedString };
262
+ declare const CIRCUIT_TO_SVG_VERSION: string;
263
+
264
+ export { type AssemblySvgContext, CIRCUIT_TO_SVG_VERSION, type ColorMap, type ColorOverrides, type PcbColorMap, type PcbColorOverrides, type PcbContext, circuitJsonToPcbSvg, circuitJsonToSchematicSvg, convertCircuitJsonToAssemblySvg, convertCircuitJsonToPcbSvg, convertCircuitJsonToSchematicSvg, convertCircuitJsonToSolderPasteMask, getSoftwareUsedString };