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/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}/);
|
|
@@ -19190,12 +19193,13 @@ import type { CrystalProps } from "@tscircuit/props"
|
|
|
19190
19193
|
type ImportedCrystalProps = Omit<CrystalProps, "frequency" | "pinVariant">
|
|
19191
19194
|
|
|
19192
19195
|
${pinAttributesBlock}export const ${componentName} = (props: ImportedCrystalProps) => {
|
|
19193
|
-
const { name = "X1", ...restProps } = props
|
|
19196
|
+
const { name = "X1", loadCapacitance, ...restProps } = props
|
|
19194
19197
|
|
|
19195
19198
|
return (
|
|
19196
19199
|
<crystal
|
|
19197
19200
|
name={name}
|
|
19198
19201
|
frequency=${JSON.stringify(crystalFrequency)}
|
|
19202
|
+
loadCapacitance={loadCapacitance}
|
|
19199
19203
|
pinVariant=${JSON.stringify(crystalPinVariant)}
|
|
19200
19204
|
supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
|
|
19201
19205
|
manufacturerPartNumber=${manufacturerPartNumberTsx}
|
|
@@ -19394,6 +19398,7 @@ var isPushbuttonCategoryComponent = (betterEasy) => {
|
|
|
19394
19398
|
|
|
19395
19399
|
// lib/websafe/convert-to-typescript-component/is-resistor-component.ts
|
|
19396
19400
|
var standardSmdResistorPackagePattern = /^R(?:01005|0201|0402|0504|0603|0805|1206|1210|1812|2010|2512)(?:$|[_-])/i;
|
|
19401
|
+
var dimensionalSmdResistorPackagePattern = /^RES-SMD_L\d+(?:\.\d+)?-W\d+(?:\.\d+)?(?:$|[_-])/i;
|
|
19397
19402
|
var normalizeExplicitScale = (scale2) => {
|
|
19398
19403
|
if (scale2 === "k" || scale2 === "K") return "k";
|
|
19399
19404
|
if (scale2 === "m") return "m";
|
|
@@ -19429,7 +19434,7 @@ var isResistorComponent = (betterEasy) => {
|
|
|
19429
19434
|
const hasResistorCategory = betterEasy.tags.some(
|
|
19430
19435
|
(tag) => /\bresistors?\b/i.test(tag)
|
|
19431
19436
|
);
|
|
19432
|
-
return (componentParameters.pre?.toUpperCase() === "R?" || hasResistorCategory) && typeof packageName === "string" && standardSmdResistorPackagePattern.test(packageName.trim()) && normalizeResistorValue(componentParameters.Value) !== void 0;
|
|
19437
|
+
return (componentParameters.pre?.toUpperCase() === "R?" || hasResistorCategory) && typeof packageName === "string" && (standardSmdResistorPackagePattern.test(packageName.trim()) || dimensionalSmdResistorPackagePattern.test(packageName.trim())) && normalizeResistorValue(componentParameters.Value) !== void 0;
|
|
19433
19438
|
};
|
|
19434
19439
|
|
|
19435
19440
|
// lib/websafe/convert-to-typescript-component/category-value-contains-switch.ts
|