easyeda 0.0.286 → 0.0.288

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
@@ -6302,7 +6302,7 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, {
6302
6302
  if (pad.shape === "RECT") {
6303
6303
  soupShape = "rect";
6304
6304
  } else if (pad.shape === "ELLIPSE") {
6305
- soupShape = "rect";
6305
+ soupShape = "circle";
6306
6306
  } else if (pad.shape === "OVAL") {
6307
6307
  soupShape = "pill";
6308
6308
  } else if (pad.shape === "POLYGON") {
@@ -8165,11 +8165,12 @@ var getPortMetadataByShapeId = (easyEdaJson, circuitJson) => {
8165
8165
  const numericPinNumber = Number(pin.pinNumber);
8166
8166
  if (!portName && Number.isInteger(numericPinNumber)) {
8167
8167
  const numericPortName = `pin${numericPinNumber}`;
8168
- if (sourcePorts.some((port) => port.name === numericPortName)) {
8168
+ if (!usedPortNames.has(numericPortName) && sourcePorts.some((port) => port.name === numericPortName)) {
8169
8169
  portName = numericPortName;
8170
8170
  }
8171
8171
  }
8172
- portName ??= sourcePorts[pinIndex]?.name ?? `pin${pinIndex + 1}`;
8172
+ portName ??= sourcePorts.find((port) => !usedPortNames.has(port.name))?.name;
8173
+ portName ??= `pin${pinIndex + 1}`;
8173
8174
  usedPortNames.add(portName);
8174
8175
  const sourcePort = sourcePorts.find((port) => port.name === portName);
8175
8176
  metadataByShapeId.set(pin.id, {