wyreframe 0.7.10 → 0.7.11

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.10",
3
+ "version": "0.7.11",
4
4
  "description": "ASCII wireframe + interaction DSL to HTML converter with scene transitions",
5
5
  "author": "wickedev",
6
6
  "repository": {
@@ -49,13 +49,13 @@ let defaultStyles = `
49
49
  .wf-section-header { background:#fff; padding:4px 8px; font-size:12px; color:#666; border-bottom:1px solid #333; }
50
50
  .wf-section-content { padding:8px; }
51
51
  .wf-checkbox { display:flex; align-items:center; gap:8px; margin:4px 0; cursor:pointer; }
52
- .align-center { text-align:center; }
53
- .align-right { text-align:right; }
54
- .wf-row.align-center { justify-content:center; }
55
- .wf-row.align-right { justify-content:flex-end; }
56
- .wf-row.distribute { justify-content:space-between; }
57
- .wf-button.align-center, .wf-link.align-center { margin-left:auto; margin-right:auto; }
58
- .wf-button.align-right, .wf-link.align-right { margin-left:auto; margin-right:0; }
52
+ .wf-align-center { text-align:center; }
53
+ .wf-align-right { text-align:right; }
54
+ .wf-row.wf-align-center { justify-content:center; }
55
+ .wf-row.wf-align-right { justify-content:flex-end; }
56
+ .wf-row.wf-distribute { justify-content:space-evenly; }
57
+ .wf-button.wf-align-center, .wf-link.wf-align-center { margin-left:auto; margin-right:auto; }
58
+ .wf-button.wf-align-right, .wf-link.wf-align-right { margin-left:auto; margin-right:0; }
59
59
  `;
60
60
 
61
61
  function isInputOnlyBox(elem) {
@@ -90,9 +90,9 @@ function alignmentToClass(align) {
90
90
  case "Left" :
91
91
  return;
92
92
  case "Center" :
93
- return "align-center";
93
+ return "wf-align-center";
94
94
  case "Right" :
95
- return "align-right";
95
+ return "wf-align-right";
96
96
  }
97
97
  }
98
98
 
@@ -300,7 +300,7 @@ function renderElement(_elem, onAction, onDeadEnd) {
300
300
  let row = document.createElement("div");
301
301
  row.className = "wf-row";
302
302
  if (hasDistributedChildren(children)) {
303
- row.classList.add("distribute");
303
+ row.classList.add("wf-distribute");
304
304
  } else {
305
305
  applyAlignment(row, elem.align);
306
306
  }
@@ -160,13 +160,13 @@ let defaultStyles = `
160
160
  .wf-section-header { background:#fff; padding:4px 8px; font-size:12px; color:#666; border-bottom:1px solid #333; }
161
161
  .wf-section-content { padding:8px; }
162
162
  .wf-checkbox { display:flex; align-items:center; gap:8px; margin:4px 0; cursor:pointer; }
163
- .align-center { text-align:center; }
164
- .align-right { text-align:right; }
165
- .wf-row.align-center { justify-content:center; }
166
- .wf-row.align-right { justify-content:flex-end; }
167
- .wf-row.distribute { justify-content:space-between; }
168
- .wf-button.align-center, .wf-link.align-center { margin-left:auto; margin-right:auto; }
169
- .wf-button.align-right, .wf-link.align-right { margin-left:auto; margin-right:0; }
163
+ .wf-align-center { text-align:center; }
164
+ .wf-align-right { text-align:right; }
165
+ .wf-row.wf-align-center { justify-content:center; }
166
+ .wf-row.wf-align-right { justify-content:flex-end; }
167
+ .wf-row.wf-distribute { justify-content:space-evenly; }
168
+ .wf-button.wf-align-center, .wf-link.wf-align-center { margin-left:auto; margin-right:auto; }
169
+ .wf-button.wf-align-right, .wf-link.wf-align-right { margin-left:auto; margin-right:0; }
170
170
  `
171
171
 
172
172
  // ============================================================================
@@ -200,8 +200,8 @@ let getInputsFromBox = (elem: element): array<element> => {
200
200
  let alignmentToClass = (align: alignment): option<string> => {
201
201
  switch align {
202
202
  | Left => None
203
- | Center => Some("align-center")
204
- | Right => Some("align-right")
203
+ | Center => Some("wf-align-center")
204
+ | Right => Some("wf-align-right")
205
205
  }
206
206
  }
207
207
 
@@ -500,9 +500,9 @@ let rec renderElement = (
500
500
  let row = DomBindings.document->DomBindings.createElement("div")
501
501
  row->DomBindings.setClassName("wf-row")
502
502
 
503
- // Issue #23: Use space-between distribution for rows with distributed alignments
503
+ // Issue #23: Use space-evenly distribution for rows with distributed alignments
504
504
  if hasDistributedChildren(children) {
505
- row->DomBindings.classList->DomBindings.add("distribute")
505
+ row->DomBindings.classList->DomBindings.add("wf-distribute")
506
506
  } else {
507
507
  applyAlignment(row, align)
508
508
  }