easyeda 0.0.273 → 0.0.274

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
@@ -7604,6 +7604,7 @@ var getPinLabelValues = (labels) => {
7604
7604
  if (typeof labels === "string") return [labels];
7605
7605
  return [...labels];
7606
7606
  };
7607
+ var stripEasyEdaPolarityHintDecoration = (label) => label.toLowerCase().replace(/[^a-z0-9+-]/g, "");
7607
7608
  var getPinKeySortValue = (pinKey) => {
7608
7609
  const match = /^pin(\d+)$/i.exec(pinKey);
7609
7610
  return match ? Number(match[1]) : Number.MAX_SAFE_INTEGER;
@@ -7611,7 +7612,7 @@ var getPinKeySortValue = (pinKey) => {
7611
7612
  var getPolarizedPinMetadata = (pinLabels) => {
7612
7613
  const labelsByPin = Object.entries(pinLabels ?? {}).map(([pin, labels]) => ({
7613
7614
  pin,
7614
- labels: getPinLabelValues(labels).map((label) => label.toLowerCase())
7615
+ labels: getPinLabelValues(labels).map(stripEasyEdaPolarityHintDecoration)
7615
7616
  }));
7616
7617
  const anodePin = labelsByPin.find(
7617
7618
  ({ labels }) => labels.some((label) => ["a", "anode", "pos", "+"].includes(label))