easyeda 0.0.287 → 0.0.289

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.
@@ -10165,7 +10165,7 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, {
10165
10165
  if (pad.shape === "RECT") {
10166
10166
  soupShape = "rect";
10167
10167
  } else if (pad.shape === "ELLIPSE") {
10168
- soupShape = "rect";
10168
+ soupShape = "circle";
10169
10169
  } else if (pad.shape === "OVAL") {
10170
10170
  soupShape = "pill";
10171
10171
  } else if (pad.shape === "POLYGON") {
@@ -12009,8 +12009,13 @@ var convertBetterEasyToTsx = async ({
12009
12009
  cadComponent.position.x = 0;
12010
12010
  cadComponent.position.y = 0;
12011
12011
  }
12012
- const rawPn = betterEasy.dataStr.head.c_para["Manufacturer Part"];
12013
- const pn = rawPn ? normalizeManufacturerPartNumber(rawPn) : "unknown";
12012
+ const manufacturerPartNumber = betterEasy.dataStr.head.c_para["Manufacturer Part"];
12013
+ if (!manufacturerPartNumber) {
12014
+ throw new Error(
12015
+ `Missing manufacturer part number for ${betterEasy.lcsc.number}`
12016
+ );
12017
+ }
12018
+ const componentName = normalizeManufacturerPartNumber(manufacturerPartNumber);
12014
12019
  const sourcePorts = su(circuitJson).source_port.list();
12015
12020
  const pinLabels = {};
12016
12021
  const sortedPorts = sourcePorts.sort((a, b) => {
@@ -12044,8 +12049,8 @@ var convertBetterEasyToTsx = async ({
12044
12049
  const componentType = getGeneratedComponentType(betterEasy);
12045
12050
  const symbolTsx = componentType === "chip" && hasNonBoxSchematicSymbol(betterEasy) ? generateSymbolTsx(betterEasy, circuitJson) : void 0;
12046
12051
  return generateTypescriptComponent({
12047
- componentName: pn,
12048
- manufacturerPartNumber: pn,
12052
+ componentName,
12053
+ manufacturerPartNumber,
12049
12054
  pinLabels,
12050
12055
  objUrl: modelObjUrl,
12051
12056
  stepUrl: modelStepUrl,