Commit 7db21ad
committed
feat(tui): add comprehensive terminal UI property support
Add extensive TUI styling, layout, and positioning capabilities using iocraft native bindings.
**TypeScript Interface Enhancements:**
- Text styling: TextWeight, TextAlign, TextWrap types with JSDoc
- Layout: DisplayType, PositionType, OverflowType types
- Border: BorderEdges interface for selective rendering
- BoxProps: 17 new properties (display, position, inset, size constraints, alignContent, overflow, borderEdges, rowGap, columnGap)
- TextProps: align, wrap properties for text layout control
- Comprehensive JSDoc documentation with usage examples
**Property Mappings:**
- Text(): align, weight, wrap, dimColor, strikethrough
- Box(): all 17 new layout properties with snake_case conversion
- Overflow shorthand handling (sets both X and Y)
- BorderEdges object mapping to border_edges
**Test Coverage (54 new tests):**
- Text properties: weight, dimColor, strikethrough, align, wrap (11 tests)
- Flex layout: flexBasis, flexWrap, alignContent, rowGap, columnGap (8 tests)
- Overflow: overflow, overflowX, overflowY with shorthand (6 tests)
- Positioning: display, position, top/right/bottom/left, inset (10 tests)
- Dimensions: minWidth, maxWidth, minHeight, maxHeight (6 tests)
- Border edges: selective rendering configurations (3 tests)
- Complex scenarios: nested layouts, absolute positioning, styled text (5 tests)
- Integration: renderToString validation (5 tests)
All 60 tests passing (54 new + 6 existing renderer tests).
**Documentation:**
- CHANGELOG updated with all new features
- JSDoc examples for every property type
- Property-level comments on all interfaces
**Binary Updates:**
- Templates updated with new type definitions
- Loader enhanced with pnpm virtual store compatibility
Enables sophisticated terminal interfaces with professional styling, responsive layouts, absolute positioning, dimension constraints, and fine-grained overflow control.1 parent d0e103a commit 7db21ad
File tree
23 files changed
+1373
-353
lines changed- packages
- cli
- src
- commands
- analytics
- audit-log
- threat-feed
- external
- utils/terminal
- test/unit
- commands
- analytics
- __snapshots__
- audit-log
- __snapshots__
- threat-feed
- __snapshots__
- utils/terminal
- package-builder/templates/socketaddon-main
23 files changed
+1373
-353
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
9 | 21 | | |
10 | 22 | | |
11 | 23 | | |
| |||
Lines changed: 38 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
16 | | - | |
17 | 20 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
22 | 42 | | |
23 | 43 | | |
24 | 44 | | |
25 | 45 | | |
26 | 46 | | |
27 | | - | |
| 47 | + | |
28 | 48 | | |
29 | 49 | | |
30 | 50 | | |
| |||
38 | 58 | | |
39 | 59 | | |
40 | 60 | | |
41 | | - | |
| 61 | + | |
42 | 62 | | |
43 | 63 | | |
44 | 64 | | |
| |||
59 | 79 | | |
60 | 80 | | |
61 | 81 | | |
62 | | - | |
| 82 | + | |
63 | 83 | | |
64 | 84 | | |
65 | 85 | | |
| |||
80 | 100 | | |
81 | 101 | | |
82 | 102 | | |
83 | | - | |
| 103 | + | |
84 | 104 | | |
85 | 105 | | |
86 | 106 | | |
| |||
95 | 115 | | |
96 | 116 | | |
97 | 117 | | |
98 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
99 | 127 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 123 | + | |
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
| |||
Lines changed: 0 additions & 50 deletions
This file was deleted.
Lines changed: 39 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
58 | 63 | | |
59 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
60 | 67 | | |
61 | 68 | | |
62 | 69 | | |
| |||
91 | 98 | | |
92 | 99 | | |
93 | 100 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
98 | 105 | | |
99 | 106 | | |
100 | 107 | | |
| |||
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
126 | | - | |
| 133 | + | |
127 | 134 | | |
128 | 135 | | |
129 | 136 | | |
| |||
136 | 143 | | |
137 | 144 | | |
138 | 145 | | |
139 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
140 | 160 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
175 | | - | |
| 176 | + | |
176 | 177 | | |
177 | 178 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 179 | + | |
183 | 180 | | |
184 | 181 | | |
185 | 182 | | |
| |||
Lines changed: 0 additions & 60 deletions
This file was deleted.
0 commit comments