@tscircuit/core 0.0.84 → 0.0.86

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 +15 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1795,7 +1795,9 @@ var NormalComponent = class extends PrimitiveComponent {
1795
1795
  existingPort.props.name = label;
1796
1796
  }
1797
1797
  }
1798
- this.addAll(portsToCreate);
1798
+ if (portsToCreate.length > 0) {
1799
+ this.addAll(portsToCreate);
1800
+ }
1799
1801
  }
1800
1802
  _addChildrenFromStringFootprint() {
1801
1803
  const { footprint } = this.props;
@@ -1974,11 +1976,6 @@ var NormalComponent = class extends PrimitiveComponent {
1974
1976
  if (!newPort) continue;
1975
1977
  newPorts2.push(newPort);
1976
1978
  }
1977
- if (newPorts2.length === 0) {
1978
- throw new Error(
1979
- `No ports found in chip ${this} (define a schPortArrangement, a footprint or add portHints to elements of the footprint)`
1980
- );
1981
- }
1982
1979
  return newPorts2;
1983
1980
  }
1984
1981
  const newPorts = [];
@@ -2732,6 +2729,12 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
2732
2729
  return p;
2733
2730
  });
2734
2731
  }
2732
+ if (pcbPortA && trace.route[0].route_type === "wire") {
2733
+ trace.route[0].start_pcb_port_id = pcbPortA;
2734
+ }
2735
+ if (pcbPortB && trace.route[0].route_type === "wire") {
2736
+ trace.route[0].end_pcb_port_id = pcbPortB;
2737
+ }
2735
2738
  routes.push(trace.route);
2736
2739
  }
2737
2740
  const mergedRoute = mergeRoutes(routes);
@@ -3028,7 +3031,12 @@ var getAllDimensionsForSchematicBox = (params) => {
3028
3031
  };
3029
3032
  }
3030
3033
  if (!sidePinCounts) {
3031
- throw new Error("Could not determine side sizes for the schematic box");
3034
+ sidePinCounts = {
3035
+ leftSize: 0,
3036
+ rightSize: 0,
3037
+ topSize: 0,
3038
+ bottomSize: 0
3039
+ };
3032
3040
  }
3033
3041
  const orderedTruePorts = [];
3034
3042
  let currentDistanceFromEdge = 0;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.84",
4
+ "version": "0.0.86",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",