@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.
Files changed (2) hide show
  1. package/dist/index.js +17 -11
  2. 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 (!schWidth) {
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
- return `${formatSiUnit6(this._parsedProps.frequency)}Hz`;
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.504",
10426
+ version: "0.0.506",
10421
10427
  types: "dist/index.d.ts",
10422
10428
  main: "dist/index.js",
10423
10429
  module: "dist/index.js",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.505",
4
+ "version": "0.0.507",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",