@tscircuit/core 0.0.140 → 0.0.142

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.d.ts CHANGED
@@ -319,6 +319,7 @@ declare class Net extends PrimitiveComponent<typeof netProps> {
319
319
  * routing phase for autorouters that don't care about connecting nets.
320
320
  */
321
321
  doInitialPcbRouteNetIslands(): void;
322
+ renderError(message: Parameters<typeof PrimitiveComponent.prototype.renderError>[0]): void;
322
323
  }
323
324
 
324
325
  declare class Trace extends PrimitiveComponent<typeof traceProps> {
package/dist/index.js CHANGED
@@ -973,12 +973,32 @@ var Net = class extends PrimitiveComponent {
973
973
  );
974
974
  const trace = solution[0];
975
975
  if (!trace) {
976
- this.renderError("Failed to route net islands");
976
+ this.renderError({
977
+ pcb_trace_error_id: "",
978
+ pcb_trace_id: "__net_trace_tmp",
979
+ pcb_component_ids: [
980
+ Aport.pcb_component_id,
981
+ Bport.pcb_component_id
982
+ ].filter(Boolean),
983
+ pcb_port_ids: [Aport.pcb_port_id, Bport.pcb_port_id].filter(
984
+ Boolean
985
+ ),
986
+ type: "pcb_trace_error",
987
+ error_type: "pcb_trace_error",
988
+ message: `Failed to route net islands for "${this.getString()}"`,
989
+ source_trace_id: "__net_trace_tmp"
990
+ });
977
991
  return;
978
992
  }
979
993
  db.pcb_trace.insert(trace);
980
994
  }
981
995
  }
996
+ renderError(message) {
997
+ if (typeof message === "string") {
998
+ return super.renderError(message);
999
+ }
1000
+ this.root?.db.pcb_trace_error.insert(message);
1001
+ }
982
1002
  };
983
1003
 
984
1004
  // lib/utils/components/createNetsFromProps.ts
@@ -3251,7 +3271,7 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
3251
3271
  const minTraceWidth = this.getSubcircuit()._parsedProps.minTraceWidth ?? 0.16;
3252
3272
  const ijump = new MultilayerIjump({
3253
3273
  OBSTACLE_MARGIN: minTraceWidth * 2,
3254
- // isRemovePathLoopsEnabled: true,
3274
+ isRemovePathLoopsEnabled: true,
3255
3275
  optimizeWithGoalBoxes: Boolean(pcbPortA && pcbPortB),
3256
3276
  connMap,
3257
3277
  input: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.140",
4
+ "version": "0.0.142",
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",