@tscircuit/core 0.0.305 → 0.0.307

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 +9 -5
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2207,7 +2207,8 @@ var Port = class extends PrimitiveComponent {
2207
2207
  name: props.name,
2208
2208
  pin_number: props.pinNumber,
2209
2209
  port_hints,
2210
- source_component_id: this.parent?.source_component_id
2210
+ source_component_id: this.parent?.source_component_id,
2211
+ subcircuit_id: this.getSubcircuit()?.subcircuit_id
2211
2212
  });
2212
2213
  this.source_port_id = source_port.source_port_id;
2213
2214
  }
@@ -3819,11 +3820,12 @@ var Group = class extends NormalComponent {
3819
3820
  async _runEffectMakeHttpAutoroutingRequest() {
3820
3821
  const debug4 = Debug5("tscircuit:core:_runEffectMakeHttpAutoroutingRequest");
3821
3822
  const props = this._parsedProps;
3823
+ const autorouterPropObj = typeof props.autorouter === "object" ? props.autorouter : {};
3822
3824
  const autoroutingOptions = {
3823
- serverUrl: "https://registry-api.tscircuit.com",
3824
- serverMode: "job",
3825
- serverCacheEnabled: props.autorouter?.serverCachingEnabled ?? false,
3826
- ...typeof props.autorouter === "object" ? props.autorouter : {}
3825
+ ...autorouterPropObj,
3826
+ serverUrl: autorouterPropObj.serverUrl ?? "https://registry-api.tscircuit.com",
3827
+ serverMode: autorouterPropObj.serverMode ?? "job",
3828
+ serverCacheEnabled: autorouterPropObj.serverCacheEnabled ?? false
3827
3829
  };
3828
3830
  const serverUrl = autoroutingOptions.serverUrl;
3829
3831
  const serverMode = autoroutingOptions.serverMode;
@@ -4942,6 +4944,7 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
4942
4944
  const trace = db.source_trace.insert({
4943
4945
  connected_source_port_ids: ports.map((p) => p.port.source_port_id),
4944
4946
  connected_source_net_ids: nets.map((n) => n.source_net_id),
4947
+ subcircuit_id: this.getSubcircuit()?.subcircuit_id,
4945
4948
  max_length: getMaxLengthFromConnectedCapacitors(
4946
4949
  ports.map((p) => p.port),
4947
4950
  { db }
@@ -5202,6 +5205,7 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
5202
5205
  const pcb_trace = db.pcb_trace.insert({
5203
5206
  route: mergedRoute,
5204
5207
  source_trace_id: this.source_trace_id,
5208
+ subcircuit_id: this.getSubcircuit()?.subcircuit_id,
5205
5209
  trace_length: traceLength
5206
5210
  });
5207
5211
  this._portsRoutedOnPcb = ports;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.305",
4
+ "version": "0.0.307",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -57,7 +57,7 @@
57
57
  "@tscircuit/props": "^0.0.142",
58
58
  "@tscircuit/schematic-autolayout": "^0.0.6",
59
59
  "@tscircuit/soup-util": "^0.0.41",
60
- "circuit-json": "^0.0.135",
60
+ "circuit-json": "^0.0.136",
61
61
  "circuit-json-to-connectivity-map": "^0.0.17",
62
62
  "format-si-unit": "^0.0.3",
63
63
  "nanoid": "^5.0.7",