@tscircuit/schematic-trace-solver 0.0.173 → 0.0.174

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
@@ -9902,6 +9902,11 @@ var AvailableNetOrientationSolver = class extends BaseSolver {
9902
9902
  if (this.obstacleIndex.doesTracePathCrossChip(connectorTrace)) {
9903
9903
  return "chip-collision";
9904
9904
  }
9905
+ for (const textBox of this.inputProblem.textBoxes ?? []) {
9906
+ if (tracePathIntersectsBounds(connectorTrace, getTextBoxBounds(textBox))) {
9907
+ return "text-collision";
9908
+ }
9909
+ }
9905
9910
  for (const i of this.obstacleIndex.getLabelIndicesNearTracePath(
9906
9911
  connectorTrace
9907
9912
  )) {
@@ -18,7 +18,10 @@ import type {
18
18
  } from "lib/types/InputProblem"
19
19
  import { dir, type FacingDirection } from "lib/utils/dir"
20
20
  import { getNetLabelWidthForConnection } from "lib/utils/getNetLabelWidthForConnection"
21
- import { rectIntersectsAnyTextBox } from "lib/utils/textBoxBounds"
21
+ import {
22
+ getTextBoxBounds,
23
+ rectIntersectsAnyTextBox,
24
+ } from "lib/utils/textBoxBounds"
22
25
  import {
23
26
  EPS,
24
27
  LABEL_SEARCH_STEP,
@@ -1476,6 +1479,14 @@ export class AvailableNetOrientationSolver extends BaseSolver {
1476
1479
  return "chip-collision"
1477
1480
  }
1478
1481
 
1482
+ for (const textBox of this.inputProblem.textBoxes ?? []) {
1483
+ if (
1484
+ tracePathIntersectsBounds(connectorTrace, getTextBoxBounds(textBox))
1485
+ ) {
1486
+ return "text-collision"
1487
+ }
1488
+ }
1489
+
1479
1490
  for (const i of this.obstacleIndex.getLabelIndicesNearTracePath(
1480
1491
  connectorTrace,
1481
1492
  )) {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "https://github.com/tscircuit/schematic-trace-solver.git"
6
6
  },
7
7
  "main": "dist/index.js",
8
- "version": "0.0.173",
8
+ "version": "0.0.174",
9
9
  "type": "module",
10
10
  "scripts": {
11
11
  "start": "cosmos",
@@ -0,0 +1,4 @@
1
+ import { PipelineDebugger } from "site/components/PipelineDebugger"
2
+ import inputProblem from "../../tests/bug-reports/bug-report-20260831T133233Z/bug-report-20260831T133233Z.json"
3
+
4
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />