easyeda 0.0.389 → 0.0.392
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 +9 -4
- package/dist/browser/index.js.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +10 -5
- package/dist/main.cjs.map +1 -1
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -1078,7 +1078,7 @@ var import_promises = __toESM(require("fs/promises"), 1);
|
|
|
1078
1078
|
var package_default = {
|
|
1079
1079
|
name: "easyeda",
|
|
1080
1080
|
type: "module",
|
|
1081
|
-
version: "0.0.
|
|
1081
|
+
version: "0.0.391",
|
|
1082
1082
|
files: [
|
|
1083
1083
|
"dist"
|
|
1084
1084
|
],
|
|
@@ -18720,8 +18720,11 @@ var PinShapeOutputSchema = import_zod247.z.object({
|
|
|
18720
18720
|
});
|
|
18721
18721
|
var parsePin = (pinString) => {
|
|
18722
18722
|
const parts = pinString.split("~");
|
|
18723
|
-
const [, visibility, ,
|
|
18724
|
-
const
|
|
18723
|
+
const [, visibility, , spicePinNumber, x, y, rotation2, id] = parts;
|
|
18724
|
+
const sections = pinString.split("^^");
|
|
18725
|
+
const physicalPinNumber = sections[4]?.split("~")[4]?.trim();
|
|
18726
|
+
const pinNumber = physicalPinNumber && !["undefined", "null"].includes(physicalPinNumber.toLowerCase()) ? physicalPinNumber : spicePinNumber;
|
|
18727
|
+
const pinNameSection = sections[3];
|
|
18725
18728
|
let label = pinNameSection?.split("~")[4] ?? "";
|
|
18726
18729
|
if (!label.includes("/")) label = normalizeEasyEdaPinLabel(label);
|
|
18727
18730
|
const colorMatch = pinString.match(/#[0-9A-F]{6}/);
|
|
@@ -20101,12 +20104,13 @@ import type { CrystalProps } from "@tscircuit/props"
|
|
|
20101
20104
|
type ImportedCrystalProps = Omit<CrystalProps, "frequency" | "pinVariant">
|
|
20102
20105
|
|
|
20103
20106
|
${pinAttributesBlock}export const ${componentName} = (props: ImportedCrystalProps) => {
|
|
20104
|
-
const { name = "X1", ...restProps } = props
|
|
20107
|
+
const { name = "X1", loadCapacitance, ...restProps } = props
|
|
20105
20108
|
|
|
20106
20109
|
return (
|
|
20107
20110
|
<crystal
|
|
20108
20111
|
name={name}
|
|
20109
20112
|
frequency=${JSON.stringify(crystalFrequency)}
|
|
20113
|
+
loadCapacitance={loadCapacitance}
|
|
20110
20114
|
pinVariant=${JSON.stringify(crystalPinVariant)}
|
|
20111
20115
|
supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
|
|
20112
20116
|
manufacturerPartNumber=${manufacturerPartNumberTsx}
|
|
@@ -20305,6 +20309,7 @@ var isPushbuttonCategoryComponent = (betterEasy) => {
|
|
|
20305
20309
|
|
|
20306
20310
|
// lib/websafe/convert-to-typescript-component/is-resistor-component.ts
|
|
20307
20311
|
var standardSmdResistorPackagePattern = /^R(?:01005|0201|0402|0504|0603|0805|1206|1210|1812|2010|2512)(?:$|[_-])/i;
|
|
20312
|
+
var dimensionalSmdResistorPackagePattern = /^RES-SMD_L\d+(?:\.\d+)?-W\d+(?:\.\d+)?(?:$|[_-])/i;
|
|
20308
20313
|
var normalizeExplicitScale = (scale2) => {
|
|
20309
20314
|
if (scale2 === "k" || scale2 === "K") return "k";
|
|
20310
20315
|
if (scale2 === "m") return "m";
|
|
@@ -20340,7 +20345,7 @@ var isResistorComponent = (betterEasy) => {
|
|
|
20340
20345
|
const hasResistorCategory = betterEasy.tags.some(
|
|
20341
20346
|
(tag) => /\bresistors?\b/i.test(tag)
|
|
20342
20347
|
);
|
|
20343
|
-
return (componentParameters.pre?.toUpperCase() === "R?" || hasResistorCategory) && typeof packageName === "string" && standardSmdResistorPackagePattern.test(packageName.trim()) && normalizeResistorValue(componentParameters.Value) !== void 0;
|
|
20348
|
+
return (componentParameters.pre?.toUpperCase() === "R?" || hasResistorCategory) && typeof packageName === "string" && (standardSmdResistorPackagePattern.test(packageName.trim()) || dimensionalSmdResistorPackagePattern.test(packageName.trim())) && normalizeResistorValue(componentParameters.Value) !== void 0;
|
|
20344
20349
|
};
|
|
20345
20350
|
|
|
20346
20351
|
// lib/websafe/convert-to-typescript-component/category-value-contains-switch.ts
|