@tscircuit/core 0.0.465 → 0.0.467

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 +19 -6
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -4847,10 +4847,6 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
4847
4847
  return;
4848
4848
  }
4849
4849
  }
4850
- if (this.props.schDisplayLabel && ("from" in this.props && "to" in this.props || "path" in this.props)) {
4851
- this._doInitialSchematicTraceRenderWithDisplayLabel();
4852
- return;
4853
- }
4854
4850
  const connection = {
4855
4851
  name: this.source_trace_id,
4856
4852
  pointsToConnect: []
@@ -4863,6 +4859,23 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
4863
4859
  facingDirection: port.facingDirection
4864
4860
  }));
4865
4861
  const isPortAndNetConnection = portsWithPosition.length === 1 && netsWithSelectors.length === 1;
4862
+ if (this.props.schDisplayLabel) {
4863
+ if (isPortAndNetConnection) {
4864
+ const net = netsWithSelectors[0].net;
4865
+ const { port, position: anchorPos } = portsWithPosition[0];
4866
+ db.schematic_net_label.insert({
4867
+ text: this.props.schDisplayLabel,
4868
+ source_net_id: net.source_net_id,
4869
+ anchor_position: anchorPos,
4870
+ center: anchorPos,
4871
+ anchor_side: getEnteringEdgeFromDirection(port.facingDirection) ?? "bottom"
4872
+ });
4873
+ return;
4874
+ } else if ("from" in this.props && "to" in this.props || "path" in this.props) {
4875
+ this._doInitialSchematicTraceRenderWithDisplayLabel();
4876
+ return;
4877
+ }
4878
+ }
4866
4879
  if (isPortAndNetConnection) {
4867
4880
  const net = netsWithSelectors[0].net;
4868
4881
  const { port, position: anchorPos } = portsWithPosition[0];
@@ -9783,7 +9796,7 @@ import { identity as identity4 } from "transformation-matrix";
9783
9796
  var package_default = {
9784
9797
  name: "@tscircuit/core",
9785
9798
  type: "module",
9786
- version: "0.0.464",
9799
+ version: "0.0.466",
9787
9800
  types: "dist/index.d.ts",
9788
9801
  main: "dist/index.js",
9789
9802
  module: "dist/index.js",
@@ -9806,7 +9819,7 @@ var package_default = {
9806
9819
  },
9807
9820
  devDependencies: {
9808
9821
  "@biomejs/biome": "^1.8.3",
9809
- "@tscircuit/capacity-autorouter": "^0.0.67",
9822
+ "@tscircuit/capacity-autorouter": "^0.0.71",
9810
9823
  "@tscircuit/checks": "^0.0.52",
9811
9824
  "@tscircuit/circuit-json-util": "^0.0.47",
9812
9825
  "@tscircuit/footprinter": "^0.0.177",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.465",
4
+ "version": "0.0.467",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@biomejs/biome": "^1.8.3",
27
- "@tscircuit/capacity-autorouter": "^0.0.67",
27
+ "@tscircuit/capacity-autorouter": "^0.0.71",
28
28
  "@tscircuit/checks": "^0.0.52",
29
29
  "@tscircuit/circuit-json-util": "^0.0.47",
30
30
  "@tscircuit/footprinter": "^0.0.177",