easyeda 0.0.336 → 0.0.337
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 -3
- package/dist/browser/index.js.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +9 -4
- package/dist/main.cjs.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -12527,6 +12527,11 @@ ${polarizedPinLabelsString}
|
|
|
12527
12527
|
|
|
12528
12528
|
` : "";
|
|
12529
12529
|
const polarizedPinLabelsProp = polarizedPinLabels ? ` pinLabels={pinLabels}
|
|
12530
|
+
` : "";
|
|
12531
|
+
const isPolarizedCapacitor = componentType === "capacitor" && circuitJson.filter((item) => item.type === "source_port").length === 2 && polarizedPinMetadata !== void 0;
|
|
12532
|
+
const capacitorPolarizedPinLabelsBlock = isPolarizedCapacitor ? polarizedPinLabelsBlock : "";
|
|
12533
|
+
const capacitorPolarizedPinLabelsProp = isPolarizedCapacitor ? polarizedPinLabelsProp : "";
|
|
12534
|
+
const polarizedProp = isPolarizedCapacitor ? ` polarized
|
|
12530
12535
|
` : "";
|
|
12531
12536
|
const symbolProp = symbolTsx ? ` symbol={
|
|
12532
12537
|
${symbolTsx.split("\n").map((line) => ` ${line}`).join("\n")}
|
|
@@ -12645,14 +12650,14 @@ ${cadModelLines}
|
|
|
12645
12650
|
return `
|
|
12646
12651
|
import type { CapacitorProps } from "@tscircuit/props"
|
|
12647
12652
|
|
|
12648
|
-
export const ${componentName} = (props: Omit<CapacitorProps, "capacitance">) => {
|
|
12653
|
+
${capacitorPolarizedPinLabelsBlock}export const ${componentName} = (props: Omit<CapacitorProps, "capacitance">) => {
|
|
12649
12654
|
const { name = "C1", ...restProps } = props
|
|
12650
12655
|
|
|
12651
12656
|
return (
|
|
12652
12657
|
<capacitor
|
|
12653
12658
|
name={name}
|
|
12654
12659
|
capacitance=${JSON.stringify(capacitance2)}
|
|
12655
|
-
${symbolProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
|
|
12660
|
+
${capacitorPolarizedPinLabelsProp}${polarizedProp}${symbolProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
|
|
12656
12661
|
manufacturerPartNumber="${manufacturerPartNumber}"
|
|
12657
12662
|
footprint={${footprintTsx}}
|
|
12658
12663
|
${objUrl || stepUrl ? `cadModel={{
|
|
@@ -13042,7 +13047,7 @@ var convertBetterEasyToTsx = async ({
|
|
|
13042
13047
|
const crystalPinVariant = componentType !== "crystal" ? void 0 : sourcePorts.length === 4 ? "four_pin" : sourcePorts.length === 2 ? "two_pin" : void 0;
|
|
13043
13048
|
const isMultiPinDiode = isDiodeCategoryComponent(betterEasy) && sourcePorts.length !== 2;
|
|
13044
13049
|
const isMultiPinInductor = isInductorComponent(betterEasy) && sourcePorts.length !== 2;
|
|
13045
|
-
const isPassiveWithCustomSymbol = componentType === "capacitor";
|
|
13050
|
+
const isPassiveWithCustomSymbol = componentType === "capacitor" && sourcePorts.length !== 2;
|
|
13046
13051
|
const symbolTsx = isPassiveWithCustomSymbol || componentType === "chip" && !isMultiPinDiode && !isMultiPinInductor && hasNonBoxSchematicSymbol(betterEasy) ? generateSymbolTsx(betterEasy, circuitJson, {
|
|
13047
13052
|
alignPortsToDrawing: isPassiveWithCustomSymbol
|
|
13048
13053
|
}) : void 0;
|