@tscircuit/core 0.0.156 → 0.0.157
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/index.js +10 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2048,6 +2048,14 @@ var getAllDimensionsForSchematicBox = (params) => {
|
|
|
2048
2048
|
sideLengths.bottom + params.schPinSpacing * 2
|
|
2049
2049
|
);
|
|
2050
2050
|
}
|
|
2051
|
+
const labelWidth = params.pinLabels ? Math.max(
|
|
2052
|
+
...Object.values(params.pinLabels).map(
|
|
2053
|
+
(label) => label.length * 0.1
|
|
2054
|
+
// Estimated text width
|
|
2055
|
+
)
|
|
2056
|
+
) : 0;
|
|
2057
|
+
const LABEL_PADDING = 1.1;
|
|
2058
|
+
schWidth = Math.max(schWidth, labelWidth + LABEL_PADDING);
|
|
2051
2059
|
let schHeight = params.schHeight;
|
|
2052
2060
|
if (!schHeight) {
|
|
2053
2061
|
schHeight = Math.max(
|
|
@@ -2806,7 +2814,8 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
2806
2814
|
schPinSpacing: pinSpacing,
|
|
2807
2815
|
schPinStyle: props.schPinStyle,
|
|
2808
2816
|
pinCount,
|
|
2809
|
-
schPortArrangement: this._getSchematicPortArrangement()
|
|
2817
|
+
schPortArrangement: this._getSchematicPortArrangement(),
|
|
2818
|
+
pinLabels: props.pinLabels
|
|
2810
2819
|
});
|
|
2811
2820
|
return dimensions;
|
|
2812
2821
|
}
|