easyeda 0.0.292 → 0.0.293
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 +8 -4
- package/dist/browser/index.js.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +9 -5
- package/dist/main.cjs.map +1 -1
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -3528,7 +3528,7 @@ var import_promises = __toESM(require("fs/promises"), 1);
|
|
|
3528
3528
|
var package_default = {
|
|
3529
3529
|
name: "easyeda",
|
|
3530
3530
|
type: "module",
|
|
3531
|
-
version: "0.0.
|
|
3531
|
+
version: "0.0.292",
|
|
3532
3532
|
files: [
|
|
3533
3533
|
"dist"
|
|
3534
3534
|
],
|
|
@@ -11788,9 +11788,9 @@ var hasNonBoxSchematicSymbol = (easyEdaJson) => {
|
|
|
11788
11788
|
};
|
|
11789
11789
|
|
|
11790
11790
|
// lib/websafe/convert-to-typescript-component/index.tsx
|
|
11791
|
-
var getGeneratedComponentType = (betterEasy) => {
|
|
11791
|
+
var getGeneratedComponentType = (betterEasy, pinCount) => {
|
|
11792
11792
|
if (isLedCategoryComponent(betterEasy)) return "led";
|
|
11793
|
-
if (isDiodeCategoryComponent(betterEasy)) return "diode";
|
|
11793
|
+
if (isDiodeCategoryComponent(betterEasy) && pinCount === 2) return "diode";
|
|
11794
11794
|
if (isPushbuttonCategoryComponent(betterEasy)) return "pushbutton";
|
|
11795
11795
|
if (isSwitchCategoryComponent(betterEasy)) return "switch";
|
|
11796
11796
|
if (isInductorComponent(betterEasy)) return "inductor";
|
|
@@ -11860,11 +11860,15 @@ var convertBetterEasyToTsx = async ({
|
|
|
11860
11860
|
const supplierPartNumbers = {
|
|
11861
11861
|
jlcpcb: [betterEasy.lcsc.number]
|
|
11862
11862
|
};
|
|
11863
|
-
const componentType = getGeneratedComponentType(
|
|
11863
|
+
const componentType = getGeneratedComponentType(
|
|
11864
|
+
betterEasy,
|
|
11865
|
+
sourcePorts.length
|
|
11866
|
+
);
|
|
11864
11867
|
const inductance2 = componentType === "inductor" ? betterEasy.dataStr.head.c_para.Value?.trim() : void 0;
|
|
11865
11868
|
const crystalFrequency = componentType === "crystal" ? betterEasy.dataStr.head.c_para.Value?.trim() : void 0;
|
|
11866
11869
|
const crystalPinVariant = componentType !== "crystal" ? void 0 : sourcePorts.length === 4 ? "four_pin" : sourcePorts.length === 2 ? "two_pin" : void 0;
|
|
11867
|
-
const
|
|
11870
|
+
const isMultiPinDiode = isDiodeCategoryComponent(betterEasy) && sourcePorts.length !== 2;
|
|
11871
|
+
const symbolTsx = componentType === "chip" && !isMultiPinDiode && hasNonBoxSchematicSymbol(betterEasy) ? generateSymbolTsx(betterEasy, circuitJson) : void 0;
|
|
11868
11872
|
return generateTypescriptComponent({
|
|
11869
11873
|
componentName,
|
|
11870
11874
|
manufacturerPartNumber,
|