easyeda 0.0.291 → 0.0.292

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/index.js CHANGED
@@ -7944,6 +7944,30 @@ ${cadModelLines}
7944
7944
  />
7945
7945
  )
7946
7946
  }
7947
+ `.trim();
7948
+ }
7949
+ if (componentType === "connector") {
7950
+ return `
7951
+ import type { ConnectorProps } from "@tscircuit/props"
7952
+
7953
+ const pinLabels = {
7954
+ ${pinLabelsString}
7955
+ } as const
7956
+
7957
+ export const ${componentName} = (props: ConnectorProps) => {
7958
+ return (
7959
+ <connector
7960
+ pinLabels={pinLabels}
7961
+ supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
7962
+ manufacturerPartNumber="${manufacturerPartNumber}"
7963
+ footprint={${footprintTsx}}
7964
+ ${objUrl || stepUrl ? `cadModel={{
7965
+ ${cadModelLines}
7966
+ }}` : ""}
7967
+ {...props}
7968
+ />
7969
+ )
7970
+ }
7947
7971
  `.trim();
7948
7972
  }
7949
7973
  return `
@@ -7988,6 +8012,12 @@ var isInductorComponent = (betterEasy) => {
7988
8012
  return packageName?.toUpperCase().startsWith("IND-") === true && typeof value === "string" && inductancePattern.test(value.trim());
7989
8013
  };
7990
8014
 
8015
+ // lib/websafe/convert-to-typescript-component/is-micro-usb-connector-component.ts
8016
+ var isMicroUsbConnectorComponent = (betterEasy) => {
8017
+ const componentParameters = betterEasy.dataStr.head.c_para;
8018
+ return componentParameters.pre === "USB?" && componentParameters.package?.toUpperCase().startsWith("MICRO-USB-") === true;
8019
+ };
8020
+
7991
8021
  // lib/websafe/convert-to-typescript-component/category-value-contains-pushbutton.ts
7992
8022
  var categoryValueContainsPushbutton = (value) => {
7993
8023
  if (typeof value === "string") {
@@ -8358,6 +8388,7 @@ var getGeneratedComponentType = (betterEasy) => {
8358
8388
  if (isSwitchCategoryComponent(betterEasy)) return "switch";
8359
8389
  if (isInductorComponent(betterEasy)) return "inductor";
8360
8390
  if (isCrystalComponent(betterEasy)) return "crystal";
8391
+ if (isMicroUsbConnectorComponent(betterEasy)) return "connector";
8361
8392
  return "chip";
8362
8393
  };
8363
8394
  var convertRawEasyToTsx = async ({ rawEasy }) => {