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.
@@ -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, , pinNumber, x, y, rotation2, id] = parts;
21379
- const pinNameSection = pinString.split("^^")[3];
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}/);
@@ -22771,12 +22774,13 @@ import type { CrystalProps } from "@tscircuit/props"
22771
22774
  type ImportedCrystalProps = Omit<CrystalProps, "frequency" | "pinVariant">
22772
22775
 
22773
22776
  ${pinAttributesBlock}export const ${componentName} = (props: ImportedCrystalProps) => {
22774
- const { name = "X1", ...restProps } = props
22777
+ const { name = "X1", loadCapacitance, ...restProps } = props
22775
22778
 
22776
22779
  return (
22777
22780
  <crystal
22778
22781
  name={name}
22779
22782
  frequency=${JSON.stringify(crystalFrequency)}
22783
+ loadCapacitance={loadCapacitance}
22780
22784
  pinVariant=${JSON.stringify(crystalPinVariant)}
22781
22785
  supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
22782
22786
  manufacturerPartNumber=${manufacturerPartNumberTsx}
@@ -22975,6 +22979,7 @@ var isPushbuttonCategoryComponent = (betterEasy) => {
22975
22979
 
22976
22980
  // lib/websafe/convert-to-typescript-component/is-resistor-component.ts
22977
22981
  var standardSmdResistorPackagePattern = /^R(?:01005|0201|0402|0504|0603|0805|1206|1210|1812|2010|2512)(?:$|[_-])/i;
22982
+ var dimensionalSmdResistorPackagePattern = /^RES-SMD_L\d+(?:\.\d+)?-W\d+(?:\.\d+)?(?:$|[_-])/i;
22978
22983
  var normalizeExplicitScale = (scale2) => {
22979
22984
  if (scale2 === "k" || scale2 === "K") return "k";
22980
22985
  if (scale2 === "m") return "m";
@@ -23010,7 +23015,7 @@ var isResistorComponent = (betterEasy) => {
23010
23015
  const hasResistorCategory = betterEasy.tags.some(
23011
23016
  (tag) => /\bresistors?\b/i.test(tag)
23012
23017
  );
23013
- return (componentParameters.pre?.toUpperCase() === "R?" || hasResistorCategory) && typeof packageName === "string" && standardSmdResistorPackagePattern.test(packageName.trim()) && normalizeResistorValue(componentParameters.Value) !== void 0;
23018
+ return (componentParameters.pre?.toUpperCase() === "R?" || hasResistorCategory) && typeof packageName === "string" && (standardSmdResistorPackagePattern.test(packageName.trim()) || dimensionalSmdResistorPackagePattern.test(packageName.trim())) && normalizeResistorValue(componentParameters.Value) !== void 0;
23014
23019
  };
23015
23020
 
23016
23021
  // lib/websafe/convert-to-typescript-component/category-value-contains-switch.ts