@tscircuit/core 0.0.57 → 0.0.58

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
@@ -2081,6 +2081,7 @@ import "zod";
2081
2081
  // lib/components/primitive-components/Trace.ts
2082
2082
  import { traceProps } from "@tscircuit/props";
2083
2083
  import {
2084
+ MultilayerIjump,
2084
2085
  IJumpAutorouter,
2085
2086
  getObstaclesFromSoup
2086
2087
  } from "@tscircuit/infgrid-ijump-astar";
@@ -2511,8 +2512,10 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
2511
2512
  for (const [a, b] of pairs(orderedRoutePoints)) {
2512
2513
  const dominantLayer = "via_to_layer" in a ? a.via_to_layer : null;
2513
2514
  const BOUNDS_MARGIN = 2;
2514
- const ijump = new IJumpAutorouter({
2515
+ const ijump = new MultilayerIjump({
2515
2516
  OBSTACLE_MARGIN: 0.3,
2517
+ isRemovePathLoopsEnabled: true,
2518
+ layerCount: 2,
2516
2519
  input: {
2517
2520
  obstacles,
2518
2521
  connections: [
@@ -2,6 +2,7 @@ import { traceProps } from "@tscircuit/props"
2
2
  import { PrimitiveComponent } from "../base-components/PrimitiveComponent"
3
3
  import type { Port } from "./Port"
4
4
  import {
5
+ MultilayerIjump,
5
6
  IJumpAutorouter,
6
7
  autoroute,
7
8
  getObstaclesFromSoup,
@@ -418,8 +419,10 @@ export class Trace extends PrimitiveComponent<typeof traceProps> {
418
419
  "via_to_layer" in a ? (a.via_to_layer as LayerRef) : null
419
420
  const BOUNDS_MARGIN = 2 //mm
420
421
 
421
- const ijump = new IJumpAutorouter({
422
+ const ijump = new MultilayerIjump({
422
423
  OBSTACLE_MARGIN: 0.3,
424
+ isRemovePathLoopsEnabled: true,
425
+ layerCount: 2,
423
426
  input: {
424
427
  obstacles,
425
428
  connections: [
@@ -1,13 +1,22 @@
1
1
  export type SimplifiedPcbTrace = {
2
2
  type: "pcb_trace"
3
3
  pcb_trace_id: string
4
- route: Array<{
5
- route_type: "wire" | "via"
6
- x: number
7
- y: number
8
- width: number
9
- layer: string
10
- }>
4
+ route: Array<
5
+ | {
6
+ route_type: "wire"
7
+ x: number
8
+ y: number
9
+ width: number
10
+ layer: string
11
+ }
12
+ | {
13
+ route_type: "via"
14
+ x: number
15
+ y: number
16
+ to_layer: string
17
+ from_layer: string
18
+ }
19
+ >
11
20
  }
12
21
  export type Obstacle = {
13
22
  // TODO include ovals
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tscircuit/core",
3
3
  "module": "index.ts",
4
4
  "type": "module",
5
- "version": "0.0.57",
5
+ "version": "0.0.58",
6
6
  "types": "dist/index.d.ts",
7
7
  "main": "dist/index.js",
8
8
  "files": [
@@ -23,7 +23,7 @@
23
23
  "@types/react": "^18.3.3",
24
24
  "@types/react-reconciler": "^0.28.8",
25
25
  "bun-match-svg": "0.0.2",
26
- "circuit-to-svg": "^0.0.22",
26
+ "circuit-to-svg": "^0.0.28",
27
27
  "debug": "^4.3.6",
28
28
  "howfat": "^0.3.8",
29
29
  "looks-same": "^9.0.1",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@lume/kiwi": "^0.4.3",
37
- "@tscircuit/infgrid-ijump-astar": "^0.0.13",
37
+ "@tscircuit/infgrid-ijump-astar": "^0.0.15",
38
38
  "@tscircuit/props": "^0.0.62",
39
39
  "@tscircuit/soup": "^0.0.67",
40
40
  "@tscircuit/soup-util": "^0.0.23",