easyeda 0.0.57 → 0.0.58

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.
@@ -1486,6 +1486,11 @@ var computeCenterOffset = (easyeda) => {
1486
1486
 
1487
1487
  // lib/convert-easyeda-json-to-tscircuit-soup-json.ts
1488
1488
  import { mm as mm2 } from "@tscircuit/mm";
1489
+
1490
+ // lib/utils/easyeda-unit-to-mm.ts
1491
+ var mil10ToMm = (value) => value * 10 * 0.0254;
1492
+
1493
+ // lib/convert-easyeda-json-to-tscircuit-soup-json.ts
1489
1494
  var mil2mm = (mil) => {
1490
1495
  if (typeof mil === "number") return mm2(`${mil}mil`);
1491
1496
  if (mil.match(/^\d+$/)) return mm2(`${mil}mil`);
@@ -1507,7 +1512,7 @@ var handleSilkscreenPath = (track, index) => {
1507
1512
  x: milx10(point2.x),
1508
1513
  y: milx10(point2.y)
1509
1514
  })),
1510
- stroke_width: track.width
1515
+ stroke_width: mil10ToMm(track.width)
1511
1516
  });
1512
1517
  };
1513
1518
  var handleSilkscreenArc = (arc, index) => {
@@ -1530,7 +1535,7 @@ var handleSilkscreenArc = (arc, index) => {
1530
1535
  x: milx10(p.x),
1531
1536
  y: milx10(p.y)
1532
1537
  })),
1533
- stroke_width: mm2(arc.width)
1538
+ stroke_width: mil10ToMm(arc.width)
1534
1539
  });
1535
1540
  };
1536
1541
  var handleHole = (hole, index) => {
@@ -1977,6 +1982,7 @@ var ShapesArraySchema = z59.array(ShapeItemSchema);
1977
1982
 
1978
1983
  // lib/schemas/single-letter-shape-schema.ts
1979
1984
  import { z as z60 } from "zod";
1985
+ import "@tscircuit/mm";
1980
1986
  var PointSchema2 = z60.object({
1981
1987
  x: z60.number(),
1982
1988
  y: z60.number()
@@ -2128,7 +2134,7 @@ var parsePath = (str) => {
2128
2134
  type: "PATH",
2129
2135
  pathData,
2130
2136
  fillColor,
2131
- strokeWidth: Number(strokeWidth),
2137
+ strokeWidth: mil10ToMm(Number(strokeWidth)),
2132
2138
  strokeColor,
2133
2139
  id
2134
2140
  };
@@ -2613,4 +2619,4 @@ export {
2613
2619
  convertRawEasyToTsx,
2614
2620
  convertEasyEdaJsonToVariousFormats
2615
2621
  };
2616
- //# sourceMappingURL=chunk-LLXDIHGV.js.map
2622
+ //# sourceMappingURL=chunk-CVJME4JW.js.map