easyeda 0.0.316 → 0.0.319

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
@@ -5723,9 +5723,11 @@ var getPolarizedPinMetadata = (pinLabels) => {
5723
5723
 
5724
5724
  // lib/utils/normalize-pin-labels.ts
5725
5725
  var normalizeActiveLowPinLabel = (label) => {
5726
- if (!label.startsWith("#")) return label;
5727
- const activeLowLabel = label.slice(1);
5726
+ const hasActiveLowMarker = label.startsWith("#") || label.endsWith("#");
5727
+ if (!hasActiveLowMarker) return label;
5728
+ const activeLowLabel = label.replace(/^#/, "").replace(/#$/, "");
5728
5729
  if (activeLowLabel.length === 0) return label;
5730
+ if (activeLowLabel.startsWith("N_")) return activeLowLabel;
5729
5731
  return `N_${activeLowLabel}`;
5730
5732
  };
5731
5733
  var normalizePinLabels = (inputPinLabels) => {
@@ -7307,9 +7309,9 @@ var parsePin = (pinString) => {
7307
7309
  const [, visibility, , pinNumber, x, y, rotation2, id] = parts;
7308
7310
  const nameMatch = pinString.match(/~([\w+#-]+)~(start|end)~/);
7309
7311
  let label = nameMatch ? nameMatch[1] : "";
7310
- if (label.endsWith("+")) label = label.slice(0, -1) + "_POS";
7311
- if (label.endsWith("-")) label = label.slice(0, -1) + "_NEG";
7312
- if (label.endsWith("#")) label = label.slice(0, -1);
7312
+ if (label.endsWith("+")) label = `${label.slice(0, -1)}_POS`;
7313
+ if (label.endsWith("-")) label = `${label.slice(0, -1)}_NEG`;
7314
+ label = normalizeActiveLowPinLabel(label);
7313
7315
  if (/^\+\d+(?:\.\d+)?V$/i.test(label)) label = `V${label.slice(1, -1)}`;
7314
7316
  const colorMatch = pinString.match(/#[0-9A-F]{6}/);
7315
7317
  const labelColor = colorMatch ? colorMatch[0] : "";