@dealdeploy/skl 0.1.7 → 0.1.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.
Files changed (57) hide show
  1. package/.agents/skills/opentui/SKILL.md +198 -0
  2. package/.agents/skills/opentui/references/animation/REFERENCE.md +431 -0
  3. package/.agents/skills/opentui/references/components/REFERENCE.md +143 -0
  4. package/.agents/skills/opentui/references/components/code-diff.md +496 -0
  5. package/.agents/skills/opentui/references/components/containers.md +412 -0
  6. package/.agents/skills/opentui/references/components/inputs.md +531 -0
  7. package/.agents/skills/opentui/references/components/text-display.md +384 -0
  8. package/.agents/skills/opentui/references/core/REFERENCE.md +145 -0
  9. package/.agents/skills/opentui/references/core/api.md +506 -0
  10. package/.agents/skills/opentui/references/core/configuration.md +166 -0
  11. package/.agents/skills/opentui/references/core/gotchas.md +393 -0
  12. package/.agents/skills/opentui/references/core/patterns.md +448 -0
  13. package/.agents/skills/opentui/references/keyboard/REFERENCE.md +511 -0
  14. package/.agents/skills/opentui/references/layout/REFERENCE.md +337 -0
  15. package/.agents/skills/opentui/references/layout/patterns.md +444 -0
  16. package/.agents/skills/opentui/references/react/REFERENCE.md +174 -0
  17. package/.agents/skills/opentui/references/react/api.md +435 -0
  18. package/.agents/skills/opentui/references/react/configuration.md +301 -0
  19. package/.agents/skills/opentui/references/react/gotchas.md +443 -0
  20. package/.agents/skills/opentui/references/react/patterns.md +501 -0
  21. package/.agents/skills/opentui/references/solid/REFERENCE.md +201 -0
  22. package/.agents/skills/opentui/references/solid/api.md +543 -0
  23. package/.agents/skills/opentui/references/solid/configuration.md +315 -0
  24. package/.agents/skills/opentui/references/solid/gotchas.md +415 -0
  25. package/.agents/skills/opentui/references/solid/patterns.md +558 -0
  26. package/.agents/skills/opentui/references/testing/REFERENCE.md +614 -0
  27. package/.claude/settings.local.json +11 -0
  28. package/.claude/skills/opentui/SKILL.md +198 -0
  29. package/.claude/skills/opentui/references/animation/REFERENCE.md +431 -0
  30. package/.claude/skills/opentui/references/components/REFERENCE.md +143 -0
  31. package/.claude/skills/opentui/references/components/code-diff.md +496 -0
  32. package/.claude/skills/opentui/references/components/containers.md +412 -0
  33. package/.claude/skills/opentui/references/components/inputs.md +531 -0
  34. package/.claude/skills/opentui/references/components/text-display.md +384 -0
  35. package/.claude/skills/opentui/references/core/REFERENCE.md +145 -0
  36. package/.claude/skills/opentui/references/core/api.md +506 -0
  37. package/.claude/skills/opentui/references/core/configuration.md +166 -0
  38. package/.claude/skills/opentui/references/core/gotchas.md +393 -0
  39. package/.claude/skills/opentui/references/core/patterns.md +448 -0
  40. package/.claude/skills/opentui/references/keyboard/REFERENCE.md +511 -0
  41. package/.claude/skills/opentui/references/layout/REFERENCE.md +337 -0
  42. package/.claude/skills/opentui/references/layout/patterns.md +444 -0
  43. package/.claude/skills/opentui/references/react/REFERENCE.md +174 -0
  44. package/.claude/skills/opentui/references/react/api.md +435 -0
  45. package/.claude/skills/opentui/references/react/configuration.md +301 -0
  46. package/.claude/skills/opentui/references/react/gotchas.md +443 -0
  47. package/.claude/skills/opentui/references/react/patterns.md +501 -0
  48. package/.claude/skills/opentui/references/solid/REFERENCE.md +201 -0
  49. package/.claude/skills/opentui/references/solid/api.md +543 -0
  50. package/.claude/skills/opentui/references/solid/configuration.md +315 -0
  51. package/.claude/skills/opentui/references/solid/gotchas.md +415 -0
  52. package/.claude/skills/opentui/references/solid/patterns.md +558 -0
  53. package/.claude/skills/opentui/references/testing/REFERENCE.md +614 -0
  54. package/bun.lock +0 -1
  55. package/index.ts +163 -38
  56. package/package.json +1 -1
  57. package/update.ts +87 -0
@@ -0,0 +1,337 @@
1
+ # OpenTUI Layout System
2
+
3
+ OpenTUI uses the Yoga layout engine, providing CSS Flexbox-like capabilities for positioning and sizing components in the terminal.
4
+
5
+ ## Overview
6
+
7
+ Key concepts:
8
+ - **Flexbox model**: Familiar CSS Flexbox properties
9
+ - **Yoga engine**: Facebook's cross-platform layout engine
10
+ - **Terminal units**: Dimensions are in character cells (columns x rows)
11
+ - **Percentage support**: Relative sizing based on parent
12
+
13
+ ## Flex Container Properties
14
+
15
+ ### flexDirection
16
+
17
+ Controls the main axis direction:
18
+
19
+ ```tsx
20
+ // Row (default) - children flow horizontally
21
+ <box flexDirection="row">
22
+ <text>1</text>
23
+ <text>2</text>
24
+ <text>3</text>
25
+ </box>
26
+ // Output: 1 2 3
27
+
28
+ // Column - children flow vertically
29
+ <box flexDirection="column">
30
+ <text>1</text>
31
+ <text>2</text>
32
+ <text>3</text>
33
+ </box>
34
+ // Output:
35
+ // 1
36
+ // 2
37
+ // 3
38
+
39
+ // Reverse variants
40
+ <box flexDirection="row-reverse">...</box> // 3 2 1
41
+ <box flexDirection="column-reverse">...</box> // Bottom to top
42
+ ```
43
+
44
+ ### justifyContent
45
+
46
+ Aligns children along the main axis:
47
+
48
+ ```tsx
49
+ <box flexDirection="row" width={40} justifyContent="flex-start">
50
+ {/* Children at start (left for row) */}
51
+ </box>
52
+
53
+ <box flexDirection="row" width={40} justifyContent="flex-end">
54
+ {/* Children at end (right for row) */}
55
+ </box>
56
+
57
+ <box flexDirection="row" width={40} justifyContent="center">
58
+ {/* Children centered */}
59
+ </box>
60
+
61
+ <box flexDirection="row" width={40} justifyContent="space-between">
62
+ {/* First at start, last at end, rest evenly distributed */}
63
+ </box>
64
+
65
+ <box flexDirection="row" width={40} justifyContent="space-around">
66
+ {/* Equal space around each child */}
67
+ </box>
68
+
69
+ <box flexDirection="row" width={40} justifyContent="space-evenly">
70
+ {/* Equal space between all children and edges */}
71
+ </box>
72
+ ```
73
+
74
+ ### alignItems
75
+
76
+ Aligns children along the cross axis:
77
+
78
+ ```tsx
79
+ <box flexDirection="row" height={10} alignItems="flex-start">
80
+ {/* Children at top */}
81
+ </box>
82
+
83
+ <box flexDirection="row" height={10} alignItems="flex-end">
84
+ {/* Children at bottom */}
85
+ </box>
86
+
87
+ <box flexDirection="row" height={10} alignItems="center">
88
+ {/* Children vertically centered */}
89
+ </box>
90
+
91
+ <box flexDirection="row" height={10} alignItems="stretch">
92
+ {/* Children stretch to fill height */}
93
+ </box>
94
+
95
+ <box flexDirection="row" height={10} alignItems="baseline">
96
+ {/* Children aligned by text baseline */}
97
+ </box>
98
+ ```
99
+
100
+ ### flexWrap
101
+
102
+ Controls whether children wrap to new lines:
103
+
104
+ ```tsx
105
+ <box flexDirection="row" flexWrap="nowrap" width={20}>
106
+ {/* Children overflow (default) */}
107
+ </box>
108
+
109
+ <box flexDirection="row" flexWrap="wrap" width={20}>
110
+ {/* Children wrap to next row */}
111
+ </box>
112
+
113
+ <box flexDirection="row" flexWrap="wrap-reverse" width={20}>
114
+ {/* Children wrap upward */}
115
+ </box>
116
+ ```
117
+
118
+ ### gap
119
+
120
+ Space between children:
121
+
122
+ ```tsx
123
+ <box flexDirection="row" gap={2}>
124
+ <text>A</text>
125
+ <text>B</text>
126
+ <text>C</text>
127
+ </box>
128
+ // Output: A B C (2 spaces between)
129
+ ```
130
+
131
+ ## Flex Item Properties
132
+
133
+ ### flexGrow
134
+
135
+ How much a child should grow relative to siblings:
136
+
137
+ ```tsx
138
+ <box flexDirection="row" width={30}>
139
+ <box flexGrow={1}><text>1</text></box>
140
+ <box flexGrow={2}><text>2</text></box>
141
+ <box flexGrow={1}><text>1</text></box>
142
+ </box>
143
+ // Widths: 7.5 | 15 | 7.5 (1:2:1 ratio)
144
+ ```
145
+
146
+ ### flexShrink
147
+
148
+ How much a child should shrink when space is limited:
149
+
150
+ ```tsx
151
+ <box flexDirection="row" width={20}>
152
+ <box width={15} flexShrink={1}><text>Shrinks</text></box>
153
+ <box width={15} flexShrink={0}><text>Fixed</text></box>
154
+ </box>
155
+ ```
156
+
157
+ ### flexBasis
158
+
159
+ Initial size before growing/shrinking:
160
+
161
+ ```tsx
162
+ <box flexDirection="row">
163
+ <box flexBasis={20} flexGrow={1}>Starts at 20, can grow</box>
164
+ <box flexBasis="50%">Half of parent</box>
165
+ </box>
166
+ ```
167
+
168
+ ### alignSelf
169
+
170
+ Override parent's alignItems for this child:
171
+
172
+ ```tsx
173
+ <box flexDirection="row" height={10} alignItems="center">
174
+ <text>Centered</text>
175
+ <text alignSelf="flex-start">Top</text>
176
+ <text alignSelf="flex-end">Bottom</text>
177
+ </box>
178
+ ```
179
+
180
+ ## Dimensions
181
+
182
+ ### Fixed Dimensions
183
+
184
+ ```tsx
185
+ <box width={40} height={10}>
186
+ {/* Exactly 40 columns by 10 rows */}
187
+ </box>
188
+ ```
189
+
190
+ ### Percentage Dimensions
191
+
192
+ Parent must have explicit size:
193
+
194
+ ```tsx
195
+ <box width="100%" height="100%">
196
+ <box width="50%" height="50%">
197
+ {/* Half of parent */}
198
+ </box>
199
+ </box>
200
+ ```
201
+
202
+ ### Min/Max Constraints
203
+
204
+ ```tsx
205
+ <box
206
+ minWidth={20}
207
+ maxWidth={60}
208
+ minHeight={5}
209
+ maxHeight={20}
210
+ >
211
+ {/* Constrained sizing */}
212
+ </box>
213
+ ```
214
+
215
+ ## Spacing
216
+
217
+ ### Padding (inside)
218
+
219
+ ```tsx
220
+ // All sides
221
+ <box padding={2}>Content</box>
222
+
223
+ // Individual sides
224
+ <box
225
+ paddingTop={1}
226
+ paddingRight={2}
227
+ paddingBottom={1}
228
+ paddingLeft={2}
229
+ >
230
+ Content
231
+ </box>
232
+ ```
233
+
234
+ ### Margin (outside)
235
+
236
+ ```tsx
237
+ // All sides
238
+ <box margin={1}>Content</box>
239
+
240
+ // Individual sides
241
+ <box
242
+ marginTop={1}
243
+ marginRight={2}
244
+ marginBottom={1}
245
+ marginLeft={2}
246
+ >
247
+ Content
248
+ </box>
249
+ ```
250
+
251
+ ## Positioning
252
+
253
+ ### Relative (default)
254
+
255
+ Element flows in normal document order:
256
+
257
+ ```tsx
258
+ <box position="relative">
259
+ {/* Normal flow */}
260
+ </box>
261
+ ```
262
+
263
+ ### Absolute
264
+
265
+ Element positioned relative to nearest positioned ancestor:
266
+
267
+ ```tsx
268
+ <box position="relative" width="100%" height="100%">
269
+ <box
270
+ position="absolute"
271
+ left={10}
272
+ top={5}
273
+ width={20}
274
+ height={5}
275
+ >
276
+ Positioned at (10, 5)
277
+ </box>
278
+ </box>
279
+ ```
280
+
281
+ ### Position Properties
282
+
283
+ ```tsx
284
+ <box
285
+ position="absolute"
286
+ left={10} // From left edge
287
+ top={5} // From top edge
288
+ right={10} // From right edge
289
+ bottom={5} // From bottom edge
290
+ >
291
+ Content
292
+ </box>
293
+ ```
294
+
295
+ ## Display
296
+
297
+ ### Visibility Control
298
+
299
+ ```tsx
300
+ // Visible (default)
301
+ <box display="flex">Visible</box>
302
+
303
+ // Hidden (removed from layout)
304
+ <box display="none">Hidden</box>
305
+ ```
306
+
307
+ ## Overflow
308
+
309
+ ```tsx
310
+ <box overflow="visible">
311
+ {/* Content can extend beyond bounds (default) */}
312
+ </box>
313
+
314
+ <box overflow="hidden">
315
+ {/* Content clipped at bounds */}
316
+ </box>
317
+
318
+ <box overflow="scroll">
319
+ {/* Scrollable when content exceeds bounds */}
320
+ </box>
321
+ ```
322
+
323
+ ## Z-Index
324
+
325
+ Control stacking order for overlapping elements:
326
+
327
+ ```tsx
328
+ <box position="relative">
329
+ <box position="absolute" zIndex={1}>Behind</box>
330
+ <box position="absolute" zIndex={2}>In front</box>
331
+ </box>
332
+ ```
333
+
334
+ ## See Also
335
+
336
+ - [Layout Patterns](./patterns.md) - Common layout recipes
337
+ - [Components/Containers](../components/containers.md) - Box and ScrollBox details