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/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/main.cjs
CHANGED
|
@@ -3528,7 +3528,7 @@ var import_promises = __toESM(require("fs/promises"), 1);
|
|
|
3528
3528
|
var package_default = {
|
|
3529
3529
|
name: "easyeda",
|
|
3530
3530
|
type: "module",
|
|
3531
|
-
version: "0.0.
|
|
3531
|
+
version: "0.0.318",
|
|
3532
3532
|
files: [
|
|
3533
3533
|
"dist"
|
|
3534
3534
|
],
|
|
@@ -9304,9 +9304,11 @@ var getPolarizedPinMetadata = (pinLabels) => {
|
|
|
9304
9304
|
|
|
9305
9305
|
// lib/utils/normalize-pin-labels.ts
|
|
9306
9306
|
var normalizeActiveLowPinLabel = (label) => {
|
|
9307
|
-
|
|
9308
|
-
|
|
9307
|
+
const hasActiveLowMarker = label.startsWith("#") || label.endsWith("#");
|
|
9308
|
+
if (!hasActiveLowMarker) return label;
|
|
9309
|
+
const activeLowLabel = label.replace(/^#/, "").replace(/#$/, "");
|
|
9309
9310
|
if (activeLowLabel.length === 0) return label;
|
|
9311
|
+
if (activeLowLabel.startsWith("N_")) return activeLowLabel;
|
|
9310
9312
|
return `N_${activeLowLabel}`;
|
|
9311
9313
|
};
|
|
9312
9314
|
var normalizePinLabels = (inputPinLabels) => {
|
|
@@ -10714,9 +10716,9 @@ var parsePin = (pinString) => {
|
|
|
10714
10716
|
const [, visibility, , pinNumber, x, y, rotation2, id] = parts;
|
|
10715
10717
|
const nameMatch = pinString.match(/~([\w+#-]+)~(start|end)~/);
|
|
10716
10718
|
let label = nameMatch ? nameMatch[1] : "";
|
|
10717
|
-
if (label.endsWith("+")) label = label.slice(0, -1)
|
|
10718
|
-
if (label.endsWith("-")) label = label.slice(0, -1)
|
|
10719
|
-
|
|
10719
|
+
if (label.endsWith("+")) label = `${label.slice(0, -1)}_POS`;
|
|
10720
|
+
if (label.endsWith("-")) label = `${label.slice(0, -1)}_NEG`;
|
|
10721
|
+
label = normalizeActiveLowPinLabel(label);
|
|
10720
10722
|
if (/^\+\d+(?:\.\d+)?V$/i.test(label)) label = `V${label.slice(1, -1)}`;
|
|
10721
10723
|
const colorMatch = pinString.match(/#[0-9A-F]{6}/);
|
|
10722
10724
|
const labelColor = colorMatch ? colorMatch[0] : "";
|