@tscircuit/core 0.0.141 → 0.0.143

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 (2) hide show
  1. package/dist/index.js +7 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2244,7 +2244,13 @@ var NormalComponent = class extends PrimitiveComponent {
2244
2244
  const { db } = this.root;
2245
2245
  const { _parsedProps: props } = this;
2246
2246
  const bounds = getBoundsOfPcbComponents(this.children);
2247
+ if (bounds.width === 0 || bounds.height === 0) return;
2248
+ const center = {
2249
+ x: (bounds.minX + bounds.maxX) / 2,
2250
+ y: (bounds.minY + bounds.maxY) / 2
2251
+ };
2247
2252
  db.pcb_component.update(this.pcb_component_id, {
2253
+ center,
2248
2254
  width: bounds.width,
2249
2255
  height: bounds.height
2250
2256
  });
@@ -3271,7 +3277,7 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
3271
3277
  const minTraceWidth = this.getSubcircuit()._parsedProps.minTraceWidth ?? 0.16;
3272
3278
  const ijump = new MultilayerIjump({
3273
3279
  OBSTACLE_MARGIN: minTraceWidth * 2,
3274
- // isRemovePathLoopsEnabled: true,
3280
+ isRemovePathLoopsEnabled: true,
3275
3281
  optimizeWithGoalBoxes: Boolean(pcbPortA && pcbPortB),
3276
3282
  connMap,
3277
3283
  input: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.141",
4
+ "version": "0.0.143",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -38,7 +38,7 @@
38
38
  "dependencies": {
39
39
  "@lume/kiwi": "^0.4.3",
40
40
  "@tscircuit/footprinter": "^0.0.77",
41
- "@tscircuit/infgrid-ijump-astar": "^0.0.21",
41
+ "@tscircuit/infgrid-ijump-astar": "^0.0.24",
42
42
  "@tscircuit/math-utils": "^0.0.4",
43
43
  "@tscircuit/props": "^0.0.77",
44
44
  "@tscircuit/schematic-autolayout": "^0.0.5",