@tscircuit/core 0.0.912 → 0.0.913

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.d.ts CHANGED
@@ -18851,6 +18851,7 @@ declare class VoltageSource extends NormalComponent<typeof voltageSourceProps, "
18851
18851
  runRenderPhaseForChildren(phase: RenderPhase): void;
18852
18852
  doInitialPcbComponentRender(): void;
18853
18853
  initPorts(): void;
18854
+ _getSchematicSymbolDisplayValue(): string | undefined;
18854
18855
  doInitialSourceRender(): void;
18855
18856
  doInitialSimulationRender(): void;
18856
18857
  terminal1: Port;
package/dist/index.js CHANGED
@@ -16579,6 +16579,7 @@ var PowerSource = class extends NormalComponent3 {
16579
16579
 
16580
16580
  // lib/components/normal-components/VoltageSource.ts
16581
16581
  import { voltageSourceProps } from "@tscircuit/props";
16582
+ import { formatSiUnit as formatSiUnit5 } from "format-si-unit";
16582
16583
  var VoltageSource = class extends NormalComponent3 {
16583
16584
  get config() {
16584
16585
  const isSquare = this.props.waveShape === "square";
@@ -16608,6 +16609,17 @@ var VoltageSource = class extends NormalComponent3 {
16608
16609
  }
16609
16610
  });
16610
16611
  }
16612
+ _getSchematicSymbolDisplayValue() {
16613
+ const { voltage, frequency: frequency2 } = this._parsedProps;
16614
+ const parts = [];
16615
+ if (voltage !== void 0) {
16616
+ parts.push(`${formatSiUnit5(voltage)}V`);
16617
+ }
16618
+ if (frequency2 !== void 0) {
16619
+ parts.push(`${formatSiUnit5(frequency2)}Hz`);
16620
+ }
16621
+ return parts.length > 0 ? parts.join(" ") : void 0;
16622
+ }
16611
16623
  doInitialSourceRender() {
16612
16624
  const { db } = this.root;
16613
16625
  const { _parsedProps: props } = this;
@@ -18034,7 +18046,7 @@ var PinHeader = class extends NormalComponent3 {
18034
18046
 
18035
18047
  // lib/components/normal-components/Resonator.ts
18036
18048
  import { resonatorProps } from "@tscircuit/props";
18037
- import { formatSiUnit as formatSiUnit5 } from "format-si-unit";
18049
+ import { formatSiUnit as formatSiUnit6 } from "format-si-unit";
18038
18050
  function getResonatorSymbolName(variant) {
18039
18051
  switch (variant) {
18040
18052
  case "two_ground_pins":
@@ -18072,9 +18084,9 @@ var Resonator = class extends NormalComponent3 {
18072
18084
  this.source_component_id = source_component.source_component_id;
18073
18085
  }
18074
18086
  _getSchematicSymbolDisplayValue() {
18075
- const freqDisplay = `${formatSiUnit5(this._parsedProps.frequency)}Hz`;
18087
+ const freqDisplay = `${formatSiUnit6(this._parsedProps.frequency)}Hz`;
18076
18088
  if (this._parsedProps.loadCapacitance) {
18077
- return `${freqDisplay} / ${formatSiUnit5(this._parsedProps.loadCapacitance)}F`;
18089
+ return `${freqDisplay} / ${formatSiUnit6(this._parsedProps.loadCapacitance)}F`;
18078
18090
  }
18079
18091
  return freqDisplay;
18080
18092
  }
@@ -18082,7 +18094,7 @@ var Resonator = class extends NormalComponent3 {
18082
18094
 
18083
18095
  // lib/components/normal-components/Potentiometer.ts
18084
18096
  import { potentiometerProps } from "@tscircuit/props";
18085
- import { formatSiUnit as formatSiUnit6 } from "format-si-unit";
18097
+ import { formatSiUnit as formatSiUnit7 } from "format-si-unit";
18086
18098
  function getPotentiometerSymbolName(variant) {
18087
18099
  switch (variant) {
18088
18100
  case "three_pin":
@@ -18103,7 +18115,7 @@ var Potentiometer = class extends NormalComponent3 {
18103
18115
  };
18104
18116
  }
18105
18117
  _getSchematicSymbolDisplayValue() {
18106
- return `${formatSiUnit6(this._parsedProps.maxResistance)}\u03A9`;
18118
+ return `${formatSiUnit7(this._parsedProps.maxResistance)}\u03A9`;
18107
18119
  }
18108
18120
  doInitialSourceRender() {
18109
18121
  const { db } = this.root;
@@ -18187,7 +18199,7 @@ var PushButton = class extends NormalComponent3 {
18187
18199
 
18188
18200
  // lib/components/normal-components/Crystal.ts
18189
18201
  import { crystalProps } from "@tscircuit/props";
18190
- import { formatSiUnit as formatSiUnit7 } from "format-si-unit";
18202
+ import { formatSiUnit as formatSiUnit8 } from "format-si-unit";
18191
18203
  var Crystal = class extends NormalComponent3 {
18192
18204
  // @ts-ignore
18193
18205
  get config() {
@@ -18214,9 +18226,9 @@ var Crystal = class extends NormalComponent3 {
18214
18226
  });
18215
18227
  }
18216
18228
  _getSchematicSymbolDisplayValue() {
18217
- const freqDisplay = `${formatSiUnit7(this._parsedProps.frequency)}Hz`;
18229
+ const freqDisplay = `${formatSiUnit8(this._parsedProps.frequency)}Hz`;
18218
18230
  if (this._parsedProps.loadCapacitance) {
18219
- return `${freqDisplay} / ${formatSiUnit7(
18231
+ return `${freqDisplay} / ${formatSiUnit8(
18220
18232
  this._parsedProps.loadCapacitance
18221
18233
  )}F`;
18222
18234
  }
@@ -19140,7 +19152,7 @@ import { identity as identity5 } from "transformation-matrix";
19140
19152
  var package_default = {
19141
19153
  name: "@tscircuit/core",
19142
19154
  type: "module",
19143
- version: "0.0.910",
19155
+ version: "0.0.912",
19144
19156
  types: "dist/index.d.ts",
19145
19157
  main: "dist/index.js",
19146
19158
  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.912",
4
+ "version": "0.0.913",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",