@tscircuit/schematic-trace-solver 0.0.25 → 0.0.27
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/.github/workflows/bun-test.yml +8 -0
- package/README.md +28 -0
- package/bunfig.toml +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +31 -6136
- package/lib/solvers/NetLabelPlacementSolver/NetLabelPlacementSolver.ts +0 -1
- package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver.ts +11 -0
- package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver_visualize.ts +0 -1
- package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceLinesSolver.ts +0 -2
- package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver/SchematicTraceSingleLineSolver.ts +0 -1
- package/lib/solvers/TraceOverlapShiftSolver/TraceOverlapIssueSolver/TraceOverlapIssueSolver.ts +0 -2
- package/lib/solvers/TraceOverlapShiftSolver/TraceOverlapShiftSolver.ts +0 -1
- package/package.json +6 -7
- package/site/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver01.page.tsx +574 -0
- package/site/components/DownloadDropdown.tsx +4 -2
- package/site/examples/example01-basic.page.tsx +1 -1
- package/site/examples/example02.page.tsx +1 -1
- package/site/examples/example03.page.tsx +1 -1
- package/site/examples/example04-single-symbol.page.tsx +1 -1
- package/site/examples/example05.page.tsx +1 -1
- package/site/examples/example06.page.tsx +1 -1
- package/site/examples/example07.page.tsx +1 -1
- package/site/examples/example08.page.tsx +1 -1
- package/site/examples/example09.page.tsx +1 -1
- package/site/examples/example10.page.tsx +1 -1
- package/site/examples/example11.page.tsx +1 -1
- package/site/examples/example12.page.tsx +1 -1
- package/site/examples/example13.page.tsx +219 -0
- package/site/examples/example14.page.tsx +210 -0
- package/tests/__snapshots__/svg.snap.svg +3 -0
- package/tests/examples/__snapshots__/example01.snap.svg +157 -0
- package/tests/examples/__snapshots__/example02.snap.svg +262 -0
- package/tests/examples/__snapshots__/example03.snap.svg +282 -0
- package/tests/examples/__snapshots__/example04.snap.svg +87 -0
- package/tests/examples/__snapshots__/example05.snap.svg +190 -0
- package/tests/examples/__snapshots__/example06.snap.svg +94 -0
- package/tests/examples/__snapshots__/example07.snap.svg +204 -0
- package/tests/examples/__snapshots__/example08.snap.svg +136 -0
- package/tests/examples/__snapshots__/example09.snap.svg +484 -0
- package/tests/examples/__snapshots__/example10.snap.svg +135 -0
- package/tests/examples/__snapshots__/example11.snap.svg +162 -0
- package/tests/examples/__snapshots__/example12.snap.svg +145 -0
- package/tests/examples/__snapshots__/example13.snap.svg +316 -0
- package/tests/examples/__snapshots__/example14.snap.svg +213 -0
- package/tests/examples/example01.test.ts +12 -0
- package/tests/examples/example02.test.ts +12 -0
- package/tests/examples/example03.test.ts +12 -0
- package/tests/examples/example04.test.ts +12 -0
- package/tests/examples/example05.test.ts +12 -0
- package/tests/examples/example06.test.ts +12 -0
- package/tests/examples/example07.test.ts +12 -0
- package/tests/examples/example08.test.ts +12 -0
- package/tests/examples/example09.test.ts +12 -0
- package/tests/examples/example10.test.ts +12 -0
- package/tests/examples/example11.test.tsx +12 -0
- package/tests/examples/example12.test.tsx +12 -0
- package/tests/examples/example13.test.tsx +12 -0
- package/tests/examples/example14.test.tsx +12 -0
- package/tests/fixtures/matcher.ts +62 -0
- package/tests/fixtures/preload.ts +1 -0
- package/tests/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver01.test.ts +13 -0
- package/tests/svg.test.ts +11 -0
package/README.md
CHANGED
|
@@ -81,3 +81,31 @@ const solver = new SchematicTracePipelineSolver({
|
|
|
81
81
|
|
|
82
82
|
solver.solve()
|
|
83
83
|
```
|
|
84
|
+
|
|
85
|
+
## Development
|
|
86
|
+
|
|
87
|
+
### Running locally
|
|
88
|
+
|
|
89
|
+
Every `*.page.tsx` file in the `site` directory automatically appears in the
|
|
90
|
+
browser when you run `bun run start`. You should add pages to help you debug
|
|
91
|
+
various solvers.
|
|
92
|
+
|
|
93
|
+
By clicking the solver name at the top of the page, you can download specific
|
|
94
|
+
inputs for each solver. This can help to reproduce bugs in the solvers that
|
|
95
|
+
only appear at certain iterations.
|
|
96
|
+
|
|
97
|
+
### Downloading input problems from tscircuit
|
|
98
|
+
|
|
99
|
+
1. Create a test in [tscircuit/core](https://github.com/tscircuit/core)
|
|
100
|
+
2. Set `DEBUG=Group_doInitialSchematicTraceRender`
|
|
101
|
+
3. Run the test with `bun test`
|
|
102
|
+
4. The console output will show the location of the input problem
|
|
103
|
+
5. Copy the input problem and [paste it into the input debugger](https://schematic-trace-solver.vercel.app/?fixture=%7B%22path%22%3A%22site%2Fexamples%2Fexample01-basic.page.tsx%22%7D)
|
|
104
|
+
6. Download the `page.tsx` or `test.tsx` file and put it in the `site` or `tests` directories.
|
|
105
|
+
|
|
106
|
+
<img width="1288" height="1128" alt="image" src="https://github.com/user-attachments/assets/c067f7f9-c46c-4600-a0a4-5112440bd2f4" />
|
|
107
|
+
|
|
108
|
+
### Updating Test Snapshots
|
|
109
|
+
|
|
110
|
+
1. `export BUN_UPDATE_SNAPSHOTS=1`
|
|
111
|
+
2. `bun test`
|
package/bunfig.toml
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -331,6 +331,7 @@ declare class SingleNetLabelPlacementSolver extends BaseSolver {
|
|
|
331
331
|
overlappingSameNetTraceGroup: OverlappingSameNetTraceGroup;
|
|
332
332
|
availableOrientations: FacingDirection[];
|
|
333
333
|
});
|
|
334
|
+
getConstructorParams(): ConstructorParameters<typeof SingleNetLabelPlacementSolver>[0];
|
|
334
335
|
_step(): void;
|
|
335
336
|
visualize(): GraphicsObject;
|
|
336
337
|
}
|