circuit-to-svg 0.0.212 → 0.0.213

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
@@ -51,7 +51,7 @@ Explore the API sections below to render PCB, assembly, pinout, simulation, and
51
51
 
52
52
  ## API
53
53
 
54
- ### convertCircuitJsonToSchematicSvg
54
+ ## convertCircuitJsonToSchematicSvg
55
55
 
56
56
  `convertCircuitJsonToSchematicSvg(circuitJson: AnyCircuitElement[], options?): string`
57
57
 
@@ -65,9 +65,9 @@ const schematicSvg = convertCircuitJsonToSchematicSvg(circuitJson, {
65
65
  })
66
66
  ```
67
67
 
68
- ![Schematic grid snapshot](./tests/sch/__snapshots__/grid-and-points.snap.svg)
68
+ ![Schematic grid snapshot](./tests/sch/__snapshots__/rp2040.snap.svg)
69
69
 
70
- #### Options
70
+ ### Options
71
71
 
72
72
  - `width` and `height` – dimensions of the output SVG. Defaults to `1200x600`.
73
73
  - `grid` – enable a schematic grid (`true`) or configure cell size and labels.
@@ -76,7 +76,7 @@ const schematicSvg = convertCircuitJsonToSchematicSvg(circuitJson, {
76
76
  - `includeVersion` – if `true`, add a `data-circuit-to-svg-version` attribute to
77
77
  the root `<svg>`.
78
78
 
79
- ### convertCircuitJsonToPcbSvg
79
+ ## convertCircuitJsonToPcbSvg
80
80
 
81
81
  `convertCircuitJsonToPcbSvg(circuitJson: AnyCircuitElement[], options?): string`
82
82
 
@@ -93,7 +93,7 @@ const pcbSvg = convertCircuitJsonToPcbSvg(circuitJson, {
93
93
 
94
94
  ![PCB default snapshot](./tests/pcb/__snapshots__/default.snap.svg)
95
95
 
96
- #### Options
96
+ ### Options
97
97
 
98
98
  - `width` and `height` – dimensions of the output SVG. Defaults to `800x600`.
99
99
  - `matchBoardAspectRatio` – if `true`, adjust the SVG dimensions so the
@@ -105,9 +105,7 @@ const pcbSvg = convertCircuitJsonToPcbSvg(circuitJson, {
105
105
  - `includeVersion` – if `true`, add a `data-circuit-to-svg-version` attribute to
106
106
  the root `<svg>`.
107
107
 
108
- ### convertCircuitJsonToAssemblySvg
109
-
110
- `convertCircuitJsonToAssemblySvg(circuitJson: AnyCircuitElement[], options?): string`
108
+ ## convertCircuitJsonToAssemblySvg
111
109
 
112
110
  Converts circuit JSON into an assembly view of the board and components.
113
111
 
@@ -121,15 +119,13 @@ const assemblySvg = convertCircuitJsonToAssemblySvg(circuitJson, {
121
119
 
122
120
  ![Assembly board snapshot](./tests/assembly/__snapshots__/first-assembly-test.snap.svg)
123
121
 
124
- #### Options
122
+ ### Options
125
123
 
126
124
  - `width` and `height` – dimensions of the output SVG. Defaults to `800x600`.
127
125
  - `includeVersion` – if `true`, add a `data-circuit-to-svg-version` attribute to
128
126
  the root `<svg>`.
129
127
 
130
- ### convertCircuitJsonToPinoutSvg
131
-
132
- `convertCircuitJsonToPinoutSvg(circuitJson: AnyCircuitElement[], options?): string`
128
+ ## convertCircuitJsonToPinoutSvg
133
129
 
134
130
  Generates pinout diagrams that call out ports, pads, and holes for boards or modules.
135
131
 
@@ -139,26 +135,15 @@ import { convertCircuitJsonToPinoutSvg } from 'circuit-to-svg'
139
135
  const pinoutSvg = convertCircuitJsonToPinoutSvg(circuitJson)
140
136
  ```
141
137
 
142
- ![Pinout snapshot](./tests/pinout/__snapshots__/pinout-basic.snap.svg)
138
+ ![Pinout snapshot](./tests/pinout/__snapshots__/pinout-pico.snap.svg)
143
139
 
144
- #### Options
140
+ ### Options
145
141
 
146
142
  - `width` and `height` – dimensions of the output SVG. Defaults to `800x600`.
147
143
  - `includeVersion` – if `true`, add a `data-circuit-to-svg-version` attribute to
148
144
  the root `<svg>`.
149
145
 
150
- ### convertCircuitJsonToSchematicSimulationSvg
151
-
152
- `convertCircuitJsonToSchematicSimulationSvg({
153
- circuitJson,
154
- simulation_experiment_id,
155
- simulation_transient_voltage_graph_ids?,
156
- width?,
157
- height?,
158
- schematicHeightRatio?,
159
- schematicOptions?,
160
- includeVersion?,
161
- }): string`
146
+ ## convertCircuitJsonToSchematicSimulationSvg
162
147
 
163
148
  Overlays simulation results directly on the rendered schematic for easy debugging.
164
149
 
@@ -175,7 +160,7 @@ const schematicSimulationSvg = convertCircuitJsonToSchematicSimulationSvg({
175
160
 
176
161
  ![Schematic simulation snapshot](./tests/sim/__snapshots__/schematic-simulation-combined.snap.svg)
177
162
 
178
- #### Options
163
+ ### Options
179
164
 
180
165
  - `width` and `height` – overall SVG dimensions. Defaults to `1200x1200`.
181
166
  - `schematicHeightRatio` – ratio of the SVG dedicated to the schematic view. Defaults to `0.55`.
@@ -183,16 +168,7 @@ const schematicSimulationSvg = convertCircuitJsonToSchematicSimulationSvg({
183
168
  - `includeVersion` – if `true`, add a `data-circuit-to-svg-version` attribute to
184
169
  the root `<svg>`.
185
170
 
186
- ### convertCircuitJsonToSimulationGraphSvg
187
-
188
- `convertCircuitJsonToSimulationGraphSvg({
189
- circuitJson,
190
- simulation_experiment_id,
191
- simulation_transient_voltage_graph_ids?,
192
- width?,
193
- height?,
194
- includeVersion?,
195
- }): string`
171
+ ## convertCircuitJsonToSimulationGraphSvg
196
172
 
197
173
  Creates standalone graphs for circuit simulation experiments.
198
174
 
@@ -208,13 +184,13 @@ const simulationGraphSvg = convertCircuitJsonToSimulationGraphSvg({
208
184
 
209
185
  ![Simulation graph snapshot](./tests/sim/__snapshots__/simulation-graph.snap.svg)
210
186
 
211
- #### Options
187
+ ### Options
212
188
 
213
189
  - `width` and `height` – SVG dimensions for the graph. Defaults to `1200x600`.
214
190
  - `includeVersion` – if `true`, add a `data-circuit-to-svg-version` attribute to
215
191
  the root `<svg>`.
216
192
 
217
- ### convertCircuitJsonToSolderPasteMask
193
+ ## convertCircuitJsonToSolderPasteMask
218
194
 
219
195
  `convertCircuitJsonToSolderPasteMask(circuitJson: AnyCircuitElement[], options: { layer: 'top' | 'bottom'; width?; height?; includeVersion? }): string`
220
196
 
@@ -230,7 +206,7 @@ const solderPasteMaskSvg = convertCircuitJsonToSolderPasteMask(circuitJson, {
230
206
 
231
207
  ![Solder paste snapshot](./tests/pcb/__snapshots__/solder-paste.test.tsx.top.snap.svg)
232
208
 
233
- #### Options
209
+ ### Options
234
210
 
235
211
  - `layer` – `'top' | 'bottom'`, chooses which solder paste layer to render. Defaults to `'top'`.
236
212
  - `width` and `height` – dimensions of the output SVG. Defaults to `800x600`.
package/dist/index.js CHANGED
@@ -1783,7 +1783,7 @@ function getSoftwareUsedString(circuitJson) {
1783
1783
  var package_default = {
1784
1784
  name: "circuit-to-svg",
1785
1785
  type: "module",
1786
- version: "0.0.211",
1786
+ version: "0.0.212",
1787
1787
  description: "Convert Circuit JSON to SVG",
1788
1788
  main: "dist/index.js",
1789
1789
  files: [