@tscircuit/schematic-trace-solver 0.0.61 → 0.0.63

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.
@@ -0,0 +1,231 @@
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="J2.1
5
+ x+" data-x="0.325" data-y="0.8" cx="112.43781094527364" cy="258.70646766169153" r="3" fill="hsl(99, 100%, 50%, 0.8)" />
6
+ </g>
7
+ <g>
8
+ <circle data-type="point" data-label="J2.2
9
+ x+" data-x="0.325" data-y="0.6" cx="112.43781094527364" cy="280.9950248756219" r="3" fill="hsl(100, 100%, 50%, 0.8)" />
10
+ </g>
11
+ <g>
12
+ <circle data-type="point" data-label="J2.3
13
+ x+" data-x="0.325" data-y="0.4" cx="112.43781094527364" cy="303.2835820895522" r="3" fill="hsl(101, 100%, 50%, 0.8)" />
14
+ </g>
15
+ <g>
16
+ <circle data-type="point" data-label="J2.4
17
+ x+" data-x="0.325" data-y="0.2" cx="112.43781094527364" cy="325.5721393034826" r="3" fill="hsl(102, 100%, 50%, 0.8)" />
18
+ </g>
19
+ <g>
20
+ <circle data-type="point" data-label="J2.5
21
+ x+" data-x="0.325" data-y="0" cx="112.43781094527364" cy="347.8606965174129" r="3" fill="hsl(103, 100%, 50%, 0.8)" />
22
+ </g>
23
+ <g>
24
+ <circle data-type="point" data-label="J2.6
25
+ x+" data-x="0.325" data-y="-0.2" cx="112.43781094527364" cy="370.14925373134326" r="3" fill="hsl(104, 100%, 50%, 0.8)" />
26
+ </g>
27
+ <g>
28
+ <circle data-type="point" data-label="J2.7
29
+ x+" data-x="0.325" data-y="-0.4" cx="112.43781094527364" cy="392.4378109452736" r="3" fill="hsl(105, 100%, 50%, 0.8)" />
30
+ </g>
31
+ <g>
32
+ <circle data-type="point" data-label="J2.8
33
+ x+" data-x="0.325" data-y="-0.6" cx="112.43781094527364" cy="414.72636815920396" r="3" fill="hsl(106, 100%, 50%, 0.8)" />
34
+ </g>
35
+ <g>
36
+ <circle data-type="point" data-label="J2.9
37
+ x+" data-x="0.325" data-y="-0.8" cx="112.43781094527364" cy="437.0149253731343" r="3" fill="hsl(107, 100%, 50%, 0.8)" />
38
+ </g>
39
+ <g>
40
+ <circle data-type="point" data-label="U1.1
41
+ x-" data-x="3.5" data-y="1.2" cx="466.2686567164179" cy="214.12935323383084" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
42
+ </g>
43
+ <g>
44
+ <circle data-type="point" data-label="U1.2
45
+ x-" data-x="3.5" data-y="0.8" cx="466.2686567164179" cy="258.70646766169153" r="3" fill="hsl(320, 100%, 50%, 0.8)" />
46
+ </g>
47
+ <g>
48
+ <circle data-type="point" data-label="U1.3
49
+ x-" data-x="3.5" data-y="0.4" cx="466.2686567164179" cy="303.2835820895522" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
50
+ </g>
51
+ <g>
52
+ <circle data-type="point" data-label="U1.4
53
+ x-" data-x="3.5" data-y="0" cx="466.2686567164179" cy="347.8606965174129" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
54
+ </g>
55
+ <g>
56
+ <circle data-type="point" data-label="U1.5
57
+ x-" data-x="3.5" data-y="-0.4" cx="466.2686567164179" cy="392.4378109452736" r="3" fill="hsl(323, 100%, 50%, 0.8)" />
58
+ </g>
59
+ <g>
60
+ <circle data-type="point" data-label="U1.6
61
+ x+" data-x="4.5" data-y="1" cx="577.7114427860696" cy="236.4179104477612" r="3" fill="hsl(324, 100%, 50%, 0.8)" />
62
+ </g>
63
+ <g>
64
+ <circle data-type="point" data-label="U1.7
65
+ x+" data-x="4.5" data-y="0.6" cx="577.7114427860696" cy="280.9950248756219" r="3" fill="hsl(325, 100%, 50%, 0.8)" />
66
+ </g>
67
+ <g>
68
+ <circle data-type="point" data-label="U1.8
69
+ x+" data-x="4.5" data-y="0.2" cx="577.7114427860696" cy="325.5721393034826" r="3" fill="hsl(326, 100%, 50%, 0.8)" />
70
+ </g>
71
+ <g>
72
+ <circle data-type="point" data-label="U1.9
73
+ x+" data-x="4.5" data-y="-0.2" cx="577.7114427860696" cy="370.14925373134326" r="3" fill="hsl(327, 100%, 50%, 0.8)" />
74
+ </g>
75
+ <g>
76
+ <circle data-type="point" data-label="anchor
77
+ orientation: y+" data-x="0.325" data-y="0.4" cx="112.43781094527364" cy="303.2835820895522" r="3" fill="red" />
78
+ </g>
79
+ <g>
80
+ <circle data-type="point" data-label="anchor
81
+ orientation: y-" data-x="0.325" data-y="0.4" cx="112.43781094527364" cy="303.2835820895522" r="3" fill="red" />
82
+ </g>
83
+ <g>
84
+ <circle data-type="point" data-label="anchor
85
+ orientation: y+" data-x="1.9125" data-y="0.4" cx="289.35323383084574" cy="303.2835820895522" r="3" fill="orange" />
86
+ </g>
87
+ <g>
88
+ <circle data-type="point" data-label="anchor
89
+ orientation: y-" data-x="1.9125" data-y="0.4" cx="289.35323383084574" cy="303.2835820895522" r="3" fill="orange" />
90
+ </g>
91
+ <g>
92
+ <circle data-type="point" data-label="anchor
93
+ orientation: y+" data-x="3.5" data-y="0.4" cx="466.2686567164179" cy="303.2835820895522" r="3" fill="red" />
94
+ </g>
95
+ <g>
96
+ <circle data-type="point" data-label="anchor
97
+ orientation: y-" data-x="3.5" data-y="0.4" cx="466.2686567164179" cy="303.2835820895522" r="3" fill="red" />
98
+ </g>
99
+ <g>
100
+ <polyline data-points="0.325,0.8 3.5,1.2" data-type="line" data-label="" points="112.43781094527364,258.70646766169153 466.2686567164179,214.12935323383084" fill="none" stroke="hsl(0, 100%, 50%, 0.8)" stroke-width="1" />
101
+ </g>
102
+ <g>
103
+ <polyline data-points="0.325,0.6 3.5,0.8" data-type="line" data-label="" points="112.43781094527364,280.9950248756219 466.2686567164179,258.70646766169153" fill="none" stroke="hsl(16, 100%, 50%, 0.8)" stroke-width="1" />
104
+ </g>
105
+ <g>
106
+ <polyline data-points="0.325,0.4 3.5,0.4" data-type="line" data-label="" points="112.43781094527364,303.2835820895522 466.2686567164179,303.2835820895522" fill="none" stroke="hsl(40, 100%, 50%, 0.8)" stroke-width="1" />
107
+ </g>
108
+ <g>
109
+ <polyline data-points="0.325,0.2 3.5,0" data-type="line" data-label="" points="112.43781094527364,325.5721393034826 466.2686567164179,347.8606965174129" fill="none" stroke="hsl(240, 100%, 50%, 0.8)" stroke-width="1" />
110
+ </g>
111
+ <g>
112
+ <polyline data-points="0.325,0 3.5,-0.4" data-type="line" data-label="" points="112.43781094527364,347.8606965174129 466.2686567164179,392.4378109452736" fill="none" stroke="hsl(88, 100%, 50%, 0.8)" stroke-width="1" />
113
+ </g>
114
+ <g>
115
+ <polyline data-points="0.325,-0.2 4.5,1" data-type="line" data-label="" points="112.43781094527364,370.14925373134326 577.7114427860696,236.4179104477612" fill="none" stroke="hsl(288, 100%, 50%, 0.8)" stroke-width="1" />
116
+ </g>
117
+ <g>
118
+ <polyline data-points="0.325,-0.4 4.5,0.6" data-type="line" data-label="" points="112.43781094527364,392.4378109452736 577.7114427860696,280.9950248756219" fill="none" stroke="hsl(128, 100%, 50%, 0.8)" stroke-width="1" />
119
+ </g>
120
+ <g>
121
+ <polyline data-points="0.325,-0.6 4.5,0.2" data-type="line" data-label="" points="112.43781094527364,414.72636815920396 577.7114427860696,325.5721393034826" fill="none" stroke="hsl(152, 100%, 50%, 0.8)" stroke-width="1" />
122
+ </g>
123
+ <g>
124
+ <polyline data-points="0.325,-0.8 4.5,-0.2" data-type="line" data-label="" points="112.43781094527364,437.0149253731343 577.7114427860696,370.14925373134326" fill="none" stroke="hsl(0, 100%, 50%, 0.8)" stroke-width="1" />
125
+ </g>
126
+ <g>
127
+ <polyline data-points="0.325,0.8 0.525,0.8 1.9125,0.8 1.9125,1.2 3.3,1.2 3.5,1.2" data-type="line" data-label="" points="112.43781094527364,258.70646766169153 134.726368159204,258.70646766169153 289.35323383084574,258.70646766169153 289.35323383084574,214.12935323383084 443.9800995024875,214.12935323383084 466.2686567164179,214.12935323383084" fill="none" stroke="black" stroke-width="1" />
128
+ </g>
129
+ <g>
130
+ <polyline data-points="0.325,0.6 0.525,0.6 1.9125,0.6 1.9125,0.8 3.3,0.8 3.5,0.8" data-type="line" data-label="" points="112.43781094527364,280.9950248756219 134.726368159204,280.9950248756219 289.35323383084574,280.9950248756219 289.35323383084574,258.70646766169153 443.9800995024875,258.70646766169153 466.2686567164179,258.70646766169153" fill="none" stroke="black" stroke-width="1" />
131
+ </g>
132
+ <g>
133
+ <polyline data-points="0.325,0.4 3.5,0.4" data-type="line" data-label="" points="112.43781094527364,303.2835820895522 466.2686567164179,303.2835820895522" fill="none" stroke="black" stroke-width="1" />
134
+ </g>
135
+ <g>
136
+ <polyline data-points="0.325,0.2 0.525,0.2 1.9125,0.2 1.9125,0 3.3,0 3.5,0" data-type="line" data-label="" points="112.43781094527364,325.5721393034826 134.726368159204,325.5721393034826 289.35323383084574,325.5721393034826 289.35323383084574,347.8606965174129 443.9800995024875,347.8606965174129 466.2686567164179,347.8606965174129" fill="none" stroke="black" stroke-width="1" />
137
+ </g>
138
+ <g>
139
+ <polyline data-points="0.325,0 0.525,0 1.9125,0 1.9125,-0.4 3.3,-0.4 3.5,-0.4" data-type="line" data-label="" points="112.43781094527364,347.8606965174129 134.726368159204,347.8606965174129 289.35323383084574,347.8606965174129 289.35323383084574,392.4378109452736 443.9800995024875,392.4378109452736 466.2686567164179,392.4378109452736" fill="none" stroke="black" stroke-width="1" />
140
+ </g>
141
+ <g>
142
+ <polyline data-points="0.325,-0.8 4.7,-0.8 4.7,-0.2 4.5,-0.2" data-type="line" data-label="" points="112.43781094527364,437.0149253731343 600,437.0149253731343 600,370.14925373134326 577.7114427860696,370.14925373134326" fill="none" stroke="black" stroke-width="1" />
143
+ </g>
144
+ <g>
145
+ <rect data-type="rect" data-label="J2" data-x="0" data-y="0" x="40.00000000000002" y="247.56218905472636" width="72.43781094527361" height="200.59701492537314" fill="hsl(184, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008973214285714286" />
146
+ </g>
147
+ <g>
148
+ <rect data-type="rect" data-label="U1" data-x="4" data-y="0.4" x="466.2686567164179" y="191.8407960199005" width="111.44278606965167" height="222.88557213930346" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008973214285714286" />
149
+ </g>
150
+ <g>
151
+ <rect data-type="rect" data-label="status: chip-collision
152
+ orientation: y+" data-x="0.325" data-y="0.6251" x="101.29353233830847" y="253.12318407960197" width="22.28855721393036" height="50.149253731343265" fill="rgba(220, 0, 0, 0.25)" stroke="black" stroke-width="0.008973214285714286" />
153
+ </g>
154
+ <g>
155
+ <rect data-type="rect" data-label="status: chip-collision
156
+ orientation: y-" data-x="0.325" data-y="0.17490000000000003" x="101.29353233830847" y="303.2947263681592" width="22.28855721393036" height="50.149253731343265" fill="rgba(220, 0, 0, 0.25)" stroke="black" stroke-width="0.008973214285714286" />
157
+ </g>
158
+ <g>
159
+ <rect data-type="rect" data-label="status: trace-collision
160
+ orientation: y+" data-x="1.9125" data-y="0.6251" x="278.2089552238806" y="253.12318407960197" width="22.288557213930403" height="50.149253731343265" fill="rgba(220, 140, 0, 0.25)" stroke="black" stroke-width="0.008973214285714286" />
161
+ </g>
162
+ <g>
163
+ <rect data-type="rect" data-label="status: trace-collision
164
+ orientation: y-" data-x="1.9125" data-y="0.17490000000000003" x="278.2089552238806" y="303.2947263681592" width="22.288557213930403" height="50.149253731343265" fill="rgba(220, 140, 0, 0.25)" stroke="black" stroke-width="0.008973214285714286" />
165
+ </g>
166
+ <g>
167
+ <rect data-type="rect" data-label="status: chip-collision
168
+ orientation: y+" data-x="3.5" data-y="0.6251" x="455.1243781094527" y="253.12318407960197" width="22.288557213930346" height="50.149253731343265" fill="rgba(220, 0, 0, 0.25)" stroke="black" stroke-width="0.008973214285714286" />
169
+ </g>
170
+ <g>
171
+ <rect data-type="rect" data-label="status: chip-collision
172
+ orientation: y-" data-x="3.5" data-y="0.17490000000000003" x="455.1243781094527" y="303.2947263681592" width="22.288557213930346" height="50.149253731343265" fill="rgba(220, 0, 0, 0.25)" stroke="black" stroke-width="0.008973214285714286" />
173
+ </g>
174
+ <g id="crosshair" style="display: none">
175
+ <line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
176
+ <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>
177
+ </g>
178
+ <script>
179
+ <![CDATA[
180
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
181
+ const svg = e.currentTarget;
182
+ const rect = svg.getBoundingClientRect();
183
+ const x = e.clientX - rect.left;
184
+ const y = e.clientY - rect.top;
185
+ const crosshair = svg.getElementById('crosshair');
186
+ const h = svg.getElementById('crosshair-h');
187
+ const v = svg.getElementById('crosshair-v');
188
+ const coords = svg.getElementById('coordinates');
189
+
190
+ crosshair.style.display = 'block';
191
+ h.setAttribute('x1', '0');
192
+ h.setAttribute('x2', '640');
193
+ h.setAttribute('y1', y);
194
+ h.setAttribute('y2', y);
195
+ v.setAttribute('x1', x);
196
+ v.setAttribute('x2', x);
197
+ v.setAttribute('y1', '0');
198
+ v.setAttribute('y2', '640');
199
+
200
+ // Calculate real coordinates using inverse transformation
201
+ const matrix = {
202
+ "a": 111.44278606965173,
203
+ "c": 0,
204
+ "e": 76.21890547263683,
205
+ "b": 0,
206
+ "d": -111.44278606965173,
207
+ "f": 347.8606965174129
208
+ };
209
+ // Manually invert and apply the affine transform
210
+ // Since we only use translate and scale, we can directly compute:
211
+ // x' = (x - tx) / sx
212
+ // y' = (y - ty) / sy
213
+ const sx = matrix.a;
214
+ const sy = matrix.d;
215
+ const tx = matrix.e;
216
+ const ty = matrix.f;
217
+ const realPoint = {
218
+ x: (x - tx) / sx,
219
+ y: (y - ty) / sy // Flip y back since we used negative scale
220
+ }
221
+
222
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
223
+ coords.setAttribute('x', (x + 5).toString());
224
+ coords.setAttribute('y', (y - 5).toString());
225
+ });
226
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
227
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
228
+ });
229
+ ]]>
230
+ </script>
231
+ </svg>
@@ -0,0 +1,119 @@
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="U3.24
5
+ x-" data-x="-7.65" data-y="-0.22999999999999998" cx="325.9574468085108" cy="308.0851063829787" r="3" fill="hsl(74, 100%, 50%, 0.8)" />
6
+ </g>
7
+ <g>
8
+ <circle data-type="point" data-label="U3.25
9
+ x-" data-x="-7.65" data-y="-0.43000000000000016" cx="325.9574468085108" cy="331.9148936170213" r="3" fill="hsl(75, 100%, 50%, 0.8)" />
10
+ </g>
11
+ <g>
12
+ <circle data-type="point" data-label="U3.26
13
+ x-" data-x="-7.65" data-y="-0.6300000000000001" cx="325.9574468085108" cy="355.74468085106383" r="3" fill="hsl(76, 100%, 50%, 0.8)" />
14
+ </g>
15
+ <g>
16
+ <circle data-type="point" data-label="R5.1
17
+ x-" data-x="-10.05" data-y="-0.4299999999999997" cx="40.00000000000023" cy="331.9148936170212" r="3" fill="hsl(110, 100%, 50%, 0.8)" />
18
+ </g>
19
+ <g>
20
+ <circle data-type="point" data-label="R5.2
21
+ x+" data-x="-8.95" data-y="-0.4299999999999997" cx="171.06382978723423" cy="331.9148936170212" r="3" fill="hsl(111, 100%, 50%, 0.8)" />
22
+ </g>
23
+ <g>
24
+ <circle data-type="point" data-label="anchorPoint
25
+ orientation: x-" data-x="-7.65" data-y="-0.22999999999999998" cx="325.9574468085108" cy="308.0851063829787" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
26
+ </g>
27
+ <g>
28
+ <circle data-type="point" data-label="anchorPoint
29
+ orientation: y+" data-x="-8.65" data-y="-0.4299999999999998" cx="206.808510638298" cy="331.9148936170212" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
30
+ </g>
31
+ <g>
32
+ <circle data-type="point" data-label="anchorPoint
33
+ orientation: x-" data-x="-7.65" data-y="-0.6300000000000001" cx="325.9574468085108" cy="355.74468085106383" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
34
+ </g>
35
+ <g>
36
+ <polyline data-points="-7.65,-0.43000000000000016 -8.95,-0.4299999999999997" data-type="line" data-label="" points="325.9574468085108,331.9148936170213 171.06382978723423,331.9148936170212" fill="none" stroke="hsl(80, 100%, 50%, 0.8)" stroke-width="1" />
37
+ </g>
38
+ <g>
39
+ <polyline data-points="-7.65,-0.43000000000000016 -8.95,-0.4299999999999997" data-type="line" data-label="" points="325.9574468085108,331.9148936170213 171.06382978723423,331.9148936170212" fill="none" stroke="hsl(88, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
40
+ </g>
41
+ <g>
42
+ <polyline data-points="-7.65,-0.43000000000000016 -8.95,-0.4299999999999997" data-type="line" data-label="" points="325.9574468085108,331.9148936170213 171.06382978723423,331.9148936170212" fill="none" stroke="purple" stroke-width="1" />
43
+ </g>
44
+ <g>
45
+ <rect data-type="rect" data-label="schematic_component_0" data-x="-6.5" data-y="-0.33" x="325.9574468085108" y="230.63829787234044" width="274.04255319148933" height="178.7234042553191" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008392857142857145" />
46
+ </g>
47
+ <g>
48
+ <rect data-type="rect" data-label="schematic_component_4" data-x="-9.5" data-y="-0.4299999999999997" x="40.00000000000023" y="308.7457455319149" width="131.063829787234" height="46.33829617021263" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008392857142857145" />
49
+ </g>
50
+ <g>
51
+ <rect data-type="rect" data-label="netId: SWCLK
52
+ globalConnNetId: connectivity_net1" data-x="-8.011" data-y="-0.22999999999999998" x="240.0510638297876" y="296.17021276595744" width="85.78723404255311" height="23.829787234042556" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008392857142857145" />
53
+ </g>
54
+ <g>
55
+ <rect data-type="rect" data-label="netId: SWD
56
+ globalConnNetId: connectivity_net0" data-x="-8.65" data-y="-0.18989999999999985" x="178.2127659574469" y="274.7114893617021" width="57.191489361702224" height="57.19148936170211" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008392857142857145" />
57
+ </g>
58
+ <g>
59
+ <rect data-type="rect" data-label="netId: CLK
60
+ globalConnNetId: connectivity_net2" data-x="-8.011" data-y="-0.6300000000000001" x="240.0510638297876" y="343.82978723404256" width="85.78723404255311" height="23.829787234042556" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008392857142857145" />
61
+ </g>
62
+ <g id="crosshair" style="display: none">
63
+ <line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
64
+ <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>
65
+ </g>
66
+ <script>
67
+ <![CDATA[
68
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
69
+ const svg = e.currentTarget;
70
+ const rect = svg.getBoundingClientRect();
71
+ const x = e.clientX - rect.left;
72
+ const y = e.clientY - rect.top;
73
+ const crosshair = svg.getElementById('crosshair');
74
+ const h = svg.getElementById('crosshair-h');
75
+ const v = svg.getElementById('crosshair-v');
76
+ const coords = svg.getElementById('coordinates');
77
+
78
+ crosshair.style.display = 'block';
79
+ h.setAttribute('x1', '0');
80
+ h.setAttribute('x2', '640');
81
+ h.setAttribute('y1', y);
82
+ h.setAttribute('y2', y);
83
+ v.setAttribute('x1', x);
84
+ v.setAttribute('x2', x);
85
+ v.setAttribute('y1', '0');
86
+ v.setAttribute('y2', '640');
87
+
88
+ // Calculate real coordinates using inverse transformation
89
+ const matrix = {
90
+ "a": 119.14893617021274,
91
+ "c": 0,
92
+ "e": 1237.4468085106382,
93
+ "b": 0,
94
+ "d": -119.14893617021274,
95
+ "f": 280.6808510638298
96
+ };
97
+ // Manually invert and apply the affine transform
98
+ // Since we only use translate and scale, we can directly compute:
99
+ // x' = (x - tx) / sx
100
+ // y' = (y - ty) / sy
101
+ const sx = matrix.a;
102
+ const sy = matrix.d;
103
+ const tx = matrix.e;
104
+ const ty = matrix.f;
105
+ const realPoint = {
106
+ x: (x - tx) / sx,
107
+ y: (y - ty) / sy // Flip y back since we used negative scale
108
+ }
109
+
110
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
111
+ coords.setAttribute('x', (x + 5).toString());
112
+ coords.setAttribute('y', (y - 5).toString());
113
+ });
114
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
115
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
116
+ });
117
+ ]]>
118
+ </script>
119
+ </svg>
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example39.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example38", () => {
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/example40.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example40", () => {
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/example41.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example41", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })