@tscircuit/schematic-trace-solver 0.0.170 → 0.0.172

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 (20) hide show
  1. package/dist/index.js +52 -14
  2. package/lib/solvers/AvailableNetOrientationSolver/AvailableNetOrientationSolver.ts +6 -1
  3. package/lib/solvers/NetLabelToTraceSolver/NetLabelToTraceSolver.ts +68 -14
  4. package/package.json +1 -1
  5. package/tests/bug-reports/bug-report-20260707T140410Z/__snapshots__/bug-report-20260707T140410Z.snap.svg +10 -10
  6. package/tests/bug-reports/bug-report-20260825T103621Z/__snapshots__/bug-report-20260825T103621Z.snap.svg +10 -10
  7. package/tests/bug-reports/bug-report-20260826T072956Z/__snapshots__/bug-report-20260826T072956Z.snap.svg +10 -10
  8. package/tests/repros/__snapshots__/repro-battery-management-bq24073.snap.svg +191 -0
  9. package/tests/repros/__snapshots__/repro-hdc3020-ground-label-alignment.snap.svg +110 -0
  10. package/tests/repros/__snapshots__/repro-powerbank-3v-system-power.snap.svg +11 -29
  11. package/tests/repros/__snapshots__/repro-tida-01389-hbridge.snap.svg +216 -0
  12. package/tests/repros/__snapshots__/repro-tmp1075-ground-label-overlap.snap.svg +166 -0
  13. package/tests/repros/assets/repro-battery-management-bq24073.input.json +721 -0
  14. package/tests/repros/assets/repro-hdc3020-ground-label-alignment.input.json +282 -0
  15. package/tests/repros/assets/repro-tida-01389-hbridge.input.json +780 -0
  16. package/tests/repros/assets/repro-tmp1075-ground-label-overlap.input.json +305 -0
  17. package/tests/repros/repro-battery-management-bq24073.test.ts +62 -0
  18. package/tests/repros/repro-hdc3020-ground-label-alignment.test.ts +25 -0
  19. package/tests/repros/repro-tida-01389-hbridge.test.ts +23 -0
  20. package/tests/repros/repro-tmp1075-ground-label-overlap.test.ts +18 -0
@@ -0,0 +1,721 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "schematic_component_0",
5
+ "center": {
6
+ "x": -6.2,
7
+ "y": 1.7999999999999998
8
+ },
9
+ "width": 1.700000000000001,
10
+ "height": 0.9999999999999998,
11
+ "pins": [
12
+ {
13
+ "pinId": "schematic_port_0",
14
+ "displayName": "DC_PLUS",
15
+ "x": -5.35,
16
+ "y": 2
17
+ },
18
+ {
19
+ "pinId": "schematic_port_1",
20
+ "displayName": "GND",
21
+ "x": -5.35,
22
+ "y": 1.6
23
+ }
24
+ ]
25
+ },
26
+ {
27
+ "chipId": "schematic_component_1",
28
+ "center": {
29
+ "x": 0,
30
+ "y": 0
31
+ },
32
+ "width": 4.2,
33
+ "height": 6,
34
+ "pins": [
35
+ {
36
+ "pinId": "schematic_port_2",
37
+ "displayName": "TS",
38
+ "x": -2.1,
39
+ "y": -0.09999999999999998
40
+ },
41
+ {
42
+ "pinId": "schematic_port_3",
43
+ "displayName": "BAT",
44
+ "x": -2.1,
45
+ "y": -0.30000000000000004
46
+ },
47
+ {
48
+ "pinId": "schematic_port_4",
49
+ "displayName": "N_CE",
50
+ "x": 2.1,
51
+ "y": -0.4
52
+ },
53
+ {
54
+ "pinId": "schematic_port_5",
55
+ "displayName": "EN2",
56
+ "x": 2.1,
57
+ "y": 0.20000000000000007
58
+ },
59
+ {
60
+ "pinId": "schematic_port_6",
61
+ "displayName": "EN1",
62
+ "x": 2.1,
63
+ "y": 0
64
+ },
65
+ {
66
+ "pinId": "schematic_port_7",
67
+ "displayName": "N_PGOOD",
68
+ "x": -0.1,
69
+ "y": 3
70
+ },
71
+ {
72
+ "pinId": "schematic_port_8",
73
+ "displayName": "VSS",
74
+ "x": -2.1,
75
+ "y": 0.10000000000000003
76
+ },
77
+ {
78
+ "pinId": "schematic_port_9",
79
+ "displayName": "N_CHG",
80
+ "x": 0.1,
81
+ "y": 3
82
+ },
83
+ {
84
+ "pinId": "schematic_port_10",
85
+ "displayName": "OUT",
86
+ "x": 2.1,
87
+ "y": 0.4
88
+ },
89
+ {
90
+ "pinId": "schematic_port_11",
91
+ "displayName": "ILIM",
92
+ "x": 0,
93
+ "y": -3
94
+ },
95
+ {
96
+ "pinId": "schematic_port_12",
97
+ "displayName": "IN",
98
+ "x": -2.1,
99
+ "y": 0.30000000000000004
100
+ },
101
+ {
102
+ "pinId": "schematic_port_13",
103
+ "displayName": "TMR",
104
+ "x": -0.2,
105
+ "y": -3
106
+ },
107
+ {
108
+ "pinId": "schematic_port_14",
109
+ "displayName": "TD",
110
+ "x": 2.1,
111
+ "y": -0.2
112
+ },
113
+ {
114
+ "pinId": "schematic_port_15",
115
+ "displayName": "ISET",
116
+ "x": 0.2,
117
+ "y": -3
118
+ }
119
+ ]
120
+ },
121
+ {
122
+ "chipId": "schematic_component_2",
123
+ "center": {
124
+ "x": -3.1875,
125
+ "y": 0.9
126
+ },
127
+ "width": 0.9250000000000003,
128
+ "height": 0.76,
129
+ "pins": [
130
+ {
131
+ "pinId": "schematic_port_16",
132
+ "displayName": "anode",
133
+ "x": -3.2,
134
+ "y": 1.28,
135
+ "_facingDirection": "y+"
136
+ },
137
+ {
138
+ "pinId": "schematic_port_17",
139
+ "displayName": "cathode",
140
+ "x": -3.2,
141
+ "y": 0.52,
142
+ "_facingDirection": "y-"
143
+ }
144
+ ]
145
+ },
146
+ {
147
+ "chipId": "schematic_component_3",
148
+ "center": {
149
+ "x": 3.4324999999999997,
150
+ "y": 0.9
151
+ },
152
+ "width": 1.165,
153
+ "height": 0.76,
154
+ "pins": [
155
+ {
156
+ "pinId": "schematic_port_18",
157
+ "displayName": "anode",
158
+ "x": 3.3,
159
+ "y": 1.28,
160
+ "_facingDirection": "y+"
161
+ },
162
+ {
163
+ "pinId": "schematic_port_19",
164
+ "displayName": "cathode",
165
+ "x": 3.3,
166
+ "y": 0.52,
167
+ "_facingDirection": "y-"
168
+ }
169
+ ]
170
+ },
171
+ {
172
+ "chipId": "schematic_component_4",
173
+ "center": {
174
+ "x": -6.285,
175
+ "y": -3
176
+ },
177
+ "width": 1.33,
178
+ "height": 0.5999999999999996,
179
+ "pins": [
180
+ {
181
+ "pinId": "schematic_port_20",
182
+ "displayName": "anode",
183
+ "x": -6.5,
184
+ "y": -2.7,
185
+ "_facingDirection": "y+"
186
+ },
187
+ {
188
+ "pinId": "schematic_port_21",
189
+ "displayName": "cathode",
190
+ "x": -6.5,
191
+ "y": -3.3,
192
+ "_facingDirection": "y-"
193
+ }
194
+ ]
195
+ },
196
+ {
197
+ "chipId": "schematic_component_5",
198
+ "center": {
199
+ "x": -5,
200
+ "y": -3
201
+ },
202
+ "width": 1,
203
+ "height": 1,
204
+ "pins": [
205
+ {
206
+ "pinId": "schematic_port_22",
207
+ "displayName": "anode",
208
+ "x": -5,
209
+ "y": -2.5
210
+ },
211
+ {
212
+ "pinId": "schematic_port_23",
213
+ "displayName": "cathode",
214
+ "x": -5,
215
+ "y": -3.5
216
+ }
217
+ ]
218
+ },
219
+ {
220
+ "chipId": "schematic_component_6",
221
+ "center": {
222
+ "x": -2.6674999999999995,
223
+ "y": -2.8
224
+ },
225
+ "width": 1.1650000000000005,
226
+ "height": 0.7600000000000007,
227
+ "pins": [
228
+ {
229
+ "pinId": "schematic_port_24",
230
+ "displayName": "anode",
231
+ "x": -2.8,
232
+ "y": -2.4199999999999995,
233
+ "_facingDirection": "y+"
234
+ },
235
+ {
236
+ "pinId": "schematic_port_25",
237
+ "displayName": "cathode",
238
+ "x": -2.8,
239
+ "y": -3.18,
240
+ "_facingDirection": "y-"
241
+ }
242
+ ]
243
+ },
244
+ {
245
+ "chipId": "schematic_component_7",
246
+ "center": {
247
+ "x": -0.7349999999999999,
248
+ "y": -4.3
249
+ },
250
+ "width": 1.33,
251
+ "height": 0.5999999999999996,
252
+ "pins": [
253
+ {
254
+ "pinId": "schematic_port_26",
255
+ "displayName": "anode",
256
+ "x": -0.95,
257
+ "y": -4,
258
+ "_facingDirection": "y+"
259
+ },
260
+ {
261
+ "pinId": "schematic_port_27",
262
+ "displayName": "cathode",
263
+ "x": -0.95,
264
+ "y": -4.6,
265
+ "_facingDirection": "y-"
266
+ }
267
+ ]
268
+ },
269
+ {
270
+ "chipId": "schematic_component_8",
271
+ "center": {
272
+ "x": 0.215,
273
+ "y": -4.3
274
+ },
275
+ "width": 1.33,
276
+ "height": 0.5999999999999996,
277
+ "pins": [
278
+ {
279
+ "pinId": "schematic_port_28",
280
+ "displayName": "anode",
281
+ "x": -1.8369701987210297e-17,
282
+ "y": -4,
283
+ "_facingDirection": "y+"
284
+ },
285
+ {
286
+ "pinId": "schematic_port_29",
287
+ "displayName": "cathode",
288
+ "x": 1.8369701987210297e-17,
289
+ "y": -4.6,
290
+ "_facingDirection": "y-"
291
+ }
292
+ ]
293
+ },
294
+ {
295
+ "chipId": "schematic_component_9",
296
+ "center": {
297
+ "x": 1.315,
298
+ "y": -4.3
299
+ },
300
+ "width": 1.3299999999999998,
301
+ "height": 0.5999999999999996,
302
+ "pins": [
303
+ {
304
+ "pinId": "schematic_port_30",
305
+ "displayName": "anode",
306
+ "x": 1.1,
307
+ "y": -4,
308
+ "_facingDirection": "y+"
309
+ },
310
+ {
311
+ "pinId": "schematic_port_31",
312
+ "displayName": "cathode",
313
+ "x": 1.1,
314
+ "y": -4.6,
315
+ "_facingDirection": "y-"
316
+ }
317
+ ]
318
+ },
319
+ {
320
+ "chipId": "schematic_component_10",
321
+ "center": {
322
+ "x": -0.645,
323
+ "y": 6.4
324
+ },
325
+ "width": 1.21,
326
+ "height": 0.5999999999999996,
327
+ "pins": [
328
+ {
329
+ "pinId": "schematic_port_32",
330
+ "displayName": "anode",
331
+ "x": -0.8,
332
+ "y": 6.7,
333
+ "_facingDirection": "y+"
334
+ },
335
+ {
336
+ "pinId": "schematic_port_33",
337
+ "displayName": "cathode",
338
+ "x": -0.8,
339
+ "y": 6.1000000000000005,
340
+ "_facingDirection": "y-"
341
+ }
342
+ ]
343
+ },
344
+ {
345
+ "chipId": "schematic_component_11",
346
+ "center": {
347
+ "x": -0.5550000000000002,
348
+ "y": 4.5
349
+ },
350
+ "width": 1.1099999999999999,
351
+ "height": 1.08,
352
+ "pins": [
353
+ {
354
+ "pinId": "schematic_port_34",
355
+ "displayName": "anode",
356
+ "x": -0.8,
357
+ "y": 5.04,
358
+ "_facingDirection": "y+"
359
+ },
360
+ {
361
+ "pinId": "schematic_port_35",
362
+ "displayName": "cathode",
363
+ "x": -0.8,
364
+ "y": 3.96,
365
+ "_facingDirection": "y-"
366
+ }
367
+ ]
368
+ },
369
+ {
370
+ "chipId": "schematic_component_12",
371
+ "center": {
372
+ "x": 0.9550000000000001,
373
+ "y": 6.4
374
+ },
375
+ "width": 1.21,
376
+ "height": 0.5999999999999996,
377
+ "pins": [
378
+ {
379
+ "pinId": "schematic_port_36",
380
+ "displayName": "anode",
381
+ "x": 0.8,
382
+ "y": 6.7,
383
+ "_facingDirection": "y+"
384
+ },
385
+ {
386
+ "pinId": "schematic_port_37",
387
+ "displayName": "cathode",
388
+ "x": 0.8,
389
+ "y": 6.1000000000000005,
390
+ "_facingDirection": "y-"
391
+ }
392
+ ]
393
+ },
394
+ {
395
+ "chipId": "schematic_component_13",
396
+ "center": {
397
+ "x": 0.9249999999999999,
398
+ "y": 4.5
399
+ },
400
+ "width": 0.8699999999999999,
401
+ "height": 1.08,
402
+ "pins": [
403
+ {
404
+ "pinId": "schematic_port_38",
405
+ "displayName": "anode",
406
+ "x": 0.8,
407
+ "y": 5.04,
408
+ "_facingDirection": "y+"
409
+ },
410
+ {
411
+ "pinId": "schematic_port_39",
412
+ "displayName": "cathode",
413
+ "x": 0.8,
414
+ "y": 3.96,
415
+ "_facingDirection": "y-"
416
+ }
417
+ ]
418
+ }
419
+ ],
420
+ "directConnections": [
421
+ {
422
+ "netId": ".U1 > .OUT to C2.pin1",
423
+ "pinIds": [
424
+ "schematic_port_10",
425
+ "schematic_port_18"
426
+ ]
427
+ },
428
+ {
429
+ "netId": ".R_temp > .pin1 to U1.pin1",
430
+ "netLabelWidth": 0.36,
431
+ "anchoredNetLabelWidth": 0.36,
432
+ "allowInlineNetLabel": true,
433
+ "inlineNetLabelHeight": 0.12,
434
+ "inlineNetLabelWidth": 0.24,
435
+ "pinIds": [
436
+ "schematic_port_20",
437
+ "schematic_port_2"
438
+ ]
439
+ },
440
+ {
441
+ "netId": ".VBAT > .pin1 to U1.pin2",
442
+ "netLabelWidth": 0.48,
443
+ "pinIds": [
444
+ "schematic_port_22",
445
+ "schematic_port_3"
446
+ ]
447
+ },
448
+ {
449
+ "netId": ".R4 > .pin1 to R5.pin1",
450
+ "pinIds": [
451
+ "schematic_port_32",
452
+ "schematic_port_36"
453
+ ]
454
+ },
455
+ {
456
+ "netId": ".R4 > .pin2 to D1.anode",
457
+ "pinIds": [
458
+ "schematic_port_33",
459
+ "schematic_port_34"
460
+ ]
461
+ },
462
+ {
463
+ "netId": ".R5 > .pin2 to D2.anode",
464
+ "pinIds": [
465
+ "schematic_port_37",
466
+ "schematic_port_38"
467
+ ]
468
+ }
469
+ ],
470
+ "netConnections": [
471
+ {
472
+ "netId": "IN",
473
+ "isGround": false,
474
+ "netLabelWidth": 0.36,
475
+ "anchoredNetLabelWidth": 0.36,
476
+ "allowInlineNetLabel": true,
477
+ "inlineNetLabelHeight": 0.12,
478
+ "inlineNetLabelWidth": 0.24,
479
+ "pinIds": [
480
+ "schematic_port_0",
481
+ "schematic_port_12",
482
+ "schematic_port_16"
483
+ ]
484
+ },
485
+ {
486
+ "netId": "GND",
487
+ "isGround": true,
488
+ "netLabelWidth": 0.42,
489
+ "netLabelHeight": 0.48,
490
+ "pinIds": [
491
+ "schematic_port_1",
492
+ "schematic_port_8",
493
+ "schematic_port_17",
494
+ "schematic_port_19",
495
+ "schematic_port_21",
496
+ "schematic_port_23",
497
+ "schematic_port_25",
498
+ "schematic_port_27",
499
+ "schematic_port_29",
500
+ "schematic_port_31"
501
+ ]
502
+ },
503
+ {
504
+ "netId": "TS",
505
+ "isGround": false,
506
+ "netLabelWidth": 0.36,
507
+ "anchoredNetLabelWidth": 0.36,
508
+ "allowInlineNetLabel": true,
509
+ "inlineNetLabelHeight": 0.12,
510
+ "inlineNetLabelWidth": 0.24,
511
+ "pinIds": [
512
+ "schematic_port_2",
513
+ "schematic_port_20"
514
+ ]
515
+ },
516
+ {
517
+ "netId": "BAT",
518
+ "isGround": false,
519
+ "netLabelWidth": 0.48,
520
+ "anchoredNetLabelWidth": 0.48,
521
+ "allowInlineNetLabel": true,
522
+ "inlineNetLabelHeight": 0.12,
523
+ "inlineNetLabelWidth": 0.32,
524
+ "pinIds": [
525
+ "schematic_port_3",
526
+ "schematic_port_22",
527
+ "schematic_port_24"
528
+ ]
529
+ },
530
+ {
531
+ "netId": "N_CE",
532
+ "isGround": false,
533
+ "netLabelWidth": 0.6,
534
+ "anchoredNetLabelWidth": 0.6,
535
+ "allowInlineNetLabel": true,
536
+ "inlineNetLabelHeight": 0.12,
537
+ "inlineNetLabelWidth": 0.4,
538
+ "pinIds": [
539
+ "schematic_port_4"
540
+ ]
541
+ },
542
+ {
543
+ "netId": "EN2",
544
+ "isGround": false,
545
+ "netLabelWidth": 0.48,
546
+ "anchoredNetLabelWidth": 0.48,
547
+ "allowInlineNetLabel": true,
548
+ "inlineNetLabelHeight": 0.12,
549
+ "inlineNetLabelWidth": 0.32,
550
+ "pinIds": [
551
+ "schematic_port_5"
552
+ ]
553
+ },
554
+ {
555
+ "netId": "EN1",
556
+ "isGround": false,
557
+ "netLabelWidth": 0.48,
558
+ "anchoredNetLabelWidth": 0.48,
559
+ "allowInlineNetLabel": true,
560
+ "inlineNetLabelHeight": 0.12,
561
+ "inlineNetLabelWidth": 0.32,
562
+ "pinIds": [
563
+ "schematic_port_6"
564
+ ]
565
+ },
566
+ {
567
+ "netId": "N_PGOOD",
568
+ "isGround": false,
569
+ "netLabelWidth": 0.96,
570
+ "anchoredNetLabelWidth": 0.96,
571
+ "allowInlineNetLabel": true,
572
+ "inlineNetLabelHeight": 0.12,
573
+ "inlineNetLabelWidth": 0.64,
574
+ "pinIds": [
575
+ "schematic_port_7",
576
+ "schematic_port_35"
577
+ ]
578
+ },
579
+ {
580
+ "netId": "N_CHG",
581
+ "isGround": false,
582
+ "netLabelWidth": 0.72,
583
+ "anchoredNetLabelWidth": 0.72,
584
+ "allowInlineNetLabel": true,
585
+ "inlineNetLabelHeight": 0.12,
586
+ "inlineNetLabelWidth": 0.48,
587
+ "pinIds": [
588
+ "schematic_port_9",
589
+ "schematic_port_39"
590
+ ]
591
+ },
592
+ {
593
+ "netId": "ILIM",
594
+ "isGround": false,
595
+ "netLabelWidth": 0.6,
596
+ "anchoredNetLabelWidth": 0.6,
597
+ "allowInlineNetLabel": true,
598
+ "inlineNetLabelHeight": 0.12,
599
+ "inlineNetLabelWidth": 0.4,
600
+ "pinIds": [
601
+ "schematic_port_11",
602
+ "schematic_port_28"
603
+ ]
604
+ },
605
+ {
606
+ "netId": "TMR",
607
+ "isGround": false,
608
+ "netLabelWidth": 0.48,
609
+ "anchoredNetLabelWidth": 0.48,
610
+ "allowInlineNetLabel": true,
611
+ "inlineNetLabelHeight": 0.12,
612
+ "inlineNetLabelWidth": 0.32,
613
+ "pinIds": [
614
+ "schematic_port_13",
615
+ "schematic_port_26"
616
+ ]
617
+ },
618
+ {
619
+ "netId": "TD",
620
+ "isGround": false,
621
+ "netLabelWidth": 0.36,
622
+ "anchoredNetLabelWidth": 0.36,
623
+ "allowInlineNetLabel": true,
624
+ "inlineNetLabelHeight": 0.12,
625
+ "inlineNetLabelWidth": 0.24,
626
+ "pinIds": [
627
+ "schematic_port_14"
628
+ ]
629
+ },
630
+ {
631
+ "netId": "ISET",
632
+ "isGround": false,
633
+ "netLabelWidth": 0.6,
634
+ "anchoredNetLabelWidth": 0.6,
635
+ "allowInlineNetLabel": true,
636
+ "inlineNetLabelHeight": 0.12,
637
+ "inlineNetLabelWidth": 0.4,
638
+ "pinIds": [
639
+ "schematic_port_15",
640
+ "schematic_port_30"
641
+ ]
642
+ }
643
+ ],
644
+ "textBoxes": [
645
+ {
646
+ "chipId": "schematic_component_0",
647
+ "center": {
648
+ "x": -6.17,
649
+ "y": 1.17
650
+ },
651
+ "width": 0.96,
652
+ "height": 0.18000000000000016,
653
+ "text": "DC INPUT"
654
+ },
655
+ {
656
+ "chipId": "schematic_component_0",
657
+ "center": {
658
+ "x": -6.23,
659
+ "y": 2.415
660
+ },
661
+ "width": 0.9599999999999991,
662
+ "height": 0.24999999999999956,
663
+ "text": "ADAPTER"
664
+ }
665
+ ],
666
+ "availableNetLabelOrientations": {
667
+ "IN": [
668
+ "x-",
669
+ "x+"
670
+ ],
671
+ "GND": [
672
+ "y-"
673
+ ],
674
+ "TS": [
675
+ "x-",
676
+ "x+"
677
+ ],
678
+ "BAT": [
679
+ "x-",
680
+ "x+"
681
+ ],
682
+ "N_CE": [
683
+ "x-",
684
+ "x+"
685
+ ],
686
+ "EN2": [
687
+ "x-",
688
+ "x+"
689
+ ],
690
+ "EN1": [
691
+ "x-",
692
+ "x+"
693
+ ],
694
+ "N_PGOOD": [
695
+ "x-",
696
+ "x+"
697
+ ],
698
+ "N_CHG": [
699
+ "x-",
700
+ "x+"
701
+ ],
702
+ "ILIM": [
703
+ "x-",
704
+ "x+"
705
+ ],
706
+ "TMR": [
707
+ "x-",
708
+ "x+"
709
+ ],
710
+ "TD": [
711
+ "x-",
712
+ "x+"
713
+ ],
714
+ "ISET": [
715
+ "x-",
716
+ "x+"
717
+ ]
718
+ },
719
+ "maxMspPairDistance": 2.4,
720
+ "_hideRatsNet": false
721
+ }