wyreframe 0.7.7 → 0.7.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wyreframe",
3
- "version": "0.7.7",
3
+ "version": "0.7.8",
4
4
  "description": "ASCII wireframe + interaction DSL to HTML converter with scene transitions",
5
5
  "author": "wickedev",
6
6
  "repository": {
@@ -19,7 +19,7 @@ function calculate(content, position, boxBounds) {
19
19
  return "Left";
20
20
  } else if (rightRatio < 0.2 && leftRatio > 0.3) {
21
21
  return "Right";
22
- } else if (Math.abs(leftRatio - rightRatio) < 0.15) {
22
+ } else if (Math.abs(leftRatio - rightRatio) < 0.2) {
23
23
  return "Center";
24
24
  } else {
25
25
  return "Left";
@@ -52,9 +52,11 @@ let calculate = (
52
52
  let rightRatio = Int.toFloat(rightSpace) /. Int.toFloat(boxWidth)
53
53
 
54
54
  // Thresholds for alignment detection
55
+ // Note: centerTolerance increased from 0.15 to 0.2 to be more lenient
56
+ // This fixes issue #22 where visually centered buttons were detected as Left
55
57
  let leftThreshold = 0.2
56
58
  let rightThreshold = 0.2
57
- let centerTolerance = 0.15
59
+ let centerTolerance = 0.2
58
60
 
59
61
  // Apply alignment rules
60
62
  if leftRatio < leftThreshold && rightRatio > 0.3 {