You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+65-1Lines changed: 65 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,7 +171,7 @@ src/
171
171
2. Create reducer in `helpers/state.ts`.
172
172
3. Create pure screen functions in `screens/` (each returns a `VNode`).
173
173
4. Wire keybindings via `app.keys()` in `main.ts`.
174
-
5. Use `createNodeBackend({ fpsCap: 30 })` for production apps.
174
+
5. Use `createNodeApp({ config: { fpsCap: 30 } })` for production apps.
175
175
6. For animated screens, prefer declarative hooks (`useTransition`, `useSpring`, `useSequence`, `useStagger`) and `ui.box` transition props over ad-hoc timers in view code.
176
176
177
177
**Widget usage hierarchy (prefer higher):**
@@ -181,6 +181,70 @@ src/
181
181
3.`useTransition()/useSpring()/useSequence()/useStagger()`, `useTable()`, `useModalStack()`, `useForm()` — for complex interaction patterns.
182
182
4.`each()`, `show()`, `when()`, `maybe()`, `match()` — rendering control flow utilities.
183
183
184
+
## TUI Aesthetics Protocol
185
+
186
+
When building or modifying Rezi TUI applications, follow these visual design rules to ensure professional output.
187
+
188
+
### Mandatory Structure
189
+
1. Root view MUST use `ui.page()` or `ui.appShell()` — never a bare `ui.column()`.
190
+
2. Root MUST have `p: 1` (minimum 1-cell padding from terminal edges).
191
+
3. Content sections MUST be wrapped in `ui.panel("Title", [...])` for visual grouping.
192
+
4. Button groups MUST use `ui.actions([...])` for right-aligned layout.
193
+
5. Forms MUST use `ui.form([...])` with `ui.field()` wrappers.
194
+
195
+
### Widget Styling Defaults
196
+
When the active theme provides semantic color tokens, core interactive widgets use design system recipes by default:
197
+
-**Buttons**: Auto-styled with `soft` variant. Use `intent: "primary"` for main CTA.
198
+
-**Inputs**: Auto-styled with border + elevated background. No manual styling needed.
199
+
-**Selects**: Auto-styled with border + background.
200
+
-**Checkboxes**: Auto-styled with accent color when checked.
201
+
-**Progress bars**: Auto-styled with theme accent color.
202
+
-**Callouts**: Auto-styled with semantic border color based on variant.
203
+
204
+
If the active theme does not provide semantic color tokens, these widgets fall back to non-recipe rendering.
205
+
206
+
Notes:
207
+
- A framed border for input/select requires at least 3 rows of height; at 1 row they still use recipe text/background styling but render without a box border.
208
+
- For buttons, `px` overrides recipe padding when recipe styling is active; use `dsSize` for standard size presets.
209
+
210
+
### Button Intent Shorthand
211
+
Instead of `dsVariant` + `dsTone` + `dsSize`, use the `intent` prop:
212
+
| Intent | Maps to | Use for |
213
+
|--------|---------|---------|
214
+
|`"primary"`| solid + primary | Main call-to-action (Save, Submit) |
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,15 @@ The format is based on Keep a Changelog and the project follows Semantic Version
8
8
9
9
### Added
10
10
11
-
-_No unreleased changes yet._
11
+
- Beautiful-by-default widget styling via design system recipes:
12
+
- Buttons, inputs/textareas, selects, checkboxes, progress bars, and callouts now render with recipe styling by default when semantic theme tokens are available.
13
+
-`intent` prop on `ButtonProps` (`"primary" | "secondary" | "danger" | "success" | "warning" | "link"`) as a shorthand for `dsVariant`/`dsTone` (and `dsSize` for link).
14
+
-`preset` prop on `BoxProps` (`"card" | "surface" | "well" | "elevated"`) for consistent container defaults.
-**Breaking (alpha):** manual styling props (`style`, `pressedStyle`, `trackStyle`, `px`) no longer opt out of recipe styling when semantic tokens are available; they are merged on top of the recipe result.
-**Manual overrides**: `style` / `pressedStyle` / `px` / `trackStyle` are merged on top of recipe results (they do not disable recipes).
122
+
-**Framed inputs/selects**: Drawing a full border + interior requires at least **3 rows** of height; at 1 row they still use recipe text/background styling but render without a box border.
0 commit comments