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 +16 -40
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
-
|
|
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
|
-

|
|
69
69
|
|
|
70
|
-
|
|
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
|
-
|
|
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
|

|
|
95
95
|
|
|
96
|
-
|
|
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
|
-
|
|
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
|

|
|
123
121
|
|
|
124
|
-
|
|
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
|
-
|
|
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
|
-

|
|
143
139
|
|
|
144
|
-
|
|
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
|
-
|
|
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
|

|
|
177
162
|
|
|
178
|
-
|
|
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
|
-
|
|
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
|

|
|
210
186
|
|
|
211
|
-
|
|
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
|
-
|
|
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
|

|
|
232
208
|
|
|
233
|
-
|
|
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.
|
|
1786
|
+
version: "0.0.212",
|
|
1787
1787
|
description: "Convert Circuit JSON to SVG",
|
|
1788
1788
|
main: "dist/index.js",
|
|
1789
1789
|
files: [
|