@tscircuit/core 0.0.344 → 0.0.346

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
@@ -179,6 +179,7 @@ interface AutoroutingProgressEvent {
179
179
  subcircuit_id: string;
180
180
  componentDisplayName: string;
181
181
  progress: number;
182
+ iterationsPerSecond?: number;
182
183
  debugGraphics?: any;
183
184
  }
184
185
  interface AutoroutingEndEvent {
@@ -11139,6 +11140,7 @@ type AutorouterProgressEvent = {
11139
11140
  steps: number;
11140
11141
  progress: number;
11141
11142
  phase?: string;
11143
+ iterationsPerSecond?: number;
11142
11144
  debugGraphics?: GraphicsObject;
11143
11145
  };
11144
11146
  type AutorouterEvent = AutorouterCompleteEvent | AutorouterErrorEvent | AutorouterProgressEvent;
package/dist/index.js CHANGED
@@ -5221,12 +5221,14 @@ var CapacityMeshAutorouter = class {
5221
5221
  while (Date.now() - startTime < 250 && !this.solver.failed && !this.solver.solved) {
5222
5222
  this.solver.step();
5223
5223
  }
5224
+ const iterationsPerSecond = (this.solver.iterations - startIterations) / (Date.now() - startTime) * 1e3;
5224
5225
  this.cycleCount++;
5225
5226
  const debugGraphics = this.solver.activeSolver?.visualize() || void 0;
5226
5227
  const progress = this.solver.progress;
5227
5228
  this.emitEvent({
5228
5229
  type: "progress",
5229
5230
  steps: this.cycleCount,
5231
+ iterationsPerSecond,
5230
5232
  progress,
5231
5233
  phase: this.solver.getCurrentPhase(),
5232
5234
  debugGraphics
@@ -5474,7 +5476,11 @@ var getSimpleRouteJsonFromCircuitJson = ({
5474
5476
  [
5475
5477
  ...db.pcb_component.list(),
5476
5478
  ...db.pcb_smtpad.list(),
5477
- ...db.pcb_plated_hole.list()
5479
+ ...db.pcb_plated_hole.list(),
5480
+ ...db.pcb_hole.list(),
5481
+ ...db.pcb_via.list()
5482
+ // getObstaclesFromSoup is old and doesn't support diagonal traces
5483
+ // ...db.pcb_trace.list(),
5478
5484
  ].filter(
5479
5485
  (e) => !subcircuit_id || relevantSubcircuitIds?.has(e.subcircuit_id)
5480
5486
  ),
@@ -5903,6 +5909,7 @@ var Group = class extends NormalComponent {
5903
5909
  }
5904
5910
  }
5905
5911
  _startAsyncAutorouting() {
5912
+ if (this._hasStartedAsyncAutorouting) return;
5906
5913
  this._hasStartedAsyncAutorouting = true;
5907
5914
  if (this._getAutorouterConfig().local) {
5908
5915
  this._queueAsyncEffect(
@@ -7253,7 +7260,7 @@ import { identity as identity4 } from "transformation-matrix";
7253
7260
  var package_default = {
7254
7261
  name: "@tscircuit/core",
7255
7262
  type: "module",
7256
- version: "0.0.343",
7263
+ version: "0.0.345",
7257
7264
  types: "dist/index.d.ts",
7258
7265
  main: "dist/index.js",
7259
7266
  module: "dist/index.js",
@@ -7305,7 +7312,7 @@ var package_default = {
7305
7312
  },
7306
7313
  dependencies: {
7307
7314
  "@lume/kiwi": "^0.4.3",
7308
- "@tscircuit/capacity-autorouter": "^0.0.15",
7315
+ "@tscircuit/capacity-autorouter": "^0.0.17",
7309
7316
  "@tscircuit/infgrid-ijump-astar": "^0.0.33",
7310
7317
  "@tscircuit/math-utils": "^0.0.9",
7311
7318
  "@tscircuit/props": "^0.0.159",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.344",
4
+ "version": "0.0.346",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@lume/kiwi": "^0.4.3",
56
- "@tscircuit/capacity-autorouter": "^0.0.15",
56
+ "@tscircuit/capacity-autorouter": "^0.0.17",
57
57
  "@tscircuit/infgrid-ijump-astar": "^0.0.33",
58
58
  "@tscircuit/math-utils": "^0.0.9",
59
59
  "@tscircuit/props": "^0.0.159",