circuit-to-svg 0.0.297 → 0.0.298

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
@@ -2751,7 +2751,6 @@ var CHAR_WIDTH = 1;
2751
2751
  var CHAR_SPACING = 0.2;
2752
2752
  var LINE_HEIGHT = 1.4;
2753
2753
  var FONT_SCALE = 0.53;
2754
- var BASELINE_Y = 0.241;
2755
2754
  function linesToPathData(lines, offsetX, offsetY, charScale, baselineAdjust = 0) {
2756
2755
  return lines.map((line) => {
2757
2756
  const x1 = offsetX + line.x1 * charScale;
@@ -2772,9 +2771,7 @@ function textToAlphabetPath(text, fontSize) {
2772
2771
  }
2773
2772
  const lines = lineAlphabet[char];
2774
2773
  if (lines) {
2775
- const isLowercase = char >= "a" && char <= "z";
2776
- const baselineAdjust = isLowercase ? BASELINE_Y : 0;
2777
- paths.push(linesToPathData(lines, x, 0, fontSize, baselineAdjust));
2774
+ paths.push(linesToPathData(lines, x, 0, fontSize));
2778
2775
  }
2779
2776
  x += charAdvance;
2780
2777
  }
@@ -2807,9 +2804,7 @@ function textToCenteredAlphabetPaths(text, fontSize) {
2807
2804
  }
2808
2805
  const charLines = lineAlphabet[char];
2809
2806
  if (charLines) {
2810
- const isLowercase = char >= "a" && char <= "z";
2811
- const baselineAdjust = isLowercase ? BASELINE_Y : 0;
2812
- paths.push(linesToPathData(charLines, x, y, fontSize, baselineAdjust));
2807
+ paths.push(linesToPathData(charLines, x, y, fontSize));
2813
2808
  }
2814
2809
  x += charAdvance;
2815
2810
  }
@@ -5621,7 +5616,7 @@ function getSoftwareUsedString(circuitJson) {
5621
5616
  var package_default = {
5622
5617
  name: "circuit-to-svg",
5623
5618
  type: "module",
5624
- version: "0.0.296",
5619
+ version: "0.0.297",
5625
5620
  description: "Convert Circuit JSON to SVG",
5626
5621
  main: "dist/index.js",
5627
5622
  files: [
@@ -5639,19 +5634,19 @@ var package_default = {
5639
5634
  license: "ISC",
5640
5635
  devDependencies: {
5641
5636
  "@biomejs/biome": "^1.9.4",
5642
- "@tscircuit/alphabet": "^0.0.8",
5637
+ "@tscircuit/alphabet": "^0.0.9",
5643
5638
  "@types/bun": "^1.2.8",
5644
5639
  "@vitejs/plugin-react": "5.0.0",
5645
5640
  biome: "^0.3.3",
5646
5641
  "bun-match-svg": "^0.0.12",
5647
- "circuit-json": "^0.0.333",
5642
+ "circuit-json": "^0.0.335",
5648
5643
  esbuild: "^0.20.2",
5649
5644
  "performance-now": "^2.1.0",
5650
5645
  react: "19.1.0",
5651
5646
  "react-cosmos": "7.0.0",
5652
5647
  "react-cosmos-plugin-vite": "7.0.0",
5653
5648
  "react-dom": "19.1.0",
5654
- tscircuit: "^0.0.1018",
5649
+ tscircuit: "^0.0.1059",
5655
5650
  tsup: "^8.0.2",
5656
5651
  typescript: "^5.4.5",
5657
5652
  "vite-tsconfig-paths": "^5.0.1"