circuit-to-svg 0.0.264 → 0.0.266

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
@@ -2834,6 +2834,28 @@ function createSvgObjectsFromPcbHole(hole, ctx) {
2834
2834
  }
2835
2835
  ];
2836
2836
  }
2837
+ if (hole.hole_shape === "rect") {
2838
+ const scaledWidth = hole.hole_width * Math.abs(transform.a);
2839
+ const scaledHeight = hole.hole_height * Math.abs(transform.a);
2840
+ return [
2841
+ {
2842
+ name: "rect",
2843
+ type: "element",
2844
+ attributes: {
2845
+ class: "pcb-hole",
2846
+ x: (x - scaledWidth / 2).toString(),
2847
+ y: (y - scaledHeight / 2).toString(),
2848
+ width: scaledWidth.toString(),
2849
+ height: scaledHeight.toString(),
2850
+ fill: colorMap2.drill,
2851
+ "data-type": "pcb_hole",
2852
+ "data-pcb-layer": "drill"
2853
+ },
2854
+ children: [],
2855
+ value: ""
2856
+ }
2857
+ ];
2858
+ }
2837
2859
  if (hole.hole_shape === "pill") {
2838
2860
  const scaledWidth = hole.hole_width * Math.abs(transform.a);
2839
2861
  const scaledHeight = hole.hole_height * Math.abs(transform.a);
@@ -3824,7 +3846,7 @@ function getSoftwareUsedString(circuitJson) {
3824
3846
  var package_default = {
3825
3847
  name: "circuit-to-svg",
3826
3848
  type: "module",
3827
- version: "0.0.263",
3849
+ version: "0.0.265",
3828
3850
  description: "Convert Circuit JSON to SVG",
3829
3851
  main: "dist/index.js",
3830
3852
  files: [
@@ -3848,7 +3870,7 @@ var package_default = {
3848
3870
  "bun-match-svg": "^0.0.12",
3849
3871
  esbuild: "^0.20.2",
3850
3872
  "performance-now": "^2.1.0",
3851
- "circuit-json": "^0.0.297",
3873
+ "circuit-json": "^0.0.308",
3852
3874
  react: "19.1.0",
3853
3875
  "react-cosmos": "7.0.0",
3854
3876
  "react-cosmos-plugin-vite": "7.0.0",