easyeda 0.0.48 → 0.0.49
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.
|
@@ -2342,7 +2342,8 @@ var soupTypescriptComponentTemplate = ({
|
|
|
2342
2342
|
componentName,
|
|
2343
2343
|
schPinArrangement,
|
|
2344
2344
|
objUrl,
|
|
2345
|
-
circuitJson
|
|
2345
|
+
circuitJson,
|
|
2346
|
+
supplierPartNumbers
|
|
2346
2347
|
}) => {
|
|
2347
2348
|
const footprintTsx = generateFootprintTsx(circuitJson);
|
|
2348
2349
|
return `
|
|
@@ -2360,7 +2361,6 @@ export const ${componentName} = (props: Props) => {
|
|
|
2360
2361
|
return (
|
|
2361
2362
|
<chip
|
|
2362
2363
|
{...props}
|
|
2363
|
-
footprint={${footprintTsx}}
|
|
2364
2364
|
${objUrl ? `cadModel={{
|
|
2365
2365
|
objUrl: "${objUrl}",
|
|
2366
2366
|
rotationOffset: { x: 0, y: 0, z: 0 },
|
|
@@ -2369,6 +2369,8 @@ export const ${componentName} = (props: Props) => {
|
|
|
2369
2369
|
pinLabels={pinLabels}
|
|
2370
2370
|
schPinSpacing={0.75}
|
|
2371
2371
|
schPortArrangement={${JSON.stringify(schPinArrangement, null, " ")}}
|
|
2372
|
+
supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
|
|
2373
|
+
footprint={${footprintTsx}}
|
|
2372
2374
|
/>
|
|
2373
2375
|
)
|
|
2374
2376
|
}
|
|
@@ -2406,11 +2408,13 @@ var convertBetterEasyToTsx = async ({
|
|
|
2406
2408
|
const pn = normalizeManufacturerPartNumber(rawPn);
|
|
2407
2409
|
const [cad_component2] = su_default(circuitJson).cad_component.list();
|
|
2408
2410
|
const pinLabels = {};
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2411
|
+
for (const shape of betterEasy.dataStr.shape) {
|
|
2412
|
+
if (shape.type === "PIN") {
|
|
2413
|
+
const isPinLabelNumeric = /^\d+$/.test(shape.label);
|
|
2414
|
+
const label = isPinLabelNumeric ? `pin${shape.label}` : shape.label;
|
|
2415
|
+
pinLabels[shape.pinNumber.toString()] = label;
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2414
2418
|
const pins = betterEasy.dataStr.shape.filter((shape) => shape.type === "PIN");
|
|
2415
2419
|
const leftPins = pins.filter((pin) => pin.rotation === 180);
|
|
2416
2420
|
const rightPins = pins.filter((pin) => pin.rotation === 0);
|
|
@@ -2433,12 +2437,16 @@ var convertBetterEasyToTsx = async ({
|
|
|
2433
2437
|
modelObjUrl = cad_component2.model_obj_url;
|
|
2434
2438
|
}
|
|
2435
2439
|
}
|
|
2440
|
+
const supplierPartNumbers = {
|
|
2441
|
+
lcsc: [betterEasy.lcsc.number]
|
|
2442
|
+
};
|
|
2436
2443
|
return soupTypescriptComponentTemplate({
|
|
2437
2444
|
componentName: pn,
|
|
2438
2445
|
pinLabels,
|
|
2439
2446
|
schPinArrangement,
|
|
2440
2447
|
objUrl: modelObjUrl,
|
|
2441
|
-
circuitJson
|
|
2448
|
+
circuitJson,
|
|
2449
|
+
supplierPartNumbers
|
|
2442
2450
|
});
|
|
2443
2451
|
};
|
|
2444
2452
|
var checkModelObjUrlValidity = async (url) => {
|
|
@@ -2542,4 +2550,4 @@ export {
|
|
|
2542
2550
|
convertRawEasyToTsx,
|
|
2543
2551
|
convertEasyEdaJsonToVariousFormats
|
|
2544
2552
|
};
|
|
2545
|
-
//# sourceMappingURL=chunk-
|
|
2553
|
+
//# sourceMappingURL=chunk-GRJJDG5A.js.map
|