@tscircuit/schematic-trace-solver 0.0.48 → 0.0.49

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 (162) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +51 -1
  3. package/dist/index.js +730 -43
  4. package/lib/solvers/Example28Solver/Example28Solver.ts +182 -0
  5. package/lib/solvers/Example28Solver/geometry.ts +246 -0
  6. package/lib/solvers/Example28Solver/labelMovement.ts +82 -0
  7. package/lib/solvers/Example28Solver/reroute.ts +368 -0
  8. package/lib/solvers/Example28Solver/types.ts +47 -0
  9. package/lib/solvers/Example28Solver/visualize.ts +96 -0
  10. package/lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver.ts +16 -0
  11. package/package.json +1 -1
  12. package/site/SchematicTraceSingleLineSolver2/SchematicTraceSingleLineSolver2_01-example17-d1_1-u1_1.page.tsx +2 -0
  13. package/site/TraceCleanupSolver/TraceCleanupSolver.page.tsx +23 -0
  14. package/site/TraceLabelOverlapAvoidanceSolver/MergedNetLabelObstacles.page.tsx +18 -0
  15. package/site/TraceLabelOverlapAvoidanceSolver/OverlapAvoidanceStepSolver.page.tsx +24 -0
  16. package/site/TraceLabelOverlapAvoidanceSolver/SingleOverlapSolver.page.tsx +10 -0
  17. package/site/TraceLabelOverlapAvoidanceSolver/TraceLabelOverlapAvoidanceSolver.page.tsx +146 -0
  18. package/site/TraceLabelOverlapAvoidanceSolver/renderComparisonView01.page.tsx +32 -0
  19. package/site/TraceLabelOverlapAvoidanceSolver/renderComparisonView02.page.tsx +32 -0
  20. package/site/TraceLabelOverlapAvoidanceSolver/renderComparisonView03.page.tsx +35 -0
  21. package/site/examples/example01.page.tsx +6 -0
  22. package/site/examples/example02.page.tsx +4 -180
  23. package/site/examples/example03.page.tsx +3 -212
  24. package/site/examples/example04.page.tsx +6 -0
  25. package/site/examples/example05.page.tsx +3 -179
  26. package/site/examples/example06.page.tsx +3 -57
  27. package/site/examples/example07.page.tsx +3 -132
  28. package/site/examples/example08.page.tsx +3 -91
  29. package/site/examples/example09.page.tsx +3 -414
  30. package/site/examples/example10.page.tsx +3 -75
  31. package/site/examples/example11.page.tsx +3 -116
  32. package/site/examples/example12.page.tsx +3 -94
  33. package/site/examples/example13.page.tsx +3 -216
  34. package/site/examples/example14.page.tsx +3 -207
  35. package/site/examples/example15.page.tsx +6 -0
  36. package/site/examples/example16.page.tsx +6 -0
  37. package/site/examples/example17.page.tsx +6 -0
  38. package/site/examples/example18.page.tsx +3 -178
  39. package/site/examples/example19.page.tsx +3 -166
  40. package/site/examples/example20.page.tsx +3 -100
  41. package/site/examples/example21.page.tsx +3 -174
  42. package/site/examples/example22.page.tsx +3 -105
  43. package/site/examples/example23.page.tsx +3 -134
  44. package/site/examples/example24.page.tsx +3 -125
  45. package/site/examples/example25.page.tsx +2 -0
  46. package/site/examples/example26.page.tsx +2 -0
  47. package/site/examples/example27.page.tsx +2 -0
  48. package/site/examples/example28.page.tsx +3 -58
  49. package/site/examples/example29.page.tsx +6 -0
  50. package/site/examples/example30.page.tsx +6 -0
  51. package/site/examples/example31.page.tsx +4 -0
  52. package/tests/assets/example01.json +109 -0
  53. package/tests/assets/example02.json +178 -0
  54. package/tests/assets/example03.json +210 -0
  55. package/tests/assets/example04.json +41 -0
  56. package/tests/assets/example05.json +175 -0
  57. package/tests/assets/example06.json +55 -0
  58. package/tests/assets/example07.json +130 -0
  59. package/tests/assets/example08.json +89 -0
  60. package/tests/assets/example09.json +412 -0
  61. package/tests/assets/example10.json +73 -0
  62. package/tests/assets/example11.json +114 -0
  63. package/tests/assets/example12.json +92 -0
  64. package/tests/assets/example13.json +214 -0
  65. package/tests/assets/example14.json +205 -0
  66. package/tests/assets/example15.json +618 -0
  67. package/tests/assets/example16.json +102 -0
  68. package/tests/assets/example17.json +160 -0
  69. package/tests/assets/example18.json +176 -0
  70. package/tests/assets/example19.json +164 -0
  71. package/tests/assets/example20.json +98 -0
  72. package/tests/assets/example21.json +172 -0
  73. package/tests/assets/example22.json +103 -0
  74. package/tests/assets/example23.json +132 -0
  75. package/tests/assets/example24.json +123 -0
  76. package/tests/assets/example25.json +146 -33
  77. package/tests/assets/example26.json +51 -1134
  78. package/tests/assets/example27.json +151 -91
  79. package/tests/assets/example28.json +56 -0
  80. package/tests/assets/example29.json +1206 -0
  81. package/tests/assets/example30.json +168 -0
  82. package/tests/assets/example31.json +46 -0
  83. package/tests/examples/__snapshots__/example01.snap.svg +12 -6
  84. package/tests/examples/__snapshots__/example02.snap.svg +16 -8
  85. package/tests/examples/__snapshots__/example03.snap.svg +36 -18
  86. package/tests/examples/__snapshots__/example04.snap.svg +8 -4
  87. package/tests/examples/__snapshots__/example05.snap.svg +4 -2
  88. package/tests/examples/__snapshots__/example06.snap.svg +4 -2
  89. package/tests/examples/__snapshots__/example07.snap.svg +20 -10
  90. package/tests/examples/__snapshots__/example08.snap.svg +16 -8
  91. package/tests/examples/__snapshots__/example09.snap.svg +80 -40
  92. package/tests/examples/__snapshots__/example10.snap.svg +16 -8
  93. package/tests/examples/__snapshots__/example11.snap.svg +24 -12
  94. package/tests/examples/__snapshots__/example12.snap.svg +16 -8
  95. package/tests/examples/__snapshots__/example13.snap.svg +32 -16
  96. package/tests/examples/__snapshots__/example14.snap.svg +115 -48
  97. package/tests/examples/__snapshots__/example15.snap.svg +36 -18
  98. package/tests/examples/__snapshots__/example16.snap.svg +16 -8
  99. package/tests/examples/__snapshots__/example17.snap.svg +16 -8
  100. package/tests/examples/__snapshots__/example18.snap.svg +20 -10
  101. package/tests/examples/__snapshots__/example19.snap.svg +16 -8
  102. package/tests/examples/__snapshots__/example20.snap.svg +43 -135
  103. package/tests/examples/__snapshots__/example21.snap.svg +34 -18
  104. package/tests/examples/__snapshots__/example22.snap.svg +37 -23
  105. package/tests/examples/__snapshots__/example23.snap.svg +62 -26
  106. package/tests/examples/__snapshots__/example24.snap.svg +50 -28
  107. package/tests/examples/__snapshots__/example25.snap.svg +175 -49
  108. package/tests/examples/__snapshots__/example26.snap.svg +16 -8
  109. package/tests/examples/__snapshots__/example27.snap.svg +24 -12
  110. package/tests/examples/__snapshots__/example28.snap.svg +24 -18
  111. package/tests/examples/__snapshots__/example29.snap.svg +184 -92
  112. package/tests/examples/__snapshots__/example30.snap.svg +48 -24
  113. package/tests/examples/__snapshots__/example31.snap.svg +88 -0
  114. package/tests/examples/example01.test.ts +2 -2
  115. package/tests/examples/example02.test.ts +2 -2
  116. package/tests/examples/example03.test.ts +2 -2
  117. package/tests/examples/example04.test.ts +2 -2
  118. package/tests/examples/example05.test.ts +2 -2
  119. package/tests/examples/example06.test.ts +2 -2
  120. package/tests/examples/example07.test.ts +2 -2
  121. package/tests/examples/example08.test.ts +2 -2
  122. package/tests/examples/example09.test.ts +2 -2
  123. package/tests/examples/example10.test.ts +2 -2
  124. package/tests/examples/{example11.test.tsx → example11.test.ts} +2 -2
  125. package/tests/examples/{example12.test.tsx → example12.test.ts} +2 -2
  126. package/tests/examples/{example13.test.tsx → example13.test.ts} +2 -2
  127. package/tests/examples/example14.test.ts +12 -0
  128. package/tests/examples/example15.test.ts +12 -0
  129. package/tests/examples/example16.test.ts +12 -0
  130. package/tests/examples/example17.test.ts +12 -0
  131. package/tests/examples/example18.test.ts +12 -0
  132. package/tests/examples/example19.test.ts +12 -0
  133. package/tests/examples/example20.test.ts +12 -0
  134. package/tests/examples/example21.test.ts +12 -0
  135. package/tests/examples/example22.test.ts +12 -0
  136. package/tests/examples/example23.test.ts +12 -0
  137. package/tests/examples/example24.test.ts +12 -0
  138. package/tests/examples/example25.test.ts +12 -0
  139. package/tests/examples/example26.test.ts +12 -0
  140. package/tests/examples/example27.test.ts +3 -232
  141. package/tests/examples/example28.test.ts +2 -2
  142. package/tests/examples/example29.test.ts +1 -2
  143. package/tests/examples/example30.test.ts +2 -2
  144. package/tests/examples/example31.test.ts +12 -0
  145. package/site/examples/example01-basic.page.tsx +0 -105
  146. package/site/examples/example04-single-symbol.page.tsx +0 -46
  147. package/site/examples/example15-rp2040-caps.page.tsx +0 -623
  148. package/site/examples/example16-core-repro51.page.tsx +0 -107
  149. package/site/examples/example17-straight-line-trace.page.tsx +0 -165
  150. package/tests/examples/example14.test.tsx +0 -11
  151. package/tests/examples/example15.test.tsx +0 -629
  152. package/tests/examples/example16.test.tsx +0 -113
  153. package/tests/examples/example17.test.tsx +0 -171
  154. package/tests/examples/example18.test.tsx +0 -187
  155. package/tests/examples/example19.test.tsx +0 -175
  156. package/tests/examples/example20.test.tsx +0 -190
  157. package/tests/examples/example21.test.tsx +0 -183
  158. package/tests/examples/example22.test.tsx +0 -109
  159. package/tests/examples/example23.test.tsx +0 -109
  160. package/tests/examples/example24.test.tsx +0 -114
  161. package/tests/examples/example25.test.tsx +0 -143
  162. package/tests/examples/example26.test.tsx +0 -134
@@ -97,40 +97,52 @@ x+" data-x="0.6000000000000001" data-y="0.8999999999999999" cx="401.290322580645
97
97
  x+" data-x="0.6000000000000001" data-y="1.0999999999999999" cx="401.29032258064524" cy="112.25806451612902" r="3" fill="hsl(168, 100%, 50%, 0.8)" />
98
98
  </g>
99
99
  <g>
100
- <circle data-type="point" data-label="" data-x="-0.8" data-y="1.0999999999999999" cx="148.38709677419357" cy="112.25806451612902" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
100
+ <circle data-type="point" data-label="anchorPoint
101
+ orientation: y-" data-x="-0.8" data-y="1.0999999999999999" cx="148.38709677419357" cy="112.25806451612902" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
101
102
  </g>
102
103
  <g>
103
- <circle data-type="point" data-label="" data-x="-0.6000000000000001" data-y="0.8999999999999999" cx="184.51612903225808" cy="148.38709677419354" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
104
+ <circle data-type="point" data-label="anchorPoint
105
+ orientation: x-" data-x="-0.6000000000000001" data-y="0.8999999999999999" cx="184.51612903225808" cy="148.38709677419354" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
104
106
  </g>
105
107
  <g>
106
- <circle data-type="point" data-label="" data-x="0.6000000000000001" data-y="-0.2999999999999998" cx="401.29032258064524" cy="365.1612903225806" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
108
+ <circle data-type="point" data-label="anchorPoint
109
+ orientation: x+" data-x="0.6000000000000001" data-y="-0.2999999999999998" cx="401.29032258064524" cy="365.1612903225806" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
107
110
  </g>
108
111
  <g>
109
- <circle data-type="point" data-label="" data-x="-0.6000000000000001" data-y="0.6999999999999998" cx="184.51612903225808" cy="184.51612903225805" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
112
+ <circle data-type="point" data-label="anchorPoint
113
+ orientation: x-" data-x="-0.6000000000000001" data-y="0.6999999999999998" cx="184.51612903225808" cy="184.51612903225805" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
110
114
  </g>
111
115
  <g>
112
- <circle data-type="point" data-label="" data-x="0.6000000000000001" data-y="-0.4999999999999998" cx="401.29032258064524" cy="401.2903225806451" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
116
+ <circle data-type="point" data-label="anchorPoint
117
+ orientation: x+" data-x="0.6000000000000001" data-y="-0.4999999999999998" cx="401.29032258064524" cy="401.2903225806451" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
113
118
  </g>
114
119
  <g>
115
- <circle data-type="point" data-label="" data-x="-0.8755000000000002" data-y="0.4999999999999998" cx="134.7483870967742" cy="220.6451612903226" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
120
+ <circle data-type="point" data-label="anchorPoint
121
+ orientation: y+" data-x="-0.8755000000000002" data-y="0.4999999999999998" cx="134.7483870967742" cy="220.6451612903226" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
116
122
  </g>
117
123
  <g>
118
- <circle data-type="point" data-label="" data-x="-0.6000000000000001" data-y="0.2999999999999998" cx="184.51612903225808" cy="256.7741935483871" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
124
+ <circle data-type="point" data-label="anchorPoint
125
+ orientation: x-" data-x="-0.6000000000000001" data-y="0.2999999999999998" cx="184.51612903225808" cy="256.7741935483871" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
119
126
  </g>
120
127
  <g>
121
- <circle data-type="point" data-label="" data-x="0.6000000000000001" data-y="-0.8999999999999999" cx="401.29032258064524" cy="473.54838709677415" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
128
+ <circle data-type="point" data-label="anchorPoint
129
+ orientation: x+" data-x="0.6000000000000001" data-y="-0.8999999999999999" cx="401.29032258064524" cy="473.54838709677415" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
122
130
  </g>
123
131
  <g>
124
- <circle data-type="point" data-label="" data-x="-0.6000000000000001" data-y="0.09999999999999987" cx="184.51612903225808" cy="292.9032258064516" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
132
+ <circle data-type="point" data-label="anchorPoint
133
+ orientation: x-" data-x="-0.6000000000000001" data-y="0.09999999999999987" cx="184.51612903225808" cy="292.9032258064516" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
125
134
  </g>
126
135
  <g>
127
- <circle data-type="point" data-label="" data-x="0.6000000000000001" data-y="-1.0999999999999999" cx="401.29032258064524" cy="509.67741935483866" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
136
+ <circle data-type="point" data-label="anchorPoint
137
+ orientation: x+" data-x="0.6000000000000001" data-y="-1.0999999999999999" cx="401.29032258064524" cy="509.67741935483866" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
128
138
  </g>
129
139
  <g>
130
- <circle data-type="point" data-label="" data-x="-0.6000000000000001" data-y="-0.10000000000000009" cx="184.51612903225808" cy="329.0322580645161" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
140
+ <circle data-type="point" data-label="anchorPoint
141
+ orientation: x-" data-x="-0.6000000000000001" data-y="-0.10000000000000009" cx="184.51612903225808" cy="329.0322580645161" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
131
142
  </g>
132
143
  <g>
133
- <circle data-type="point" data-label="" data-x="0.6000000000000001" data-y="0.10000000000000009" cx="401.29032258064524" cy="292.9032258064516" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
144
+ <circle data-type="point" data-label="anchorPoint
145
+ orientation: x+" data-x="0.6000000000000001" data-y="0.10000000000000009" cx="401.29032258064524" cy="292.9032258064516" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
134
146
  </g>
135
147
  <g>
136
148
  <polyline data-points="-0.6000000000000001,1.0999999999999999 0.6000000000000001,-0.09999999999999987" data-type="line" data-label="" points="184.51612903225808,112.25806451612902 401.29032258064524,329.0322580645161" fill="none" stroke="hsl(16, 100%, 50%, 0.8)" stroke-width="1" />
@@ -163,40 +175,52 @@ x+" data-x="0.6000000000000001" data-y="1.0999999999999999" cx="401.290322580645
163
175
  <rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="184.51612903225808" y="76.12903225806451" width="216.77419354838716" height="469.67741935483866" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005535714285714285" />
164
176
  </g>
165
177
  <g>
166
- <rect data-type="rect" data-label="" data-x="-0.8" data-y="0.8749999999999999" x="130.3225806451613" y="112.25806451612902" width="36.12903225806451" height="81.29032258064515" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
178
+ <rect data-type="rect" data-label="netId: P.pin1 to P.pin18
179
+ globalConnNetId: connectivity_net0" data-x="-0.8" data-y="0.8749999999999999" x="130.3225806451613" y="112.25806451612902" width="36.12903225806451" height="81.29032258064515" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
167
180
  </g>
168
181
  <g>
169
- <rect data-type="rect" data-label="" data-x="-0.8260000000000001" data-y="0.8999999999999999" x="103.04516129032257" y="130.32258064516128" width="81.29032258064518" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
182
+ <rect data-type="rect" data-label="netId: P.pin2 to P.pin17
183
+ globalConnNetId: connectivity_net1" data-x="-0.8260000000000001" data-y="0.8999999999999999" x="103.04516129032257" y="130.32258064516128" width="81.29032258064518" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
170
184
  </g>
171
185
  <g>
172
- <rect data-type="rect" data-label="" data-x="0.8260000000000001" data-y="-0.2999999999999998" x="401.4709677419355" y="347.0967741935483" width="81.29032258064524" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
186
+ <rect data-type="rect" data-label="netId: P.pin2 to P.pin17
187
+ globalConnNetId: connectivity_net1" data-x="0.8260000000000001" data-y="-0.2999999999999998" x="401.4709677419355" y="347.0967741935483" width="81.29032258064524" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
173
188
  </g>
174
189
  <g>
175
- <rect data-type="rect" data-label="" data-x="-0.8260000000000001" data-y="0.6999999999999998" x="103.04516129032257" y="166.4516129032258" width="81.29032258064518" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
190
+ <rect data-type="rect" data-label="netId: P.pin3 to P.pin16
191
+ globalConnNetId: connectivity_net2" data-x="-0.8260000000000001" data-y="0.6999999999999998" x="103.04516129032257" y="166.4516129032258" width="81.29032258064518" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
176
192
  </g>
177
193
  <g>
178
- <rect data-type="rect" data-label="" data-x="0.8260000000000001" data-y="-0.4999999999999998" x="401.4709677419355" y="383.2258064516128" width="81.29032258064524" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
194
+ <rect data-type="rect" data-label="netId: P.pin3 to P.pin16
195
+ globalConnNetId: connectivity_net2" data-x="0.8260000000000001" data-y="-0.4999999999999998" x="401.4709677419355" y="383.2258064516128" width="81.29032258064524" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
179
196
  </g>
180
197
  <g>
181
- <rect data-type="rect" data-label="" data-x="-0.8755000000000002" data-y="0.7249999999999998" x="116.68387096774194" y="139.35483870967744" width="36.12903225806451" height="81.29032258064515" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
198
+ <rect data-type="rect" data-label="netId: P.pin4 to P.pin15
199
+ globalConnNetId: connectivity_net3" data-x="-0.8755000000000002" data-y="0.7249999999999998" x="116.68387096774194" y="139.35483870967744" width="36.12903225806451" height="81.29032258064515" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
182
200
  </g>
183
201
  <g>
184
- <rect data-type="rect" data-label="" data-x="-0.8260000000000001" data-y="0.2999999999999998" x="103.04516129032257" y="238.70967741935485" width="81.29032258064518" height="36.12903225806454" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
202
+ <rect data-type="rect" data-label="netId: P.pin5 to P.pin14
203
+ globalConnNetId: connectivity_net4" data-x="-0.8260000000000001" data-y="0.2999999999999998" x="103.04516129032257" y="238.70967741935485" width="81.29032258064518" height="36.12903225806454" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
185
204
  </g>
186
205
  <g>
187
- <rect data-type="rect" data-label="" data-x="0.8260000000000001" data-y="-0.8999999999999999" x="401.4709677419355" y="455.4838709677419" width="81.29032258064524" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
206
+ <rect data-type="rect" data-label="netId: P.pin5 to P.pin14
207
+ globalConnNetId: connectivity_net4" data-x="0.8260000000000001" data-y="-0.8999999999999999" x="401.4709677419355" y="455.4838709677419" width="81.29032258064524" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
188
208
  </g>
189
209
  <g>
190
- <rect data-type="rect" data-label="" data-x="-0.8260000000000001" data-y="0.09999999999999987" x="103.04516129032257" y="274.83870967741933" width="81.29032258064518" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
210
+ <rect data-type="rect" data-label="netId: P.pin6 to P.pin13
211
+ globalConnNetId: connectivity_net5" data-x="-0.8260000000000001" data-y="0.09999999999999987" x="103.04516129032257" y="274.83870967741933" width="81.29032258064518" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
191
212
  </g>
192
213
  <g>
193
- <rect data-type="rect" data-label="" data-x="0.8260000000000001" data-y="-1.0999999999999999" x="401.4709677419355" y="491.6129032258064" width="81.29032258064524" height="36.12903225806457" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
214
+ <rect data-type="rect" data-label="netId: P.pin6 to P.pin13
215
+ globalConnNetId: connectivity_net5" data-x="0.8260000000000001" data-y="-1.0999999999999999" x="401.4709677419355" y="491.6129032258064" width="81.29032258064524" height="36.12903225806457" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
194
216
  </g>
195
217
  <g>
196
- <rect data-type="rect" data-label="" data-x="-0.8260000000000001" data-y="-0.10000000000000009" x="103.04516129032257" y="310.96774193548384" width="81.29032258064518" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
218
+ <rect data-type="rect" data-label="netId: P.pin7 to P.pin19
219
+ globalConnNetId: connectivity_net6" data-x="-0.8260000000000001" data-y="-0.10000000000000009" x="103.04516129032257" y="310.96774193548384" width="81.29032258064518" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
197
220
  </g>
198
221
  <g>
199
- <rect data-type="rect" data-label="" data-x="0.8260000000000001" data-y="0.10000000000000009" x="401.4709677419355" y="274.83870967741933" width="81.29032258064524" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
222
+ <rect data-type="rect" data-label="netId: P.pin7 to P.pin19
223
+ globalConnNetId: connectivity_net6" data-x="0.8260000000000001" data-y="0.10000000000000009" x="401.4709677419355" y="274.83870967741933" width="81.29032258064524" height="36.12903225806451" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714285" />
200
224
  </g>
201
225
  <g id="crosshair" style="display: none">
202
226
  <line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
@@ -0,0 +1,88 @@
1
+ <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="100%" height="100%" fill="white" />
3
+ <g>
4
+ <circle data-type="point" data-label="U1.1
5
+ x+" data-x="1.2000000000000002" data-y="0.30000000000000004" cx="345.4545454545455" cy="297.72727272727275" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
6
+ </g>
7
+ <g>
8
+ <circle data-type="point" data-label="R1.1
9
+ x+" data-x="3" data-y="-0.10000000000000016" cx="574.5454545454545" cy="348.6363636363637" r="3" fill="hsl(226, 100%, 50%, 0.8)" />
10
+ </g>
11
+ <g>
12
+ <circle data-type="point" data-label="anchorPoint
13
+ orientation: y+" data-x="2.2" data-y="0.30000000000000004" cx="472.72727272727275" cy="297.72727272727275" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
14
+ </g>
15
+ <g>
16
+ <polyline data-points="1.2000000000000002,0.30000000000000004 3,-0.10000000000000016" data-type="line" data-label="" points="345.4545454545455,297.72727272727275 574.5454545454545,348.6363636363637" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
17
+ </g>
18
+ <g>
19
+ <polyline data-points="1.2000000000000002,0.30000000000000004 3.2,0.30000000000000004 3.2,-0.10000000000000016 3,-0.10000000000000016" data-type="line" data-label="" points="345.4545454545455,297.72727272727275 600,297.72727272727275 600,348.6363636363637 574.5454545454545,348.6363636363637" fill="none" stroke="purple" stroke-width="1" />
20
+ </g>
21
+ <g>
22
+ <rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="40" y="272.2727272727273" width="305.4545454545455" height="127.27272727272725" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.007857142857142858" />
23
+ </g>
24
+ <g>
25
+ <rect data-type="rect" data-label="schematic_component_1" data-x="2.45" data-y="-0.10000000000000009" x="434.5454545454546" y="323.887500909091" width="139.9999999999999" height="49.49772545454533" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.007857142857142858" />
26
+ </g>
27
+ <g>
28
+ <rect data-type="rect" data-label="netId: VCC
29
+ globalConnNetId: connectivity_net0" data-x="2.2" data-y="0.525" x="460" y="240.4545454545455" width="25.454545454545496" height="57.27272727272725" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.007857142857142858" />
30
+ </g>
31
+ <g id="crosshair" style="display: none">
32
+ <line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
33
+ <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>
34
+ </g>
35
+ <script>
36
+ <![CDATA[
37
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
38
+ const svg = e.currentTarget;
39
+ const rect = svg.getBoundingClientRect();
40
+ const x = e.clientX - rect.left;
41
+ const y = e.clientY - rect.top;
42
+ const crosshair = svg.getElementById('crosshair');
43
+ const h = svg.getElementById('crosshair-h');
44
+ const v = svg.getElementById('crosshair-v');
45
+ const coords = svg.getElementById('coordinates');
46
+
47
+ crosshair.style.display = 'block';
48
+ h.setAttribute('x1', '0');
49
+ h.setAttribute('x2', '640');
50
+ h.setAttribute('y1', y);
51
+ h.setAttribute('y2', y);
52
+ v.setAttribute('x1', x);
53
+ v.setAttribute('x2', x);
54
+ v.setAttribute('y1', '0');
55
+ v.setAttribute('y2', '640');
56
+
57
+ // Calculate real coordinates using inverse transformation
58
+ const matrix = {
59
+ "a": 127.27272727272727,
60
+ "c": 0,
61
+ "e": 192.72727272727275,
62
+ "b": 0,
63
+ "d": -127.27272727272727,
64
+ "f": 335.90909090909093
65
+ };
66
+ // Manually invert and apply the affine transform
67
+ // Since we only use translate and scale, we can directly compute:
68
+ // x' = (x - tx) / sx
69
+ // y' = (y - ty) / sy
70
+ const sx = matrix.a;
71
+ const sy = matrix.d;
72
+ const tx = matrix.e;
73
+ const ty = matrix.f;
74
+ const realPoint = {
75
+ x: (x - tx) / sx,
76
+ y: (y - ty) / sy // Flip y back since we used negative scale
77
+ }
78
+
79
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
80
+ coords.setAttribute('x', (x + 5).toString());
81
+ coords.setAttribute('y', (y - 5).toString());
82
+ });
83
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
84
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
85
+ });
86
+ ]]>
87
+ </script>
88
+ </svg>
@@ -1,10 +1,10 @@
1
1
  import { test, expect } from "bun:test"
2
2
  import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
- import { inputProblem } from "site/examples/example01-basic.page"
3
+ import inputProblem from "../assets/example01.json"
4
4
  import "tests/fixtures/matcher"
5
5
 
6
6
  test("example01", () => {
7
- const solver = new SchematicTracePipelineSolver(inputProblem)
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
8
 
9
9
  solver.solve()
10
10
 
@@ -1,10 +1,10 @@
1
1
  import { test, expect } from "bun:test"
2
2
  import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
- import { inputProblem } from "site/examples/example02.page"
3
+ import inputProblem from "../assets/example02.json"
4
4
  import "tests/fixtures/matcher"
5
5
 
6
6
  test("example02", () => {
7
- const solver = new SchematicTracePipelineSolver(inputProblem)
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
8
 
9
9
  solver.solve()
10
10
 
@@ -1,10 +1,10 @@
1
1
  import { test, expect } from "bun:test"
2
2
  import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
- import { inputProblem } from "site/examples/example03.page"
3
+ import inputProblem from "../assets/example03.json"
4
4
  import "tests/fixtures/matcher"
5
5
 
6
6
  test("example03", () => {
7
- const solver = new SchematicTracePipelineSolver(inputProblem)
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
8
 
9
9
  solver.solve()
10
10
 
@@ -1,10 +1,10 @@
1
1
  import { test, expect } from "bun:test"
2
2
  import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
- import { inputProblem } from "site/examples/example04-single-symbol.page"
3
+ import inputProblem from "../assets/example04.json"
4
4
  import "tests/fixtures/matcher"
5
5
 
6
6
  test("example04", () => {
7
- const solver = new SchematicTracePipelineSolver(inputProblem)
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
8
 
9
9
  solver.solve()
10
10
 
@@ -1,10 +1,10 @@
1
1
  import { test, expect } from "bun:test"
2
2
  import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
- import { inputProblem } from "site/examples/example05.page"
3
+ import inputProblem from "../assets/example05.json"
4
4
  import "tests/fixtures/matcher"
5
5
 
6
6
  test("example05", () => {
7
- const solver = new SchematicTracePipelineSolver(inputProblem)
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
8
 
9
9
  solver.solve()
10
10
 
@@ -1,10 +1,10 @@
1
1
  import { test, expect } from "bun:test"
2
2
  import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
- import { inputProblem } from "site/examples/example06.page"
3
+ import inputProblem from "../assets/example06.json"
4
4
  import "tests/fixtures/matcher"
5
5
 
6
6
  test("example06", () => {
7
- const solver = new SchematicTracePipelineSolver(inputProblem)
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
8
 
9
9
  solver.solve()
10
10
 
@@ -1,10 +1,10 @@
1
1
  import { test, expect } from "bun:test"
2
2
  import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
- import { inputProblem } from "site/examples/example07.page"
3
+ import inputProblem from "../assets/example07.json"
4
4
  import "tests/fixtures/matcher"
5
5
 
6
6
  test("example07", () => {
7
- const solver = new SchematicTracePipelineSolver(inputProblem)
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
8
 
9
9
  solver.solve()
10
10
 
@@ -1,10 +1,10 @@
1
1
  import { test, expect } from "bun:test"
2
2
  import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
- import { inputProblem } from "site/examples/example08.page"
3
+ import inputProblem from "../assets/example08.json"
4
4
  import "tests/fixtures/matcher"
5
5
 
6
6
  test("example08", () => {
7
- const solver = new SchematicTracePipelineSolver(inputProblem)
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
8
 
9
9
  solver.solve()
10
10
 
@@ -1,10 +1,10 @@
1
1
  import { test, expect } from "bun:test"
2
2
  import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
- import { inputProblem } from "site/examples/example09.page"
3
+ import inputProblem from "../assets/example09.json"
4
4
  import "tests/fixtures/matcher"
5
5
 
6
6
  test("example09", () => {
7
- const solver = new SchematicTracePipelineSolver(inputProblem)
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
8
 
9
9
  solver.solve()
10
10
 
@@ -1,10 +1,10 @@
1
1
  import { test, expect } from "bun:test"
2
2
  import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
- import { inputProblem } from "site/examples/example10.page"
3
+ import inputProblem from "../assets/example10.json"
4
4
  import "tests/fixtures/matcher"
5
5
 
6
6
  test("example10", () => {
7
- const solver = new SchematicTracePipelineSolver(inputProblem)
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
8
 
9
9
  solver.solve()
10
10
 
@@ -1,10 +1,10 @@
1
1
  import { test, expect } from "bun:test"
2
2
  import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
- import { inputProblem } from "site/examples/example11.page"
3
+ import inputProblem from "../assets/example11.json"
4
4
  import "tests/fixtures/matcher"
5
5
 
6
6
  test("example11", () => {
7
- const solver = new SchematicTracePipelineSolver(inputProblem)
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
8
 
9
9
  solver.solve()
10
10
 
@@ -1,10 +1,10 @@
1
1
  import { test, expect } from "bun:test"
2
2
  import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
- import { inputProblem } from "site/examples/example12.page"
3
+ import inputProblem from "../assets/example12.json"
4
4
  import "tests/fixtures/matcher"
5
5
 
6
6
  test("example12", () => {
7
- const solver = new SchematicTracePipelineSolver(inputProblem)
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
8
 
9
9
  solver.solve()
10
10
 
@@ -1,10 +1,10 @@
1
1
  import { test, expect } from "bun:test"
2
2
  import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
- import { inputProblem } from "site/examples/example13.page"
3
+ import inputProblem from "../assets/example13.json"
4
4
  import "tests/fixtures/matcher"
5
5
 
6
6
  test("example13", () => {
7
- const solver = new SchematicTracePipelineSolver(inputProblem)
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
8
 
9
9
  solver.solve()
10
10
 
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example14.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example14", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example15.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example15", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example16.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example16", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example17.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example17", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example18.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example18", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example19.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example19", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example20.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example20", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example21.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example21", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example22.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example22", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example23.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example23", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example24.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example24", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example25.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example25", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example26.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example26", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })