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/browser/index.js +2 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +3 -2
- package/dist/main.cjs.map +1 -1
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -3499,7 +3499,7 @@ var import_promises = __toESM(require("fs/promises"), 1);
|
|
|
3499
3499
|
var package_default = {
|
|
3500
3500
|
name: "easyeda",
|
|
3501
3501
|
type: "module",
|
|
3502
|
-
version: "0.0.
|
|
3502
|
+
version: "0.0.273",
|
|
3503
3503
|
files: [
|
|
3504
3504
|
"dist"
|
|
3505
3505
|
],
|
|
@@ -11011,6 +11011,7 @@ var getPinLabelValues = (labels) => {
|
|
|
11011
11011
|
if (typeof labels === "string") return [labels];
|
|
11012
11012
|
return [...labels];
|
|
11013
11013
|
};
|
|
11014
|
+
var stripEasyEdaPolarityHintDecoration = (label) => label.toLowerCase().replace(/[^a-z0-9+-]/g, "");
|
|
11014
11015
|
var getPinKeySortValue = (pinKey) => {
|
|
11015
11016
|
const match = /^pin(\d+)$/i.exec(pinKey);
|
|
11016
11017
|
return match ? Number(match[1]) : Number.MAX_SAFE_INTEGER;
|
|
@@ -11018,7 +11019,7 @@ var getPinKeySortValue = (pinKey) => {
|
|
|
11018
11019
|
var getPolarizedPinMetadata = (pinLabels) => {
|
|
11019
11020
|
const labelsByPin = Object.entries(pinLabels ?? {}).map(([pin, labels]) => ({
|
|
11020
11021
|
pin,
|
|
11021
|
-
labels: getPinLabelValues(labels).map(
|
|
11022
|
+
labels: getPinLabelValues(labels).map(stripEasyEdaPolarityHintDecoration)
|
|
11022
11023
|
}));
|
|
11023
11024
|
const anodePin = labelsByPin.find(
|
|
11024
11025
|
({ labels }) => labels.some((label) => ["a", "anode", "pos", "+"].includes(label))
|