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/index.js
CHANGED
|
@@ -17809,8 +17809,11 @@ var PinShapeOutputSchema = z247.object({
|
|
|
17809
17809
|
});
|
|
17810
17810
|
var parsePin = (pinString) => {
|
|
17811
17811
|
const parts = pinString.split("~");
|
|
17812
|
-
const [, visibility, ,
|
|
17813
|
-
const
|
|
17812
|
+
const [, visibility, , spicePinNumber, x, y, rotation2, id] = parts;
|
|
17813
|
+
const sections = pinString.split("^^");
|
|
17814
|
+
const physicalPinNumber = sections[4]?.split("~")[4]?.trim();
|
|
17815
|
+
const pinNumber = physicalPinNumber && !["undefined", "null"].includes(physicalPinNumber.toLowerCase()) ? physicalPinNumber : spicePinNumber;
|
|
17816
|
+
const pinNameSection = sections[3];
|
|
17814
17817
|
let label = pinNameSection?.split("~")[4] ?? "";
|
|
17815
17818
|
if (!label.includes("/")) label = normalizeEasyEdaPinLabel(label);
|
|
17816
17819
|
const colorMatch = pinString.match(/#[0-9A-F]{6}/);
|
|
@@ -19394,6 +19397,7 @@ var isPushbuttonCategoryComponent = (betterEasy) => {
|
|
|
19394
19397
|
|
|
19395
19398
|
// lib/websafe/convert-to-typescript-component/is-resistor-component.ts
|
|
19396
19399
|
var standardSmdResistorPackagePattern = /^R(?:01005|0201|0402|0504|0603|0805|1206|1210|1812|2010|2512)(?:$|[_-])/i;
|
|
19400
|
+
var dimensionalSmdResistorPackagePattern = /^RES-SMD_L\d+(?:\.\d+)?-W\d+(?:\.\d+)?(?:$|[_-])/i;
|
|
19397
19401
|
var normalizeExplicitScale = (scale2) => {
|
|
19398
19402
|
if (scale2 === "k" || scale2 === "K") return "k";
|
|
19399
19403
|
if (scale2 === "m") return "m";
|
|
@@ -19429,7 +19433,7 @@ var isResistorComponent = (betterEasy) => {
|
|
|
19429
19433
|
const hasResistorCategory = betterEasy.tags.some(
|
|
19430
19434
|
(tag) => /\bresistors?\b/i.test(tag)
|
|
19431
19435
|
);
|
|
19432
|
-
return (componentParameters.pre?.toUpperCase() === "R?" || hasResistorCategory) && typeof packageName === "string" && standardSmdResistorPackagePattern.test(packageName.trim()) && normalizeResistorValue(componentParameters.Value) !== void 0;
|
|
19436
|
+
return (componentParameters.pre?.toUpperCase() === "R?" || hasResistorCategory) && typeof packageName === "string" && (standardSmdResistorPackagePattern.test(packageName.trim()) || dimensionalSmdResistorPackagePattern.test(packageName.trim())) && normalizeResistorValue(componentParameters.Value) !== void 0;
|
|
19433
19437
|
};
|
|
19434
19438
|
|
|
19435
19439
|
// lib/websafe/convert-to-typescript-component/category-value-contains-switch.ts
|