circuit-to-svg 0.0.242 → 0.0.244

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.js CHANGED
@@ -2224,7 +2224,8 @@ function createSvgObjectsFromSmtPad(pad, ctx) {
2224
2224
  const width = pad.width * Math.abs(transform.a);
2225
2225
  const height = pad.height * Math.abs(transform.d);
2226
2226
  const [x, y] = applyToPoint19(transform, [pad.x, pad.y]);
2227
- const scaledBorderRadius = (pad.rect_border_radius ?? 0) * Math.abs(transform.a);
2227
+ const cornerRadiusValue = pad.corner_radius ?? pad.rect_border_radius ?? 0;
2228
+ const scaledBorderRadius = cornerRadiusValue * Math.abs(transform.a);
2228
2229
  if (pad.shape === "rotated_rect" && pad.ccw_rotation) {
2229
2230
  const padElement2 = {
2230
2231
  name: "rect",
@@ -3174,7 +3175,7 @@ function getSoftwareUsedString(circuitJson) {
3174
3175
  var package_default = {
3175
3176
  name: "circuit-to-svg",
3176
3177
  type: "module",
3177
- version: "0.0.241",
3178
+ version: "0.0.243",
3178
3179
  description: "Convert Circuit JSON to SVG",
3179
3180
  main: "dist/index.js",
3180
3181
  files: [
@@ -3198,7 +3199,7 @@ var package_default = {
3198
3199
  "bun-match-svg": "^0.0.12",
3199
3200
  esbuild: "^0.20.2",
3200
3201
  "performance-now": "^2.1.0",
3201
- "circuit-json": "^0.0.280",
3202
+ "circuit-json": "^0.0.282",
3202
3203
  react: "19.1.0",
3203
3204
  "react-cosmos": "7.0.0",
3204
3205
  "react-cosmos-plugin-vite": "7.0.0",
@@ -9577,8 +9578,9 @@ function prepareSimulationGraphs(graphs, circuitJson) {
9577
9578
  const points = createGraphPoints(graph);
9578
9579
  const paletteColor = palette.length > 0 ? palette[index % palette.length] : FALLBACK_LINE_COLOR;
9579
9580
  const color = paletteColor ?? FALLBACK_LINE_COLOR;
9580
- const probeName = graph.schematic_voltage_probe_id ? probeIdToName.get(graph.schematic_voltage_probe_id) : void 0;
9581
- const label = probeName ? `V(${probeName})` : graph.name || (graph.schematic_voltage_probe_id ? `Probe ${graph.schematic_voltage_probe_id}` : graph.simulation_transient_voltage_graph_id);
9581
+ const probeId = graph.simulation_voltage_probe_id ?? graph.schematic_voltage_probe_id;
9582
+ const probeName = probeId ? probeIdToName.get(probeId) : void 0;
9583
+ const label = probeName ? `V(${probeName})` : graph.name || (probeId ? `Probe ${probeId}` : graph.simulation_transient_voltage_graph_id);
9582
9584
  return { graph, points, color, label };
9583
9585
  }).filter((entry) => entry.points.length > 0);
9584
9586
  }