easyeda 0.0.388 → 0.0.391
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 -3
- package/dist/browser/index.js.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +8 -4
- package/dist/main.cjs.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -21375,8 +21375,11 @@ var PinShapeOutputSchema = external_exports.object({
|
|
|
21375
21375
|
});
|
|
21376
21376
|
var parsePin = (pinString) => {
|
|
21377
21377
|
const parts = pinString.split("~");
|
|
21378
|
-
const [, visibility, ,
|
|
21379
|
-
const
|
|
21378
|
+
const [, visibility, , spicePinNumber, x, y, rotation2, id] = parts;
|
|
21379
|
+
const sections = pinString.split("^^");
|
|
21380
|
+
const physicalPinNumber = sections[4]?.split("~")[4]?.trim();
|
|
21381
|
+
const pinNumber = physicalPinNumber && !["undefined", "null"].includes(physicalPinNumber.toLowerCase()) ? physicalPinNumber : spicePinNumber;
|
|
21382
|
+
const pinNameSection = sections[3];
|
|
21380
21383
|
let label = pinNameSection?.split("~")[4] ?? "";
|
|
21381
21384
|
if (!label.includes("/")) label = normalizeEasyEdaPinLabel(label);
|
|
21382
21385
|
const colorMatch = pinString.match(/#[0-9A-F]{6}/);
|
|
@@ -22975,6 +22978,7 @@ var isPushbuttonCategoryComponent = (betterEasy) => {
|
|
|
22975
22978
|
|
|
22976
22979
|
// lib/websafe/convert-to-typescript-component/is-resistor-component.ts
|
|
22977
22980
|
var standardSmdResistorPackagePattern = /^R(?:01005|0201|0402|0504|0603|0805|1206|1210|1812|2010|2512)(?:$|[_-])/i;
|
|
22981
|
+
var dimensionalSmdResistorPackagePattern = /^RES-SMD_L\d+(?:\.\d+)?-W\d+(?:\.\d+)?(?:$|[_-])/i;
|
|
22978
22982
|
var normalizeExplicitScale = (scale2) => {
|
|
22979
22983
|
if (scale2 === "k" || scale2 === "K") return "k";
|
|
22980
22984
|
if (scale2 === "m") return "m";
|
|
@@ -23010,7 +23014,7 @@ var isResistorComponent = (betterEasy) => {
|
|
|
23010
23014
|
const hasResistorCategory = betterEasy.tags.some(
|
|
23011
23015
|
(tag) => /\bresistors?\b/i.test(tag)
|
|
23012
23016
|
);
|
|
23013
|
-
return (componentParameters.pre?.toUpperCase() === "R?" || hasResistorCategory) && typeof packageName === "string" && standardSmdResistorPackagePattern.test(packageName.trim()) && normalizeResistorValue(componentParameters.Value) !== void 0;
|
|
23017
|
+
return (componentParameters.pre?.toUpperCase() === "R?" || hasResistorCategory) && typeof packageName === "string" && (standardSmdResistorPackagePattern.test(packageName.trim()) || dimensionalSmdResistorPackagePattern.test(packageName.trim())) && normalizeResistorValue(componentParameters.Value) !== void 0;
|
|
23014
23018
|
};
|
|
23015
23019
|
|
|
23016
23020
|
// lib/websafe/convert-to-typescript-component/category-value-contains-switch.ts
|