@tscircuit/core 0.0.505 → 0.0.507
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 +17 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3256,20 +3256,20 @@ var getAllDimensionsForSchematicBox = (params) => {
|
|
|
3256
3256
|
truePinIndex++;
|
|
3257
3257
|
}
|
|
3258
3258
|
let schWidth = params.schWidth;
|
|
3259
|
-
if (
|
|
3259
|
+
if (schWidth === void 0) {
|
|
3260
3260
|
schWidth = Math.max(
|
|
3261
3261
|
sideLengths.top + params.schPinSpacing * 2,
|
|
3262
3262
|
sideLengths.bottom + params.schPinSpacing * 2
|
|
3263
3263
|
);
|
|
3264
|
+
const labelWidth = params.pinLabels ? Math.max(
|
|
3265
|
+
...Object.values(params.pinLabels).map(
|
|
3266
|
+
(label) => label.length * 0.1
|
|
3267
|
+
// Estimated text width
|
|
3268
|
+
)
|
|
3269
|
+
) : 0;
|
|
3270
|
+
const LABEL_PADDING = labelWidth > 0 ? 1.1 : 0;
|
|
3271
|
+
schWidth = Math.max(schWidth, labelWidth + LABEL_PADDING);
|
|
3264
3272
|
}
|
|
3265
|
-
const labelWidth = params.pinLabels ? Math.max(
|
|
3266
|
-
...Object.values(params.pinLabels).map(
|
|
3267
|
-
(label) => label.length * 0.1
|
|
3268
|
-
// Estimated text width
|
|
3269
|
-
)
|
|
3270
|
-
) : 0;
|
|
3271
|
-
const LABEL_PADDING = labelWidth > 0 ? 1.1 : 0;
|
|
3272
|
-
schWidth = Math.max(schWidth, labelWidth + LABEL_PADDING);
|
|
3273
3273
|
let schHeight = params.schHeight;
|
|
3274
3274
|
if (!schHeight) {
|
|
3275
3275
|
schHeight = Math.max(
|
|
@@ -9955,7 +9955,13 @@ var Crystal = class extends NormalComponent {
|
|
|
9955
9955
|
});
|
|
9956
9956
|
}
|
|
9957
9957
|
_getSchematicSymbolDisplayValue() {
|
|
9958
|
-
|
|
9958
|
+
const freqDisplay = `${formatSiUnit6(this._parsedProps.frequency)}Hz`;
|
|
9959
|
+
if (this._parsedProps.loadCapacitance) {
|
|
9960
|
+
return `${freqDisplay} / ${formatSiUnit6(
|
|
9961
|
+
this._parsedProps.loadCapacitance
|
|
9962
|
+
)}F`;
|
|
9963
|
+
}
|
|
9964
|
+
return freqDisplay;
|
|
9959
9965
|
}
|
|
9960
9966
|
doInitialSourceRender() {
|
|
9961
9967
|
const { db } = this.root;
|
|
@@ -10417,7 +10423,7 @@ import { identity as identity4 } from "transformation-matrix";
|
|
|
10417
10423
|
var package_default = {
|
|
10418
10424
|
name: "@tscircuit/core",
|
|
10419
10425
|
type: "module",
|
|
10420
|
-
version: "0.0.
|
|
10426
|
+
version: "0.0.506",
|
|
10421
10427
|
types: "dist/index.d.ts",
|
|
10422
10428
|
main: "dist/index.js",
|
|
10423
10429
|
module: "dist/index.js",
|