@tscircuit/capacity-autorouter 0.0.5 → 0.0.6

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.js CHANGED
@@ -4209,10 +4209,11 @@ var NetToPointPairsSolver = class extends BaseSolver {
4209
4209
  return;
4210
4210
  }
4211
4211
  const edges = buildMinimumSpanningTree(connection.pointsToConnect);
4212
- for (const edge of edges) {
4212
+ for (let i = 0; i < edges.length; i++) {
4213
+ const edge = edges[i];
4213
4214
  this.newConnections.push({
4214
4215
  pointsToConnect: [edge.from, edge.to],
4215
- name: connection.name
4216
+ name: `${connection.name}_mst${i}`
4216
4217
  });
4217
4218
  }
4218
4219
  }
@@ -4339,10 +4340,10 @@ var CapacityMeshSolver = class extends BaseSolver {
4339
4340
  return;
4340
4341
  }
4341
4342
  if (!this.nodeSolver) {
4342
- this.nodeSolver = new CapacityMeshNodeSolver(
4343
- this.netToPointPairsSolver.getNewSimpleRouteJson(),
4344
- this.opts
4345
- );
4343
+ const newSrj = this.netToPointPairsSolver.getNewSimpleRouteJson();
4344
+ this.connMap = getConnectivityMapFromSimpleRouteJson(newSrj);
4345
+ this.colorMap = getColorMap(newSrj, this.connMap);
4346
+ this.nodeSolver = new CapacityMeshNodeSolver(newSrj, this.opts);
4346
4347
  this.activeSolver = this.nodeSolver;
4347
4348
  return;
4348
4349
  }