easyeda 0.0.265 → 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/main.cjs CHANGED
@@ -997,7 +997,7 @@ var import_promises = __toESM(require("fs/promises"), 1);
997
997
  var package_default = {
998
998
  name: "easyeda",
999
999
  type: "module",
1000
- version: "0.0.264",
1000
+ version: "0.0.265",
1001
1001
  files: [
1002
1002
  "dist"
1003
1003
  ],
@@ -6456,6 +6456,10 @@ var handleCutout = (solidRegion, index) => {
6456
6456
  }))
6457
6457
  });
6458
6458
  };
6459
+ var LEAD_SHAPE_LAYER = 100;
6460
+ var isPcbSolidRegionCutout = (shape) => {
6461
+ return shape.fillStyle === "cutout" && shape.layermask !== LEAD_SHAPE_LAYER;
6462
+ };
6459
6463
  var getCadPositionZMmFromMetadata = (easyEdaJson) => {
6460
6464
  const svgNode = easyEdaJson.packageDetail.dataStr.shape.find(
6461
6465
  (shape) => shape.type === "SVGNODE" && shape.svgData.attrs?.uuid
@@ -6662,7 +6666,7 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, {
6662
6666
  circuitElements.push(handleVia(v, index));
6663
6667
  });
6664
6668
  easyEdaJson.packageDetail.dataStr.shape.filter(
6665
- (shape) => shape.type === "SOLIDREGION" && shape.fillStyle === "cutout"
6669
+ (shape) => shape.type === "SOLIDREGION" && isPcbSolidRegionCutout(shape)
6666
6670
  ).forEach((sr, index) => {
6667
6671
  circuitElements.push(handleCutout(sr, index));
6668
6672
  });
@@ -6714,7 +6718,7 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, {
6714
6718
  circuitElements.push(
6715
6719
  pcb_silkscreen_text.parse({
6716
6720
  type: "pcb_silkscreen_text",
6717
- pcb_silkscreen_text_id: `pcb_silkscreen_text_designator_fallback`,
6721
+ pcb_silkscreen_text_id: "pcb_silkscreen_text_designator_fallback",
6718
6722
  pcb_component_id: "pcb_component_1",
6719
6723
  text: "{NAME}",
6720
6724
  anchor_position: {