@tscircuit/schematic-trace-solver 0.0.141 → 0.0.142

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,52 @@
1
+ <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="0.775,0.1 0.775,-0.3" data-type="line" data-label="" points="328.33333333333337,305 328.33333333333337,371.6666666666667" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="0.775,0.1 0.775,-0.7" data-type="line" data-label="" points="328.33333333333337,305 328.33333333333337,438.33333333333337" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="0.775,0.1 0.775,-1.1" data-type="line" data-label="" points="328.33333333333337,305 328.33333333333337,505" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="0.775,-0.3 0.775,-0.7" data-type="line" data-label="" points="328.33333333333337,371.6666666666667 328.33333333333337,438.33333333333337" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="0.775,-0.3 0.775,-1.1" data-type="line" data-label="" points="328.33333333333337,371.6666666666667 328.33333333333337,505" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="0.775,-0.7 0.775,-1.1" data-type="line" data-label="" points="328.33333333333337,438.33333333333337 328.33333333333337,505" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="0.775,-0.3 0.9750000000000001,-0.3 0.9750000000000001,0.1 0.775,0.1" data-type="line" data-label="" points="328.33333333333337,371.6666666666667 361.6666666666667,371.6666666666667 361.6666666666667,305 328.33333333333337,305" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.775,-0.7 0.9750000000000001,-0.7 0.9750000000000001,-0.3 0.775,-0.3" data-type="line" data-label="" points="328.33333333333337,438.33333333333337 361.6666666666667,438.33333333333337 361.6666666666667,371.6666666666667 328.33333333333337,371.6666666666667" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.775,-1.1 1.685,-1.1 1.685,-0.7 0.775,-0.7" data-type="line" data-label="" points="328.33333333333337,505 480,505 480,438.33333333333337 328.33333333333337,438.33333333333337" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="J4" data-x="0" data-y="0" x="70" y="80" width="258.33333333333337" height="483.33333333333337" fill="hsl(186, 100%, 50%, 0.8)" stroke="black" stroke-width="0.006"/></g><g><rect data-type="rect" data-label="09452812800" data-x="0.285" data-y="-1.58" x="136.66666666666669" y="570" width="220" height="30" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.006"/></g><g><rect data-type="rect" data-label="J4" data-x="-0.255" data-y="1.565" x="126.66666666666669" y="40.00000000000004" width="60" height="41.66666666666666" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.006"/></g><g><rect data-type="rect" data-label="netId: NET_AGND
2
+ globalConnNetId: connectivity_net0" data-x="1.685" data-y="-1.31" x="390" y="505" width="180" height="70" fill="#00000066" stroke="#000000" stroke-width="0.006"/></g><g><circle data-type="point" data-label="J4.1
3
+ x+" data-x="0.775" data-y="1.1" cx="328.33333333333337" cy="138.33333333333334" r="3" fill="hsl(221, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J4.2
4
+ x+" data-x="0.775" data-y="0.7" cx="328.33333333333337" cy="205.00000000000003" r="3" fill="hsl(222, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J4.3
5
+ x+" data-x="0.775" data-y="0.1" cx="328.33333333333337" cy="305" r="3" fill="hsl(223, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J4.4
6
+ x+" data-x="0.775" data-y="-0.3" cx="328.33333333333337" cy="371.6666666666667" r="3" fill="hsl(224, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J4.5
7
+ x+" data-x="0.775" data-y="-0.7" cx="328.33333333333337" cy="438.33333333333337" r="3" fill="hsl(225, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J4.6
8
+ x+" data-x="0.775" data-y="-1.1" cx="328.33333333333337" cy="505" r="3" fill="hsl(226, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
9
+ orientation: y-" data-x="1.685" data-y="-1.1" cx="480" cy="505" 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[
10
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
11
+ const svg = e.currentTarget;
12
+ const rect = svg.getBoundingClientRect();
13
+ const x = e.clientX - rect.left;
14
+ const y = e.clientY - rect.top;
15
+ const crosshair = svg.getElementById('crosshair');
16
+ const h = svg.getElementById('crosshair-h');
17
+ const v = svg.getElementById('crosshair-v');
18
+ const coords = svg.getElementById('coordinates');
19
+
20
+ crosshair.style.display = 'block';
21
+ h.setAttribute('x1', '0');
22
+ h.setAttribute('x2', '640');
23
+ h.setAttribute('y1', y);
24
+ h.setAttribute('y2', y);
25
+ v.setAttribute('x1', x);
26
+ v.setAttribute('x2', x);
27
+ v.setAttribute('y1', '0');
28
+ v.setAttribute('y2', '640');
29
+
30
+ // Calculate real coordinates using inverse transformation
31
+ const matrix = {"a":166.66666666666666,"c":0,"e":199.16666666666669,"b":0,"d":-166.66666666666666,"f":321.6666666666667};
32
+ // Manually invert and apply the affine transform
33
+ // Since we only use translate and scale, we can directly compute:
34
+ // x' = (x - tx) / sx
35
+ // y' = (y - ty) / sy
36
+ const sx = matrix.a;
37
+ const sy = matrix.d;
38
+ const tx = matrix.e;
39
+ const ty = matrix.f;
40
+ const realPoint = {
41
+ x: (x - tx) / sx,
42
+ y: (y - ty) / sy // Flip y back since we used negative scale
43
+ }
44
+
45
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
46
+ coords.setAttribute('x', (x + 5).toString());
47
+ coords.setAttribute('y', (y - 5).toString());
48
+ });
49
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
50
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
51
+ });
52
+ ]]></script></svg>