@tscircuit/schematic-trace-solver 0.0.172 → 0.0.174

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 (23) hide show
  1. package/dist/index.js +32 -0
  2. package/lib/solvers/AvailableNetOrientationSolver/AvailableNetOrientationSolver.ts +12 -1
  3. package/lib/solvers/SameNetJunctionAlignmentSolver/placeGroundRailLabelsAtOuterEnd.ts +49 -0
  4. package/package.json +1 -1
  5. package/site/bug-reports/bug-report-20260831T133233Z.page.tsx +4 -0
  6. package/tests/bug-reports/bug-report-20260721T221026Z/__snapshots__/bug-report-20260721T221026Z.snap.svg +18 -18
  7. package/tests/bug-reports/bug-report-20260831T133233Z/__snapshots__/bug-report-20260831T133233Z.snap.svg +85 -0
  8. package/tests/bug-reports/bug-report-20260831T133233Z/bug-report-20260831T133233Z.json +172 -0
  9. package/tests/bug-reports/bug-report-20260831T133233Z/bug-report-20260831T133233Z.test.ts +25 -0
  10. package/tests/repros/__snapshots__/repro-bq40z60-current-sense.snap.svg +94 -0
  11. package/tests/repros/__snapshots__/repro-pmp11282-isolated-dcdc.snap.svg +10 -10
  12. package/tests/repros/__snapshots__/repro-ti-power-output-section.snap.svg +87 -87
  13. package/tests/repros/__snapshots__/repro-tida-01389-hbridge.snap.svg +47 -153
  14. package/tests/repros/__snapshots__/repro-tida010076-j4-ground-bus.snap.svg +1 -8
  15. package/tests/repros/__snapshots__/repro-tida010076-page02.snap.svg +1625 -1681
  16. package/tests/repros/__snapshots__/repro-tmp1075-ground-label-overlap.snap.svg +3 -3
  17. package/tests/repros/assets/repro-bq40z60-current-sense.input.json +158 -0
  18. package/tests/repros/assets/repro-tida-01389-hbridge.input.json +67 -657
  19. package/tests/repros/assets/repro-tida010076-page02.input.json +2 -0
  20. package/tests/repros/repro-bq40z60-current-sense.test.ts +18 -0
  21. package/tests/repros/repro-tida-01389-hbridge.test.ts +27 -6
  22. package/tests/repros/repro-tida010076-j4-ground-bus.test.ts +1 -0
  23. package/tests/repros/repro-tmp1075-ground-label-overlap.test.ts +12 -0
@@ -8,7 +8,7 @@ globalConnNetId: connectivity_net1" data-x="-1.94" data-y="0.6249999999999996" x
8
8
  globalConnNetId: connectivity_net2" data-x="-1.315" data-y="-0.7999999999999999" x="277.40945888368134" y="359.3694077545803" width="34.35875585854285" height="9.54409884959523" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.020955357142857144"/></g><g><rect data-type="rect" data-label="netId: ALERT
9
9
  globalConnNetId: connectivity_net2" data-x="-1.211" data-y="1.549" x="282.37239028547083" y="247.27396676608436" width="34.35875585854285" height="9.54409884959523" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.020955357142857144"/></g><g><rect data-type="rect" data-label="netId: GND
10
10
  globalConnNetId: connectivity_net3" data-x="-0.6910000000000002" data-y="-1.5359999999999998" x="312.9135066041756" y="389.2424371538134" width="22.90583723902853" height="20.04260758414995" fill="#00000066" stroke="#000000" stroke-width="0.020955357142857144"/></g><g><rect data-type="rect" data-label="netId: GND
11
- globalConnNetId: connectivity_net3" data-x="4.25" data-y="0.21500000000000005" x="548.7004686834257" y="305.68385172560716" width="22.905837239028642" height="20.042607584150005" fill="#00000066" stroke="#000000" stroke-width="0.020955357142857144"/></g><g><rect data-type="rect" data-label="netId: VDD
11
+ globalConnNetId: connectivity_net3" data-x="4.25" data-y="-1.285" x="548.7004686834257" y="377.2645930975714" width="22.905837239028642" height="20.04260758414995" fill="#00000066" stroke="#000000" stroke-width="0.020955357142857144"/></g><g><rect data-type="rect" data-label="netId: VDD
12
12
  globalConnNetId: connectivity_net4" data-x="4.011" data-y="1.075" x="538.7268853855987" y="269.89348103962504" width="20.04260758414989" height="9.54409884959523" fill="#ef444466" stroke="#ef4444" stroke-width="0.020955357142857144"/></g><g><rect data-type="rect" data-label="netId: VDD
13
13
  globalConnNetId: connectivity_net4" data-x="-1.7" data-y="2.71" x="264.7635279079676" y="186.6212185769067" width="22.905837239028585" height="20.04260758414995" fill="#ef444466" stroke="#ef4444" stroke-width="0.020955357142857144"/></g><g><rect data-type="rect" data-label="netId: VDD
14
14
  globalConnNetId: connectivity_net4" data-x="4.25" data-y="1.6909999999999998" x="548.7004686834257" y="235.24840221559435" width="22.905837239028642" height="20.042607584149977" fill="#ef444466" stroke="#ef4444" stroke-width="0.020955357142857144"/></g><g><circle data-type="point" data-label="SDA
@@ -38,7 +38,7 @@ orientation: x-" data-x="-1.7" data-y="0.6249999999999996" cx="276.2164465274819
38
38
  orientation: x+" data-x="-1.6749999999999998" data-y="-0.7999999999999999" cx="277.40945888368134" cy="364.14145717937794" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
39
39
  orientation: x-" data-x="-0.8510000000000001" data-y="1.549" cx="316.7311461440137" cy="252.04601619088197" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
40
40
  orientation: y-" data-x="-0.6910000000000002" data-y="-1.3259999999999998" cx="324.3664252236899" cy="389.2424371538134" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
41
- orientation: y-" data-x="4.25" data-y="0.42500000000000004" cx="560.15338730294" cy="305.68385172560716" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
41
+ orientation: y-" data-x="4.25" data-y="-1.075" cx="560.15338730294" cy="377.2645930975714" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
42
42
  orientation: x+" data-x="3.8" data-y="1.075" cx="538.6791648913508" cy="274.66553046442266" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
43
43
  orientation: y+" data-x="-1.7" data-y="2.5" cx="276.21644652748193" cy="206.66382616105665" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
44
44
  orientation: y+" data-x="4.25" data-y="1.48" cx="560.15338730294" cy="255.33873029399234" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g id="crosshair" style="display: none"><line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5"/><line id="crosshair-v" x1="0" x2="640" stroke="#666" stroke-width="0.5"/><text id="coordinates" font-family="monospace" font-size="12" fill="#666"></text></g><script><![CDATA[
@@ -140,7 +140,7 @@ orientation: y+" data-x="4.25" data-y="1.48" cx="560.15338730294" cy="255.338730
140
140
  L 550.7114933541291,255.9311962470977
141
141
  L 615.9499609069064,255.93119624709772
142
142
  Z
143
- " fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="1.876465989054px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_5__stack1" x="612.5723221266093" y="265.3135261923677" fill="rgb(132, 0, 0)" text-anchor="end" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="16.888193901485998px" transform="">XXXXX</text><rect class="component-overlay sch-component-overlay sch-net-label-overlay" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_6__stack1" x="624.7693510554602" y="535.0555121188802" width="22.51759186864797" height="16.88819390148592" fill="transparent"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_6__stack1" d="M 624.7693510554602 551.9437060203661 L 647.2869429241082 551.9437060203661" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.876465989054px" stroke-linecap="round"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_6__stack1" d="M 636.0281469897842 551.9437060203661 L 636.0281469897842 535.0555121188802" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.876465989054px" stroke-linecap="round"/><text class="sch-net-label-symbol-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_6__stack1" x="636.0281469897842" y="556.6348709930012" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="middle" dominant-baseline="hanging" font-size="16.888193901485998px">XX</text><rect class="component-overlay sch-component-overlay sch-net-label-overlay" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_7__stack1" x="1088.350273651251" y="370.77091477720245" width="22.517591868648196" height="16.888193901486034" fill="transparent"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_7__stack1" d="M 1088.350273651251 387.6591086786885 L 1110.8678655198992 387.6591086786885" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.876465989054px" stroke-linecap="round"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_7__stack1" d="M 1099.609069585575 387.6591086786885 L 1099.609069585575 370.77091477720245" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.876465989054px" stroke-linecap="round"/><text class="sch-net-label-symbol-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_7__stack1" x="1099.609069585575" y="392.35027365132345" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="middle" dominant-baseline="hanging" font-size="16.888193901485998px">XX</text><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_8__stack1" d="
143
+ " fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="1.876465989054px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_5__stack1" x="612.5723221266093" y="265.3135261923677" fill="rgb(132, 0, 0)" text-anchor="end" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="16.888193901485998px" transform="">XXXXX</text><rect class="component-overlay sch-component-overlay sch-net-label-overlay" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_6__stack1" x="624.7693510554602" y="535.0555121188802" width="22.51759186864797" height="16.88819390148592" fill="transparent"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_6__stack1" d="M 624.7693510554602 551.9437060203661 L 647.2869429241082 551.9437060203661" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.876465989054px" stroke-linecap="round"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_6__stack1" d="M 636.0281469897842 551.9437060203661 L 636.0281469897842 535.0555121188802" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.876465989054px" stroke-linecap="round"/><text class="sch-net-label-symbol-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_6__stack1" x="636.0281469897842" y="556.6348709930012" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="middle" dominant-baseline="hanging" font-size="16.888193901485998px">XX</text><rect class="component-overlay sch-component-overlay sch-net-label-overlay" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_7__stack1" x="1088.350273651251" y="511.50586395625254" width="22.517591868648196" height="16.888193901485977" fill="transparent"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_7__stack1" d="M 1088.350273651251 528.3940578577385 L 1110.8678655198992 528.3940578577385" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.876465989054px" stroke-linecap="round"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_7__stack1" d="M 1099.609069585575 528.3940578577385 L 1099.609069585575 511.50586395625254" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.876465989054px" stroke-linecap="round"/><text class="sch-net-label-symbol-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_7__stack1" x="1099.609069585575" y="533.0852228303736" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="middle" dominant-baseline="hanging" font-size="16.888193901485998px">XX</text><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_8__stack1" d="
144
144
  M 1057.38858483186,309.7857701329475
145
145
  L 1062.455043002306,300.4034401876775
146
146
  L 1094.6301798279517,300.4034401876775
@@ -0,0 +1,158 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "C26",
5
+ "symbolName": "capacitor_down",
6
+ "center": { "x": -9.7675, "y": -7.3 },
7
+ "width": 1.165,
8
+ "height": 0.76,
9
+ "pins": [
10
+ {
11
+ "pinId": "C26.1",
12
+ "displayName": "1",
13
+ "x": -9.9,
14
+ "y": -6.92,
15
+ "_facingDirection": "y+"
16
+ },
17
+ {
18
+ "pinId": "C26.2",
19
+ "displayName": "2",
20
+ "x": -9.9,
21
+ "y": -7.68,
22
+ "_facingDirection": "y-"
23
+ }
24
+ ]
25
+ },
26
+ {
27
+ "chipId": "C36",
28
+ "symbolName": "capacitor_down",
29
+ "center": { "x": -8.5675, "y": -7.3 },
30
+ "width": 1.165,
31
+ "height": 0.76,
32
+ "pins": [
33
+ {
34
+ "pinId": "C36.1",
35
+ "displayName": "1",
36
+ "x": -8.7,
37
+ "y": -6.92,
38
+ "_facingDirection": "y+"
39
+ },
40
+ {
41
+ "pinId": "C36.2",
42
+ "displayName": "2",
43
+ "x": -8.7,
44
+ "y": -7.68,
45
+ "_facingDirection": "y-"
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "chipId": "R43",
51
+ "symbolName": "boxresistor_up",
52
+ "center": { "x": -12.465, "y": -7.4 },
53
+ "width": 0.97,
54
+ "height": 0.6,
55
+ "pins": [
56
+ {
57
+ "pinId": "R43.1",
58
+ "displayName": "1",
59
+ "x": -12.5,
60
+ "y": -7.1,
61
+ "_facingDirection": "y+"
62
+ },
63
+ {
64
+ "pinId": "R43.2",
65
+ "displayName": "2",
66
+ "x": -12.5,
67
+ "y": -7.7,
68
+ "_facingDirection": "y-"
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "chipId": "R38",
74
+ "symbolName": "boxresistor_right",
75
+ "center": { "x": -11.3, "y": -7 },
76
+ "width": 0.6,
77
+ "height": 0.68,
78
+ "pins": [
79
+ {
80
+ "pinId": "R38.1",
81
+ "displayName": "1",
82
+ "x": -11,
83
+ "y": -7,
84
+ "_facingDirection": "x+"
85
+ },
86
+ {
87
+ "pinId": "R38.2",
88
+ "displayName": "2",
89
+ "x": -11.6,
90
+ "y": -7,
91
+ "_facingDirection": "x-"
92
+ }
93
+ ]
94
+ },
95
+ {
96
+ "chipId": "R44",
97
+ "symbolName": "boxresistor_right",
98
+ "center": { "x": -11.3, "y": -8 },
99
+ "width": 0.6,
100
+ "height": 0.68,
101
+ "pins": [
102
+ {
103
+ "pinId": "R44.1",
104
+ "displayName": "1",
105
+ "x": -11,
106
+ "y": -8,
107
+ "_facingDirection": "x+"
108
+ },
109
+ {
110
+ "pinId": "R44.2",
111
+ "displayName": "2",
112
+ "x": -11.6,
113
+ "y": -8,
114
+ "_facingDirection": "x-"
115
+ }
116
+ ]
117
+ }
118
+ ],
119
+ "directConnections": [],
120
+ "netConnections": [
121
+ {
122
+ "netId": "GND",
123
+ "isGround": true,
124
+ "netLabelText": "GND",
125
+ "netLabelWidth": 0.42,
126
+ "netLabelHeight": 0.48,
127
+ "pinIds": ["R43.1", "R38.2"]
128
+ },
129
+ {
130
+ "netId": "PGND",
131
+ "isGround": true,
132
+ "netLabelText": "PGND",
133
+ "netLabelWidth": 0.42,
134
+ "netLabelHeight": 0.6,
135
+ "pinIds": ["R43.2", "R44.2"]
136
+ },
137
+ {
138
+ "netId": "U2_SRP",
139
+ "netLabelText": "U2_SRP",
140
+ "netLabelWidth": 0.84,
141
+ "pinIds": ["R38.1", "C26.1", "C36.1"]
142
+ },
143
+ {
144
+ "netId": "U2_SRN",
145
+ "netLabelText": "U2_SRN",
146
+ "netLabelWidth": 0.84,
147
+ "pinIds": ["R44.1", "C26.2", "C36.2"]
148
+ }
149
+ ],
150
+ "availableNetLabelOrientations": {
151
+ "GND": ["y-"],
152
+ "PGND": ["y-"],
153
+ "U2_SRP": ["y+"],
154
+ "U2_SRN": ["x+"]
155
+ },
156
+ "maxMspPairDistance": 2.4,
157
+ "_hideRatsNet": false
158
+ }