@tscircuit/core 0.0.545 → 0.0.547

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 +20 -5
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -6272,7 +6272,22 @@ var NormalComponent = class extends PrimitiveComponent2 {
6272
6272
  const pinCountFromSchematicPortArrangement = this._getPinCountFromSchematicPortArrangement();
6273
6273
  return pinCountFromSchematicPortArrangement;
6274
6274
  }
6275
- return this.getPortsFromFootprint().length;
6275
+ const portsFromFootprint = this.getPortsFromFootprint();
6276
+ if (portsFromFootprint.length > 0) {
6277
+ return portsFromFootprint.length;
6278
+ }
6279
+ const { pinLabels } = this._parsedProps;
6280
+ if (pinLabels) {
6281
+ if (Array.isArray(pinLabels)) {
6282
+ return pinLabels.length;
6283
+ }
6284
+ const pinNumbers = Object.keys(pinLabels).map((k) => k.startsWith("pin") ? parseInt(k.slice(3)) : parseInt(k)).filter((n) => !Number.isNaN(n));
6285
+ if (pinNumbers.length > 0) {
6286
+ return Math.max(...pinNumbers);
6287
+ }
6288
+ return Object.keys(pinLabels).length;
6289
+ }
6290
+ return 0;
6276
6291
  }
6277
6292
  /**
6278
6293
  * Override the schematic port arrangement if you want to customize where pins
@@ -10681,7 +10696,7 @@ import { identity as identity4 } from "transformation-matrix";
10681
10696
  var package_default = {
10682
10697
  name: "@tscircuit/core",
10683
10698
  type: "module",
10684
- version: "0.0.544",
10699
+ version: "0.0.546",
10685
10700
  types: "dist/index.d.ts",
10686
10701
  main: "dist/index.js",
10687
10702
  module: "dist/index.js",
@@ -10715,7 +10730,7 @@ var package_default = {
10715
10730
  "@tscircuit/math-utils": "^0.0.18",
10716
10731
  "@tscircuit/props": "^0.0.251",
10717
10732
  "@tscircuit/schematic-autolayout": "^0.0.6",
10718
- "@tscircuit/schematic-corpus": "^0.0.33",
10733
+ "@tscircuit/schematic-corpus": "^0.0.50",
10719
10734
  "@tscircuit/schematic-match-adapt": "^0.0.16",
10720
10735
  "@tscircuit/simple-3d-svg": "^0.0.6",
10721
10736
  "@types/bun": "^1.2.16",
@@ -10723,8 +10738,8 @@ var package_default = {
10723
10738
  "@types/react": "^19.0.1",
10724
10739
  "@types/react-dom": "^19.0.2",
10725
10740
  "@types/react-reconciler": "^0.28.9",
10726
- "bpc-graph": "^0.0.46",
10727
- "bun-match-svg": "0.0.11",
10741
+ "bpc-graph": "^0.0.50",
10742
+ "bun-match-svg": "0.0.12",
10728
10743
  "calculate-elbow": "^0.0.5",
10729
10744
  "chokidar-cli": "^3.0.0",
10730
10745
  "circuit-json": "^0.0.215",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.545",
4
+ "version": "0.0.547",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "@tscircuit/math-utils": "^0.0.18",
36
36
  "@tscircuit/props": "^0.0.251",
37
37
  "@tscircuit/schematic-autolayout": "^0.0.6",
38
- "@tscircuit/schematic-corpus": "^0.0.33",
38
+ "@tscircuit/schematic-corpus": "^0.0.50",
39
39
  "@tscircuit/schematic-match-adapt": "^0.0.16",
40
40
  "@tscircuit/simple-3d-svg": "^0.0.6",
41
41
  "@types/bun": "^1.2.16",
@@ -43,8 +43,8 @@
43
43
  "@types/react": "^19.0.1",
44
44
  "@types/react-dom": "^19.0.2",
45
45
  "@types/react-reconciler": "^0.28.9",
46
- "bpc-graph": "^0.0.46",
47
- "bun-match-svg": "0.0.11",
46
+ "bpc-graph": "^0.0.50",
47
+ "bun-match-svg": "0.0.12",
48
48
  "calculate-elbow": "^0.0.5",
49
49
  "chokidar-cli": "^3.0.0",
50
50
  "circuit-json": "^0.0.215",