@tscircuit/copper-pour-solver 0.0.4 → 0.0.5

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.
Files changed (24) hide show
  1. package/package.json +1 -1
  2. package/tests/{circuit-5.test.ts → 2-layers-bottom.test.ts} +3 -3
  3. package/tests/{circuit-6.test.ts → 2-layers-top.test.ts} +3 -3
  4. package/tests/{circuit-8.test.ts → board-edge-margin-2.test.ts} +3 -3
  5. package/tests/{circuit-7.test.ts → board-edge-margin.test.ts} +3 -3
  6. package/tests/{circuit-2.test.ts → larger-trace-margin.test.ts} +3 -3
  7. package/tests/{circuit-1.test.ts → pad-margin.test.ts} +3 -3
  8. package/tests/{circuit-4.test.ts → polygon-board.test.ts} +3 -3
  9. package/tests/{circuit-3.test.ts → smaller-trace-margin.test.ts} +3 -3
  10. /package/tests/__snapshots__/{circuit-5.snap.svg → 2-layers-bottom.snap.svg} +0 -0
  11. /package/tests/__snapshots__/{circuit-4.snap.svg → 2-layers-top.snap.svg} +0 -0
  12. /package/tests/__snapshots__/{circuit-8.snap.svg → board-edge-margin-2.snap.svg} +0 -0
  13. /package/tests/__snapshots__/{circuit-7.snap.svg → board-edge-margin.snap.svg} +0 -0
  14. /package/tests/__snapshots__/{circuit-2.snap.svg → larger-trace-margin.snap.svg} +0 -0
  15. /package/tests/__snapshots__/{circuit-1.snap.svg → pad-margin.snap.svg} +0 -0
  16. /package/tests/__snapshots__/{circuit-6.snap.svg → polygon-board.snap.svg} +0 -0
  17. /package/tests/__snapshots__/{circuit-3.snap.svg → smaller-trace-margin.snap.svg} +0 -0
  18. /package/tests/assets/{circuit-5.json → 2-layers-bottom.json} +0 -0
  19. /package/tests/assets/{circuit-4.json → 2-layers-top.json} +0 -0
  20. /package/tests/assets/{circuit-8.json → board-edge-margin-2.json} +0 -0
  21. /package/tests/assets/{circuit-2.json → larger-trace-margin.json} +0 -0
  22. /package/tests/assets/{circuit-1.json → pad-margin.json} +0 -0
  23. /package/tests/assets/{circuit-6.json → polygon-board.json} +0 -0
  24. /package/tests/assets/{circuit-3.json → smaller-trace-margin.json} +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/copper-pour-solver",
3
3
  "main": "dist/index.js",
4
- "version": "0.0.4",
4
+ "version": "0.0.5",
5
5
  "scripts": {
6
6
  "format": "biome format . --write",
7
7
  "format:check": "biome format .",
@@ -1,9 +1,9 @@
1
1
  import { expect, test } from "bun:test"
2
- import circuitJson from "./assets/circuit-5.json"
2
+ import circuitJson from "./assets/2-layers-bottom.json"
3
3
  import { runSolverAndRenderToSvg } from "./utils/run-solver-and-render-to-svg"
4
4
  import type { AnyCircuitElement } from "circuit-json"
5
5
 
6
- test("circuit 5", async () => {
6
+ test("2 layers bottom", async () => {
7
7
  const svg = runSolverAndRenderToSvg(circuitJson as AnyCircuitElement[], {
8
8
  layer: "bottom",
9
9
  net_name: "VCC",
@@ -11,5 +11,5 @@ test("circuit 5", async () => {
11
11
  trace_margin: 0.2,
12
12
  })
13
13
 
14
- await expect(svg).toMatchSvgSnapshot(import.meta.path, "circuit-5")
14
+ await expect(svg).toMatchSvgSnapshot(import.meta.path, "2-layers-bottom")
15
15
  })
@@ -1,9 +1,9 @@
1
1
  import { expect, test } from "bun:test"
2
- import circuitJson from "./assets/circuit-6.json"
2
+ import circuitJson from "./assets/2-layers-top.json"
3
3
  import { runSolverAndRenderToSvg } from "./utils/run-solver-and-render-to-svg"
4
4
  import type { AnyCircuitElement } from "circuit-json"
5
5
 
6
- test("circuit 6", async () => {
6
+ test("2 layers top", async () => {
7
7
  const svg = runSolverAndRenderToSvg(circuitJson as AnyCircuitElement[], {
8
8
  layer: "top",
9
9
  net_name: "GND",
@@ -11,5 +11,5 @@ test("circuit 6", async () => {
11
11
  trace_margin: 0.2,
12
12
  })
13
13
 
14
- await expect(svg).toMatchSvgSnapshot(import.meta.path, "circuit-6")
14
+ await expect(svg).toMatchSvgSnapshot(import.meta.path, "2-layers-top")
15
15
  })
@@ -1,9 +1,9 @@
1
1
  import { expect, test } from "bun:test"
2
- import circuitJson from "./assets/circuit-8.json"
2
+ import circuitJson from "./assets/board-edge-margin-2.json"
3
3
  import { runSolverAndRenderToSvg } from "./utils/run-solver-and-render-to-svg"
4
4
  import type { AnyCircuitElement } from "circuit-json"
5
5
 
6
- test("circuit 8", async () => {
6
+ test("board edge margin 2", async () => {
7
7
  const svg = runSolverAndRenderToSvg(circuitJson as AnyCircuitElement[], {
8
8
  layer: "top",
9
9
  net_name: "GND",
@@ -12,5 +12,5 @@ test("circuit 8", async () => {
12
12
  boardEdgeMargin: 1,
13
13
  })
14
14
 
15
- await expect(svg).toMatchSvgSnapshot(import.meta.path, "circuit-8")
15
+ await expect(svg).toMatchSvgSnapshot(import.meta.path, "board-edge-margin-2")
16
16
  })
@@ -1,8 +1,8 @@
1
1
  import { expect, test } from "bun:test"
2
- import circuitJson from "./assets/circuit-6.json"
2
+ import circuitJson from "./assets/polygon-board.json"
3
3
  import { runSolverAndRenderToSvg } from "./utils/run-solver-and-render-to-svg"
4
4
 
5
- test("circuit-7", async () => {
5
+ test("board edge margin", async () => {
6
6
  const svg = runSolverAndRenderToSvg(circuitJson as any, {
7
7
  layer: "top",
8
8
  net_name: "GND",
@@ -11,5 +11,5 @@ test("circuit-7", async () => {
11
11
  boardEdgeMargin: 1,
12
12
  })
13
13
 
14
- await expect(svg).toMatchSvgSnapshot(import.meta.path, "circuit-7")
14
+ await expect(svg).toMatchSvgSnapshot(import.meta.path, "board-edge-margin")
15
15
  })
@@ -1,9 +1,9 @@
1
1
  import { expect, test } from "bun:test"
2
- import circuitJson from "./assets/circuit-2.json"
2
+ import circuitJson from "./assets/larger-trace-margin.json"
3
3
  import { runSolverAndRenderToSvg } from "./utils/run-solver-and-render-to-svg"
4
4
  import type { AnyCircuitElement } from "circuit-json"
5
5
 
6
- test("circuit 2", async () => {
6
+ test("larger trace margin", async () => {
7
7
  const svg = runSolverAndRenderToSvg(circuitJson as AnyCircuitElement[], {
8
8
  layer: "top",
9
9
  net_name: "VCC",
@@ -11,5 +11,5 @@ test("circuit 2", async () => {
11
11
  trace_margin: 0.4,
12
12
  })
13
13
 
14
- await expect(svg).toMatchSvgSnapshot(import.meta.path, "circuit-2")
14
+ await expect(svg).toMatchSvgSnapshot(import.meta.path, "larger-trace-margin")
15
15
  })
@@ -1,8 +1,8 @@
1
1
  import { expect, test } from "bun:test"
2
- import circuitJson from "./assets/circuit-1.json"
2
+ import circuitJson from "./assets/pad-margin.json"
3
3
  import { runSolverAndRenderToSvg } from "./utils/run-solver-and-render-to-svg"
4
4
 
5
- test("circuit-1", async () => {
5
+ test("pad margin", async () => {
6
6
  const svg = runSolverAndRenderToSvg(circuitJson as any, {
7
7
  layer: "top",
8
8
  net_name: "GND",
@@ -10,5 +10,5 @@ test("circuit-1", async () => {
10
10
  trace_margin: 0.2,
11
11
  })
12
12
 
13
- await expect(svg).toMatchSvgSnapshot(import.meta.path, "circuit-1")
13
+ await expect(svg).toMatchSvgSnapshot(import.meta.path, "pad-margin")
14
14
  })
@@ -1,9 +1,9 @@
1
1
  import { expect, test } from "bun:test"
2
- import circuitJson from "./assets/circuit-4.json"
2
+ import circuitJson from "./assets/polygon-board.json"
3
3
  import { runSolverAndRenderToSvg } from "./utils/run-solver-and-render-to-svg"
4
4
  import type { AnyCircuitElement } from "circuit-json"
5
5
 
6
- test("circuit 4", async () => {
6
+ test("polygon board", async () => {
7
7
  const svg = runSolverAndRenderToSvg(circuitJson as AnyCircuitElement[], {
8
8
  layer: "top",
9
9
  net_name: "GND",
@@ -11,5 +11,5 @@ test("circuit 4", async () => {
11
11
  trace_margin: 0.2,
12
12
  })
13
13
 
14
- await expect(svg).toMatchSvgSnapshot(import.meta.path, "circuit-4")
14
+ await expect(svg).toMatchSvgSnapshot(import.meta.path, "polygon-board")
15
15
  })
@@ -1,9 +1,9 @@
1
1
  import { expect, test } from "bun:test"
2
- import circuitJson from "./assets/circuit-3.json"
2
+ import circuitJson from "./assets/smaller-trace-margin.json"
3
3
  import { runSolverAndRenderToSvg } from "./utils/run-solver-and-render-to-svg"
4
4
  import type { AnyCircuitElement } from "circuit-json"
5
5
 
6
- test("circuit 3", async () => {
6
+ test("smaller trace margin", async () => {
7
7
  const svg = runSolverAndRenderToSvg(circuitJson as AnyCircuitElement[], {
8
8
  layer: "top",
9
9
  net_name: "VCC",
@@ -11,5 +11,5 @@ test("circuit 3", async () => {
11
11
  trace_margin: 0.1,
12
12
  })
13
13
 
14
- await expect(svg).toMatchSvgSnapshot(import.meta.path, "circuit-3")
14
+ await expect(svg).toMatchSvgSnapshot(import.meta.path, "smaller-trace-margin")
15
15
  })