easyeda 0.0.285 → 0.0.287

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.
@@ -9691,6 +9691,7 @@ var isDiodeCategoryComponent = (betterEasy) => {
9691
9691
  // lib/websafe/convert-to-typescript-component/category-value-contains-led.ts
9692
9692
  var categoryValueContainsLed = (value) => {
9693
9693
  if (typeof value === "string") {
9694
+ if (/(^|[^a-z])leds?\s+drivers?([^a-z]|$)/i.test(value)) return false;
9694
9695
  return /(^|[^a-z])leds?([^a-z]|$)/i.test(value) || /light[-\s]?emitting\s+diodes?/i.test(value);
9695
9696
  }
9696
9697
  if (Array.isArray(value)) {
@@ -11863,11 +11864,12 @@ var getPortMetadataByShapeId = (easyEdaJson, circuitJson) => {
11863
11864
  const numericPinNumber = Number(pin.pinNumber);
11864
11865
  if (!portName && Number.isInteger(numericPinNumber)) {
11865
11866
  const numericPortName = `pin${numericPinNumber}`;
11866
- if (sourcePorts.some((port) => port.name === numericPortName)) {
11867
+ if (!usedPortNames.has(numericPortName) && sourcePorts.some((port) => port.name === numericPortName)) {
11867
11868
  portName = numericPortName;
11868
11869
  }
11869
11870
  }
11870
- portName ??= sourcePorts[pinIndex]?.name ?? `pin${pinIndex + 1}`;
11871
+ portName ??= sourcePorts.find((port) => !usedPortNames.has(port.name))?.name;
11872
+ portName ??= `pin${pinIndex + 1}`;
11871
11873
  usedPortNames.add(portName);
11872
11874
  const sourcePort = sourcePorts.find((port) => port.name === portName);
11873
11875
  metadataByShapeId.set(pin.id, {