wyreframe 0.7.4 → 0.7.5

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.4",
3
+ "version": "0.7.5",
4
4
  "description": "ASCII wireframe + interaction DSL to HTML converter with scene transitions",
5
5
  "author": "wickedev",
6
6
  "repository": {
@@ -642,6 +642,17 @@ function parseContentLine(line, lineIndex, contentStartRow, box, registry) {
642
642
  if (trimmed === "") {
643
643
  let row = contentStartRow + lineIndex | 0;
644
644
  let baseCol = box.bounds.left + 1 | 0;
645
+ let rowWithinChildBox = box.children.some(child => {
646
+ let b = child.bounds;
647
+ if (row >= b.top) {
648
+ return row <= b.bottom;
649
+ } else {
650
+ return false;
651
+ }
652
+ });
653
+ if (rowWithinChildBox) {
654
+ return;
655
+ }
645
656
  let position = Types.Position.make(row, baseCol);
646
657
  return {
647
658
  TAG: "Spacer",
@@ -1083,11 +1083,25 @@ let parseContentLine = (
1083
1083
  let trimmed = line->String.trim
1084
1084
 
1085
1085
  // Issue #16: Preserve empty lines as Spacer elements for vertical spacing
1086
+ // Issue #19: But don't create Spacers for rows that are within child box bounds
1086
1087
  if trimmed === "" {
1087
1088
  let row = contentStartRow + lineIndex
1088
1089
  let baseCol = box.bounds.left + 1
1089
- let position = Position.make(row, baseCol)
1090
- Some(Spacer({position: position}))
1090
+
1091
+ // Check if this row is within any child box's vertical bounds
1092
+ // If so, skip creating a Spacer (Issue #19: incorrect spacer count)
1093
+ let rowWithinChildBox = box.children->Array.some(child => {
1094
+ let b = child.bounds
1095
+ row >= b.top && row <= b.bottom
1096
+ })
1097
+
1098
+ if rowWithinChildBox {
1099
+ // Skip spacer for rows occupied by child boxes
1100
+ None
1101
+ } else {
1102
+ let position = Position.make(row, baseCol)
1103
+ Some(Spacer({position: position}))
1104
+ }
1091
1105
  } else if isNoiseText(trimmed) {
1092
1106
  // Filter out border/noise text - don't create any element
1093
1107
  None