@tscircuit/core 0.0.125 → 0.0.127
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 +19 -6
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1478,7 +1478,8 @@ var Port = class extends PrimitiveComponent {
|
|
|
1478
1478
|
};
|
|
1479
1479
|
}
|
|
1480
1480
|
constructor(props, opts = {}) {
|
|
1481
|
-
if (!props.name && props.pinNumber
|
|
1481
|
+
if (!props.name && props.pinNumber !== void 0)
|
|
1482
|
+
props.name = `pin${props.pinNumber}`;
|
|
1482
1483
|
if (!props.name) {
|
|
1483
1484
|
throw new Error("Port must have a name or a pinNumber");
|
|
1484
1485
|
}
|
|
@@ -2528,7 +2529,6 @@ var FTYPE = stringProxy;
|
|
|
2528
2529
|
import { traceProps } from "@tscircuit/props";
|
|
2529
2530
|
import {
|
|
2530
2531
|
MultilayerIjump,
|
|
2531
|
-
IJumpAutorouter,
|
|
2532
2532
|
getObstaclesFromSoup
|
|
2533
2533
|
} from "@tscircuit/infgrid-ijump-astar";
|
|
2534
2534
|
|
|
@@ -3164,18 +3164,31 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
|
|
|
3164
3164
|
const bounds = computeObstacleBounds(obstacles);
|
|
3165
3165
|
const simpleRouteJsonInput = {
|
|
3166
3166
|
minTraceWidth: 0.1,
|
|
3167
|
-
obstacles
|
|
3168
|
-
// leave empty to force traces to draw
|
|
3167
|
+
obstacles,
|
|
3169
3168
|
connections: [connection],
|
|
3170
3169
|
bounds,
|
|
3171
3170
|
layerCount: 1
|
|
3172
3171
|
};
|
|
3173
|
-
|
|
3172
|
+
if (this.getSubcircuit().props._schDebugObjectsEnabled) {
|
|
3173
|
+
for (const obstacle of obstacles) {
|
|
3174
|
+
db.schematic_debug_object.insert({
|
|
3175
|
+
shape: "rect",
|
|
3176
|
+
center: obstacle.center,
|
|
3177
|
+
size: {
|
|
3178
|
+
width: obstacle.width,
|
|
3179
|
+
height: obstacle.height
|
|
3180
|
+
},
|
|
3181
|
+
label: "obstacle"
|
|
3182
|
+
});
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
let Autorouter = MultilayerIjump;
|
|
3174
3186
|
if (this.getSubcircuit().props._schDirectLineRoutingEnabled) {
|
|
3175
3187
|
Autorouter = DirectLineRouter;
|
|
3176
3188
|
}
|
|
3177
3189
|
const autorouter = new Autorouter({
|
|
3178
|
-
input: simpleRouteJsonInput
|
|
3190
|
+
input: simpleRouteJsonInput,
|
|
3191
|
+
OBSTACLE_MARGIN: 0.1
|
|
3179
3192
|
});
|
|
3180
3193
|
const results = autorouter.solveAndMapToTraces();
|
|
3181
3194
|
if (results.length === 0) return;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.127",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@tscircuit/props": "^0.0.75",
|
|
42
42
|
"@tscircuit/schematic-autolayout": "^0.0.5",
|
|
43
43
|
"@tscircuit/soup-util": "^0.0.33",
|
|
44
|
-
"circuit-json": "^0.0.
|
|
44
|
+
"circuit-json": "^0.0.90",
|
|
45
45
|
"circuit-json-to-connectivity-map": "^0.0.17",
|
|
46
|
-
"circuit-to-svg": "0.0.
|
|
46
|
+
"circuit-to-svg": "^0.0.48",
|
|
47
47
|
"nanoid": "^5.0.7",
|
|
48
48
|
"performance-now": "^2.1.0",
|
|
49
49
|
"react": "^18.3.1",
|