easyeda 0.0.324 → 0.0.326

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
@@ -1026,7 +1026,7 @@ var import_promises = __toESM(require("fs/promises"), 1);
1026
1026
  var package_default = {
1027
1027
  name: "easyeda",
1028
1028
  type: "module",
1029
- version: "0.0.323",
1029
+ version: "0.0.325",
1030
1030
  files: [
1031
1031
  "dist"
1032
1032
  ],
@@ -9062,6 +9062,7 @@ var generateFootprintTsx = (circuitJson, options = {}) => {
9062
9062
  const smtPads = su(circuitJson).pcb_smtpad.list();
9063
9063
  const vias = su(circuitJson).pcb_via.list();
9064
9064
  const silkscreenPaths = su(circuitJson).pcb_silkscreen_path.list();
9065
+ const silkscreenRects = su(circuitJson).pcb_silkscreen_rect.list();
9065
9066
  const silkscreenTexts = su(circuitJson).pcb_silkscreen_text.list();
9066
9067
  const fabricationNotePaths = su(circuitJson).pcb_fabrication_note_path.list();
9067
9068
  const courtyardOutlines = su(circuitJson).pcb_courtyard_outline.list();
@@ -9131,6 +9132,15 @@ var generateFootprintTsx = (circuitJson, options = {}) => {
9131
9132
  `<silkscreenpath route={${JSON.stringify(silkscreenPath.route)}} />`
9132
9133
  );
9133
9134
  }
9135
+ for (const silkscreenRect of silkscreenRects) {
9136
+ const rotation2 = silkscreenRect.ccw_rotation || 0;
9137
+ const rotationAttr = rotation2 ? ` pcbRotation="${rotation2}deg"` : "";
9138
+ const filledAttr = silkscreenRect.is_filled ? " isFilled" : "";
9139
+ const strokeAttr = silkscreenRect.has_stroke === false ? " hasStroke={false}" : "";
9140
+ elementStrings.push(
9141
+ `<silkscreenrect pcbX="${mmStr(silkscreenRect.center.x)}" pcbY="${mmStr(silkscreenRect.center.y)}" width="${mmStr(silkscreenRect.width)}" height="${mmStr(silkscreenRect.height)}" strokeWidth="${mmStr(silkscreenRect.stroke_width)}"${filledAttr}${strokeAttr}${rotationAttr} />`
9142
+ );
9143
+ }
9134
9144
  for (const silkscreenText of silkscreenTexts) {
9135
9145
  const isRefDes = silkscreenText.text === "{NAME}";
9136
9146
  const textValue = isRefDes ? JSON.stringify("{NAME}") : JSON.stringify(silkscreenText.text);