circuit-to-svg 0.0.169 → 0.0.171

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
@@ -1031,7 +1031,7 @@ function createSvgObjectsFromSmtPad(pad, ctx) {
1031
1031
  attributes: {
1032
1032
  class: "pcb-pad",
1033
1033
  fill: layerNameToColor(pad.layer),
1034
- points,
1034
+ points: points.map((p) => p.join(",")).join(" "),
1035
1035
  "data-layer": pad.layer
1036
1036
  }
1037
1037
  }
@@ -1446,7 +1446,7 @@ function getSoftwareUsedString(circuitJson) {
1446
1446
  var package_default = {
1447
1447
  name: "circuit-to-svg",
1448
1448
  type: "module",
1449
- version: "0.0.168",
1449
+ version: "0.0.170",
1450
1450
  description: "Convert Circuit JSON to SVG",
1451
1451
  main: "dist/index.js",
1452
1452
  files: [
@@ -1489,7 +1489,7 @@ var package_default = {
1489
1489
  "vite-tsconfig-paths": "^5.0.1",
1490
1490
  "@tscircuit/checks": "^0.0.44",
1491
1491
  "@tscircuit/circuit-json-util": "^0.0.47",
1492
- "@tscircuit/footprinter": "^0.0.91"
1492
+ "@tscircuit/footprinter": "^0.0.203"
1493
1493
  },
1494
1494
  peerDependencies: {
1495
1495
  "circuit-json": "*",
@@ -1575,6 +1575,15 @@ function convertCircuitJsonToPcbSvg(circuitJson, options) {
1575
1575
  }
1576
1576
  } else if ("x" in circuitJsonElm && "y" in circuitJsonElm) {
1577
1577
  updateBounds({ x: circuitJsonElm.x, y: circuitJsonElm.y }, 0, 0);
1578
+ } else if (circuitJsonElm.type === "pcb_smtpad") {
1579
+ const pad = circuitJsonElm;
1580
+ if (pad.shape === "rect" || pad.shape === "rotated_rect" || pad.shape === "pill") {
1581
+ updateBounds({ x: pad.x, y: pad.y }, pad.width, pad.height);
1582
+ } else if (pad.shape === "circle") {
1583
+ updateBounds({ x: pad.x, y: pad.y }, pad.radius * 2, pad.radius * 2);
1584
+ } else if (pad.shape === "polygon") {
1585
+ updateTraceBounds(pad.points);
1586
+ }
1578
1587
  } else if ("route" in circuitJsonElm) {
1579
1588
  updateTraceBounds(circuitJsonElm.route);
1580
1589
  } else if (circuitJsonElm.type === "pcb_silkscreen_text" || circuitJsonElm.type === "pcb_silkscreen_rect" || circuitJsonElm.type === "pcb_silkscreen_circle" || circuitJsonElm.type === "pcb_silkscreen_line") {