@tscircuit/core 0.0.144 → 0.0.145

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 +10 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2326,9 +2326,18 @@ var NormalComponent = class extends PrimitiveComponent {
2326
2326
  }
2327
2327
  if (!isValidElement(footprint) && footprint && footprint.componentName === "Footprint") {
2328
2328
  const fp2 = footprint;
2329
+ let pinNumber = 1;
2329
2330
  const newPorts2 = [];
2330
2331
  for (const fpChild of fp2.children) {
2331
- const newPort = getPortFromHints(fpChild.props.portHints ?? []);
2332
+ let portHintsList = fpChild.props.portHints ?? [];
2333
+ const hasPinPrefix = portHintsList.some(
2334
+ (hint) => hint.startsWith("pin")
2335
+ );
2336
+ if (!hasPinPrefix) {
2337
+ portHintsList = [...portHintsList, `pin${pinNumber}`];
2338
+ }
2339
+ pinNumber++;
2340
+ const newPort = getPortFromHints(portHintsList);
2332
2341
  if (!newPort) continue;
2333
2342
  newPort.originDescription = `footprint:${footprint}`;
2334
2343
  newPorts2.push(newPort);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.144",
4
+ "version": "0.0.145",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",