easyeda 0.0.359 → 0.0.361

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
@@ -7332,11 +7332,13 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, {
7332
7332
  );
7333
7333
  const pins = easyEdaJson.dataStr.shape.filter((shape) => shape.type === "PIN");
7334
7334
  const pinLabelSets = pads.map((pad) => {
7335
- const labels = [];
7336
- if (pad.number) labels.push(...getEasyEdaPinAliases(pad.number.toString()));
7335
+ const padAliases = pad.number ? getEasyEdaPinAliases(pad.number.toString()) : [];
7337
7336
  const pin = pins.find((p) => p.pinNumber === pad.number);
7338
- if (pin) labels.push(...getEasyEdaPinAliases(pin.label));
7339
- return labels;
7337
+ const schematicAliases = pin ? getEasyEdaPinAliases(pin.label) : [];
7338
+ const hasNamedSchematicAlias = schematicAliases.some(
7339
+ (alias) => !/^\d+$/.test(alias)
7340
+ );
7341
+ return hasNamedSchematicAlias ? [...schematicAliases, ...padAliases] : [...padAliases, ...schematicAliases];
7340
7342
  });
7341
7343
  const padNumberKeys = pads.map((pad, index) => {
7342
7344
  const padNumber = String(pad.number ?? "").trim();