@tscircuit/core 0.0.140 → 0.0.141

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
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.141",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",