@tscircuit/core 0.0.513 → 0.0.515

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
@@ -14745,7 +14745,7 @@ declare const normalizePinLabels: (inputPinLabels: string[][]) => string[][];
14745
14745
  type Nums16 = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16";
14746
14746
  type Nums40 = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "32" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "40";
14747
14747
  type PinNumbers100 = "pin0" | "pin1" | "pin2" | "pin3" | "pin4" | "pin5" | "pin6" | "pin7" | "pin8" | "pin9" | "pin10" | "pin11" | "pin12" | "pin13" | "pin14" | "pin15" | "pin16" | "pin17" | "pin18" | "pin19" | "pin20" | "pin21" | "pin22" | "pin23" | "pin24" | "pin25" | "pin26" | "pin27" | "pin28" | "pin29" | "pin30" | "pin31" | "pin32" | "pin33" | "pin34" | "pin35" | "pin36" | "pin37" | "pin38" | "pin39" | "pin40" | "pin41" | "pin42" | "pin43" | "pin44" | "pin45" | "pin46" | "pin47" | "pin48" | "pin49" | "pin50" | "pin51" | "pin52" | "pin53" | "pin54" | "pin55" | "pin56" | "pin57" | "pin58" | "pin59" | "pin60" | "pin61" | "pin62" | "pin63" | "pin64" | "pin65" | "pin66" | "pin67" | "pin68" | "pin69" | "pin70" | "pin71" | "pin72" | "pin73" | "pin74" | "pin75" | "pin76" | "pin77" | "pin78" | "pin79" | "pin80" | "pin81" | "pin82" | "pin83" | "pin84" | "pin85" | "pin86" | "pin87" | "pin88" | "pin89" | "pin90" | "pin91" | "pin92" | "pin93" | "pin94" | "pin95" | "pin96" | "pin97" | "pin98" | "pin99" | "pin100";
14748
- type CommonPinNames = "pos" | "neg" | "V5" | "V3_3" | "PWR" | "VCC" | "VDD" | "GND" | "SHLD" | `D${Nums40}` | `GP${Nums40}` | `GPIO${Nums40}` | "DP" | "DN" | "VIN" | "VOUT" | "VREF" | "VIN" | "VOUT" | "VREF" | "VUSB" | "VIN" | "VOUT" | "VREF" | "OUT" | "DISCH" | "EN" | "IN" | "CLK" | "DATA" | "THRES" | "TRIG" | "RESET" | "DM" | "DP" | "CC1" | "CC2" | "N_CS" | "N_WP" | "N_HOLD" | "SCL" | "SDA" | "MOSI" | "MISO" | "SCK" | "CS" | "INT" | "N_INT" | `A${Nums40}` | `B${Nums40}` | PinNumbers100;
14748
+ type CommonPinNames = "pos" | "neg" | "V5" | "V3_3" | "PWR" | "VCC" | "VDD" | "GND" | "SHLD" | `D${Nums40}` | `GP${Nums40}` | `GPIO${Nums40}` | "DP" | "DN" | "VIN" | "VOUT" | "VREF" | "VIN" | "VOUT" | "VREF" | "VUSB" | "VIN" | "VOUT" | "VREF" | "OUT" | "DISCH" | "EN" | "IN" | "CLK" | "DATA" | "THRES" | "TRIG" | "RESET" | "DM" | "DP" | "CC1" | "CC2" | "N_CS" | "N_WP" | "N_HOLD" | "SCL" | "SDA" | "MOSI" | "MISO" | "SCK" | "CS" | "N_CS" | "INT" | "N_INT" | `A${Nums40}` | `B${Nums40}` | PinNumbers100;
14749
14749
  type TransistorPinNames = "base" | "collector" | "emitter" | "gate" | "source" | "drain";
14750
14750
 
14751
14751
  type NonPolarizedSel = Record<`R${Nums40}` | `F${Nums40}`, {
@@ -14774,7 +14774,7 @@ type PolarizedSel = Record<`C${Nums40}` | `L${Nums40}` | `LED${Nums40}` | `D${Nu
14774
14774
  pos: string;
14775
14775
  neg: string;
14776
14776
  }>;
14777
- type CommonNetNames = "VCC" | "GND" | "VDD" | "PWR" | "V5" | "V3_3" | "VIN" | "SHLD" | "EN" | "SCL" | "SDA" | "MOSI" | "MISO" | "SCK" | "CS" | "FLASH_SDO" | "FLASH_SDI" | "FLASH_SCK" | "FLASH_N_CS" | "FLASH_N_WP" | "FLASH_N_HOLD" | "INT" | "N_INT";
14777
+ type CommonNetNames = "VCC" | "GND" | "VDD" | "PWR" | "V5" | "V3_3" | "VIN" | "SHLD" | "EN" | "SCL" | "SDA" | "MOSI" | "MISO" | "SCK" | "CS" | "N_CS" | "FLASH_SDO" | "FLASH_SDI" | "FLASH_SCK" | "FLASH_N_CS" | "FLASH_N_WP" | "FLASH_N_HOLD" | "INT" | "N_INT";
14778
14778
  type TransistorSel = Record<`Q${Nums40}`, Record<TransistorPinNames, string>>;
14779
14779
  type JumperSel = Record<`J${Nums40}` | `JP${Nums40}` | `CN${Nums40}`, Record<PinNumbers100 | CommonPinNames, string> & ChipFnSel>;
14780
14780
  type ChipSel = Record<`U${Nums40}` | "USBC", Record<CommonPinNames | PinNumbers100, string> & ChipFnSel>;
package/dist/index.js CHANGED
@@ -8714,7 +8714,10 @@ var SolderJumper = class extends NormalComponent {
8714
8714
  get config() {
8715
8715
  const props = this._parsedProps ?? this.props;
8716
8716
  let resolvedPinCount = props.pinCount;
8717
- if (!resolvedPinCount) {
8717
+ if (props.pinCount == null && !props.footprint) {
8718
+ resolvedPinCount = 2;
8719
+ }
8720
+ if (props.pinCount == null) {
8718
8721
  const nums = (props.bridgedPins ?? []).flat().map((p_str) => this._getPinNumberFromBridgedPinName(p_str)).filter((n) => n !== null);
8719
8722
  const maxPinFromBridged = nums.length > 0 ? Math.max(...nums) : 0;
8720
8723
  const pinCountFromLabels = props.pinLabels ? Object.keys(props.pinLabels).length : 0;
@@ -8749,7 +8752,10 @@ var SolderJumper = class extends NormalComponent {
8749
8752
  _getSchematicPortArrangement() {
8750
8753
  const arrangement = super._getSchematicPortArrangement();
8751
8754
  if (arrangement && Object.keys(arrangement).length > 0) return arrangement;
8752
- const pinCount = this._parsedProps.pinCount ?? (Array.isArray(this._parsedProps.pinLabels) ? this._parsedProps.pinLabels.length : this._parsedProps.pinLabels ? Object.keys(this._parsedProps.pinLabels).length : this.getPortsFromFootprint().length);
8755
+ let pinCount = this._parsedProps.pinCount ?? (Array.isArray(this._parsedProps.pinLabels) ? this._parsedProps.pinLabels.length : this._parsedProps.pinLabels ? Object.keys(this._parsedProps.pinLabels).length : this.getPortsFromFootprint().length);
8756
+ if (pinCount == null && !this._parsedProps.footprint) {
8757
+ pinCount = 2;
8758
+ }
8753
8759
  const direction = this._parsedProps.schDirection ?? "right";
8754
8760
  return {
8755
8761
  leftSize: direction === "left" ? pinCount : 0,
@@ -10423,7 +10429,7 @@ import { identity as identity4 } from "transformation-matrix";
10423
10429
  var package_default = {
10424
10430
  name: "@tscircuit/core",
10425
10431
  type: "module",
10426
- version: "0.0.511",
10432
+ version: "0.0.514",
10427
10433
  types: "dist/index.d.ts",
10428
10434
  main: "dist/index.js",
10429
10435
  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.513",
4
+ "version": "0.0.515",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",