@tscircuit/schematic-trace-solver 0.0.127 → 0.0.128

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.
package/dist/index.js CHANGED
@@ -12106,7 +12106,9 @@ orientation: ${label.orientation}`
12106
12106
  text: inlineLabel.netId ?? "",
12107
12107
  color: "green",
12108
12108
  fontSize: inlineLabel.height,
12109
- anchorSide: "center"
12109
+ anchorSide: "center",
12110
+ // Vertical labels read bottom-to-top, alongside the wire they name.
12111
+ rotation: inlineLabel.axis === "y" ? 90 : void 0
12110
12112
  });
12111
12113
  graphics.points.push({
12112
12114
  x: inlineLabel.anchorPoint.x,
@@ -344,6 +344,8 @@ export class InlineNetLabelSolver extends BaseSolver {
344
344
  color: "green",
345
345
  fontSize: inlineLabel.height,
346
346
  anchorSide: "center",
347
+ // Vertical labels read bottom-to-top, alongside the wire they name.
348
+ rotation: inlineLabel.axis === "y" ? 90 : undefined,
347
349
  })
348
350
  graphics.points.push({
349
351
  x: inlineLabel.anchorPoint.x,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/schematic-trace-solver",
3
3
  "main": "dist/index.js",
4
- "version": "0.0.127",
4
+ "version": "0.0.128",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "start": "cosmos",
@@ -19,7 +19,7 @@
19
19
  "calculate-elbow": "^0.0.12",
20
20
  "connectivity-map": "^1.0.0",
21
21
  "flatbush": "^4.5.0",
22
- "graphics-debug": "^0.0.96",
22
+ "graphics-debug": "^0.0.98",
23
23
  "react": "^19.1.1",
24
24
  "react-cosmos": "^7.0.0",
25
25
  "react-cosmos-plugin-vite": "^7.0.0",
@@ -1,14 +1,14 @@
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.5,0 2.5,0" data-type="line" data-label="" points="215.29056603773586,71.69811320754715 426.611320754717,71.69811320754715" fill="none" stroke="hsl(48, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0,-2.5 0,-4" data-type="line" data-label="" points="162.46037735849058,335.84905660377353 162.46037735849058,494.33962264150944" fill="none" stroke="hsl(136, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.5,0 2.5,0" data-type="line" data-label="" points="215.29056603773586,71.69811320754715 426.611320754717,71.69811320754715" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0,-2.5 0,-4" data-type="line" data-label="" points="162.46037735849058,335.84905660377353 162.46037735849058,494.33962264150944" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="U1" data-x="0" data-y="0" x="109.6301886792453" y="39.999999999999986" width="105.66037735849056" height="63.39622641509433" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="U2" data-x="3" data-y="0" x="426.611320754717" y="39.999999999999986" width="105.66037735849056" height="63.39622641509433" fill="hsl(165, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="U3" data-x="0" data-y="-2" x="130.7622641509434" y="230.18867924528303" width="63.39622641509436" height="105.66037735849054" fill="hsl(166, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="U4" data-x="0" data-y="-4.5" x="130.7622641509434" y="494.3396226415094" width="63.39622641509436" height="105.66037735849056" fill="hsl(167, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="INLINE netId: USER_LED_ANODE
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.5,0 2.5,0" data-type="line" data-label="" points="214.33962264150944,71.69811320754715 425.66037735849056,71.69811320754715" fill="none" stroke="hsl(48, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0,-2.5 0,-4" data-type="line" data-label="" points="161.50943396226415,335.84905660377353 161.50943396226415,494.33962264150944" fill="none" stroke="hsl(136, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.5,0 2.5,0" data-type="line" data-label="" points="214.33962264150944,71.69811320754715 425.66037735849056,71.69811320754715" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0,-2.5 0,-4" data-type="line" data-label="" points="161.50943396226415,335.84905660377353 161.50943396226415,494.33962264150944" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="U1" data-x="0" data-y="0" x="108.67924528301887" y="39.999999999999986" width="105.66037735849056" height="63.39622641509433" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="U2" data-x="3" data-y="0" x="425.66037735849056" y="39.999999999999986" width="105.66037735849056" height="63.39622641509433" fill="hsl(165, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="U3" data-x="0" data-y="-2" x="129.81132075471697" y="230.18867924528303" width="63.39622641509436" height="105.66037735849054" fill="hsl(166, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="U4" data-x="0" data-y="-4.5" x="129.81132075471697" y="494.3396226415094" width="63.39622641509436" height="105.66037735849056" fill="hsl(167, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="INLINE netId: USER_LED_ANODE
2
2
  axis: x
3
- side: y+" data-x="1.5" data-y="0.14" x="225.85660377358494" y="47.39622641509432" width="190.18867924528297" height="19.01886792452831" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="INLINE netId: SPI_SCK
3
+ side: y+" data-x="1.5" data-y="0.14" x="224.90566037735852" y="47.39622641509432" width="190.18867924528297" height="19.01886792452831" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="INLINE netId: SPI_SCK
4
4
  axis: y
5
- side: x-" data-x="-0.14" data-y="-3.25" x="138.15849056603776" y="364.3773584905661" width="19.01886792452828" height="101.43396226415086" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.009464285714285715"/></g><text data-type="text" data-label="USER_LED_ANODE" data-x="1.5" data-y="0.14" x="320.9509433962264" y="56.90566037735847" fill="green" font-size="19.0188679245283" font-family="sans-serif" text-anchor="middle" dominant-baseline="central">USER_LED_ANODE</text><text data-type="text" data-label="SPI_SCK" data-x="-0.14" data-y="-3.25" x="147.6679245283019" y="415.09433962264154" fill="green" font-size="19.0188679245283" font-family="sans-serif" text-anchor="middle" dominant-baseline="central">SPI_SCK</text><g><circle data-type="point" data-label="U1.1
6
- x+" data-x="0.5" data-y="0" cx="215.29056603773586" cy="71.69811320754715" r="3" fill="hsl(319, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U2.1
7
- x-" data-x="2.5" data-y="0" cx="426.611320754717" cy="71.69811320754715" r="3" fill="hsl(200, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U3.1
8
- y-" data-x="0" data-y="-2.5" cx="162.46037735849058" cy="335.84905660377353" r="3" fill="hsl(81, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U4.1
9
- y+" data-x="0" data-y="-4" cx="162.46037735849058" cy="494.33962264150944" r="3" fill="hsl(322, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="inline anchor
10
- USER_LED_ANODE" data-x="1.5" data-y="0" cx="320.9509433962264" cy="71.69811320754715" r="3" fill="green"/></g><g><circle data-type="point" data-label="inline anchor
11
- SPI_SCK" data-x="0" data-y="-3.25" cx="162.46037735849058" cy="415.09433962264154" r="3" fill="green"/></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[
5
+ side: x-" data-x="-0.14" data-y="-3.25" x="137.20754716981133" y="364.3773584905661" width="19.01886792452828" height="101.43396226415086" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.009464285714285715"/></g><text data-type="text" data-label="USER_LED_ANODE" data-x="1.5" data-y="0.14" x="320" y="56.90566037735847" fill="green" font-size="19.0188679245283" font-family="sans-serif" text-anchor="middle" dominant-baseline="central">USER_LED_ANODE</text><text data-type="text" data-label="SPI_SCK" data-x="-0.14" data-y="-3.25" x="146.7169811320755" y="415.09433962264154" fill="green" font-size="19.0188679245283" font-family="sans-serif" text-anchor="middle" dominant-baseline="central" transform="rotate(-90, 146.7169811320755, 415.09433962264154)">SPI_SCK</text><g><circle data-type="point" data-label="U1.1
6
+ x+" data-x="0.5" data-y="0" cx="214.33962264150944" cy="71.69811320754715" r="3" fill="hsl(319, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U2.1
7
+ x-" data-x="2.5" data-y="0" cx="425.66037735849056" cy="71.69811320754715" r="3" fill="hsl(200, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U3.1
8
+ y-" data-x="0" data-y="-2.5" cx="161.50943396226415" cy="335.84905660377353" r="3" fill="hsl(81, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U4.1
9
+ y+" data-x="0" data-y="-4" cx="161.50943396226415" cy="494.33962264150944" r="3" fill="hsl(322, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="inline anchor
10
+ USER_LED_ANODE" data-x="1.5" data-y="0" cx="320" cy="71.69811320754715" r="3" fill="green"/></g><g><circle data-type="point" data-label="inline anchor
11
+ SPI_SCK" data-x="0" data-y="-3.25" cx="161.50943396226415" cy="415.09433962264154" r="3" fill="green"/></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[
12
12
  document.currentScript.parentElement.addEventListener('mousemove', (e) => {
13
13
  const svg = e.currentTarget;
14
14
  const rect = svg.getBoundingClientRect();
@@ -30,7 +30,7 @@ SPI_SCK" data-x="0" data-y="-3.25" cx="162.46037735849058" cy="415.0943396226415
30
30
  v.setAttribute('y2', '640');
31
31
 
32
32
  // Calculate real coordinates using inverse transformation
33
- const matrix = {"a":105.66037735849056,"c":0,"e":162.46037735849058,"b":0,"d":-105.66037735849056,"f":71.69811320754715};
33
+ const matrix = {"a":105.66037735849056,"c":0,"e":161.50943396226415,"b":0,"d":-105.66037735849056,"f":71.69811320754715};
34
34
  // Manually invert and apply the affine transform
35
35
  // Since we only use translate and scale, we can directly compute:
36
36
  // x' = (x - tx) / sx