@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 +5 -0
- package/lib/solvers/AvailableNetOrientationSolver/AvailableNetOrientationSolver.ts +12 -1
- package/package.json +1 -1
- package/site/bug-reports/bug-report-20260831T133233Z.page.tsx +4 -0
- package/tests/bug-reports/bug-report-20260721T221026Z/__snapshots__/bug-report-20260721T221026Z.snap.svg +18 -18
- package/tests/bug-reports/bug-report-20260831T133233Z/__snapshots__/bug-report-20260831T133233Z.snap.svg +85 -0
- package/tests/bug-reports/bug-report-20260831T133233Z/bug-report-20260831T133233Z.json +172 -0
- package/tests/bug-reports/bug-report-20260831T133233Z/bug-report-20260831T133233Z.test.ts +25 -0
- package/tests/repros/__snapshots__/repro-bq40z60-current-sense.snap.svg +94 -0
- package/tests/repros/__snapshots__/repro-pmp11282-isolated-dcdc.snap.svg +10 -10
- package/tests/repros/__snapshots__/repro-ti-power-output-section.snap.svg +87 -87
- package/tests/repros/__snapshots__/repro-tida-01389-hbridge.snap.svg +47 -153
- package/tests/repros/__snapshots__/repro-tida010076-page02.snap.svg +1625 -1625
- package/tests/repros/assets/repro-bq40z60-current-sense.input.json +158 -0
- package/tests/repros/assets/repro-tida-01389-hbridge.input.json +67 -657
- package/tests/repros/repro-bq40z60-current-sense.test.ts +18 -0
- package/tests/repros/repro-tida-01389-hbridge.test.ts +27 -6
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 {
|
|
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