easyeda 0.0.316 → 0.0.318
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/browser/index.js +7 -5
- package/dist/browser/index.js.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +8 -6
- package/dist/main.cjs.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -9586,9 +9586,11 @@ var getPolarizedPinMetadata = (pinLabels) => {
|
|
|
9586
9586
|
|
|
9587
9587
|
// lib/utils/normalize-pin-labels.ts
|
|
9588
9588
|
var normalizeActiveLowPinLabel = (label) => {
|
|
9589
|
-
|
|
9590
|
-
|
|
9589
|
+
const hasActiveLowMarker = label.startsWith("#") || label.endsWith("#");
|
|
9590
|
+
if (!hasActiveLowMarker) return label;
|
|
9591
|
+
const activeLowLabel = label.replace(/^#/, "").replace(/#$/, "");
|
|
9591
9592
|
if (activeLowLabel.length === 0) return label;
|
|
9593
|
+
if (activeLowLabel.startsWith("N_")) return activeLowLabel;
|
|
9592
9594
|
return `N_${activeLowLabel}`;
|
|
9593
9595
|
};
|
|
9594
9596
|
var normalizePinLabels = (inputPinLabels) => {
|
|
@@ -10991,9 +10993,9 @@ var parsePin = (pinString) => {
|
|
|
10991
10993
|
const [, visibility, , pinNumber, x, y, rotation2, id] = parts;
|
|
10992
10994
|
const nameMatch = pinString.match(/~([\w+#-]+)~(start|end)~/);
|
|
10993
10995
|
let label = nameMatch ? nameMatch[1] : "";
|
|
10994
|
-
if (label.endsWith("+")) label = label.slice(0, -1)
|
|
10995
|
-
if (label.endsWith("-")) label = label.slice(0, -1)
|
|
10996
|
-
|
|
10996
|
+
if (label.endsWith("+")) label = `${label.slice(0, -1)}_POS`;
|
|
10997
|
+
if (label.endsWith("-")) label = `${label.slice(0, -1)}_NEG`;
|
|
10998
|
+
label = normalizeActiveLowPinLabel(label);
|
|
10997
10999
|
if (/^\+\d+(?:\.\d+)?V$/i.test(label)) label = `V${label.slice(1, -1)}`;
|
|
10998
11000
|
const colorMatch = pinString.match(/#[0-9A-F]{6}/);
|
|
10999
11001
|
const labelColor = colorMatch ? colorMatch[0] : "";
|