easyeda 0.0.288 → 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.
- 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
|
@@ -8310,8 +8310,13 @@ var convertBetterEasyToTsx = async ({
|
|
|
8310
8310
|
cadComponent.position.x = 0;
|
|
8311
8311
|
cadComponent.position.y = 0;
|
|
8312
8312
|
}
|
|
8313
|
-
const
|
|
8314
|
-
|
|
8313
|
+
const manufacturerPartNumber = betterEasy.dataStr.head.c_para["Manufacturer Part"];
|
|
8314
|
+
if (!manufacturerPartNumber) {
|
|
8315
|
+
throw new Error(
|
|
8316
|
+
`Missing manufacturer part number for ${betterEasy.lcsc.number}`
|
|
8317
|
+
);
|
|
8318
|
+
}
|
|
8319
|
+
const componentName = normalizeManufacturerPartNumber(manufacturerPartNumber);
|
|
8315
8320
|
const sourcePorts = su(circuitJson).source_port.list();
|
|
8316
8321
|
const pinLabels = {};
|
|
8317
8322
|
const sortedPorts = sourcePorts.sort((a, b) => {
|
|
@@ -8345,8 +8350,8 @@ var convertBetterEasyToTsx = async ({
|
|
|
8345
8350
|
const componentType = getGeneratedComponentType(betterEasy);
|
|
8346
8351
|
const symbolTsx = componentType === "chip" && hasNonBoxSchematicSymbol(betterEasy) ? generateSymbolTsx(betterEasy, circuitJson) : void 0;
|
|
8347
8352
|
return generateTypescriptComponent({
|
|
8348
|
-
componentName
|
|
8349
|
-
manufacturerPartNumber
|
|
8353
|
+
componentName,
|
|
8354
|
+
manufacturerPartNumber,
|
|
8350
8355
|
pinLabels,
|
|
8351
8356
|
objUrl: modelObjUrl,
|
|
8352
8357
|
stepUrl: modelStepUrl,
|