easyeda 0.0.292 → 0.0.294
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 -5
- package/dist/browser/index.js.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +10 -6
- package/dist/main.cjs.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -12080,9 +12080,9 @@ var hasNonBoxSchematicSymbol = (easyEdaJson) => {
|
|
|
12080
12080
|
};
|
|
12081
12081
|
|
|
12082
12082
|
// lib/websafe/convert-to-typescript-component/index.tsx
|
|
12083
|
-
var getGeneratedComponentType = (betterEasy) => {
|
|
12084
|
-
if (isLedCategoryComponent(betterEasy)) return "led";
|
|
12085
|
-
if (isDiodeCategoryComponent(betterEasy)) return "diode";
|
|
12083
|
+
var getGeneratedComponentType = (betterEasy, pinCount) => {
|
|
12084
|
+
if (isLedCategoryComponent(betterEasy) && pinCount === 2) return "led";
|
|
12085
|
+
if (isDiodeCategoryComponent(betterEasy) && pinCount === 2) return "diode";
|
|
12086
12086
|
if (isPushbuttonCategoryComponent(betterEasy)) return "pushbutton";
|
|
12087
12087
|
if (isSwitchCategoryComponent(betterEasy)) return "switch";
|
|
12088
12088
|
if (isInductorComponent(betterEasy)) return "inductor";
|
|
@@ -12152,11 +12152,15 @@ var convertBetterEasyToTsx = async ({
|
|
|
12152
12152
|
const supplierPartNumbers = {
|
|
12153
12153
|
jlcpcb: [betterEasy.lcsc.number]
|
|
12154
12154
|
};
|
|
12155
|
-
const componentType = getGeneratedComponentType(
|
|
12155
|
+
const componentType = getGeneratedComponentType(
|
|
12156
|
+
betterEasy,
|
|
12157
|
+
sourcePorts.length
|
|
12158
|
+
);
|
|
12156
12159
|
const inductance2 = componentType === "inductor" ? betterEasy.dataStr.head.c_para.Value?.trim() : void 0;
|
|
12157
12160
|
const crystalFrequency = componentType === "crystal" ? betterEasy.dataStr.head.c_para.Value?.trim() : void 0;
|
|
12158
12161
|
const crystalPinVariant = componentType !== "crystal" ? void 0 : sourcePorts.length === 4 ? "four_pin" : sourcePorts.length === 2 ? "two_pin" : void 0;
|
|
12159
|
-
const
|
|
12162
|
+
const isMultiPinDiode = isDiodeCategoryComponent(betterEasy) && sourcePorts.length !== 2;
|
|
12163
|
+
const symbolTsx = componentType === "chip" && !isMultiPinDiode && hasNonBoxSchematicSymbol(betterEasy) ? generateSymbolTsx(betterEasy, circuitJson) : void 0;
|
|
12160
12164
|
return generateTypescriptComponent({
|
|
12161
12165
|
componentName,
|
|
12162
12166
|
manufacturerPartNumber,
|