|
|
96810d80ea
|
feat: Add focus management, themes, and comprehensive tests
Focus management system (src/focus.zig):
- FocusRing for tab-order navigation within widget groups
- FocusManager for managing multiple focus rings
- Focusable interface with vtable pattern
- Focus trapping for modals
Theme system (src/theme.zig):
- Theme struct with full color properties
- Style builder methods (primaryStyle, errorStyle, etc.)
- 10 predefined themes: dark, light, dracula, nord, gruvbox,
solarized_dark, monokai, one_dark, tokyo_night, catppuccin
Comprehensive test suite (src/tests/):
- widget_tests.zig: Block, Gauge, Checkbox, RadioGroup, Select,
Slider, StatusBar, Toast, Panel, TabbedPanel, Rect, Buffer, Style
- theme_tests.zig: Theme system and predefined themes
- layout_tests.zig: Layout constraints and splits
- tests.zig: Test aggregator
Bug fixes:
- Fixed Zig 0.15 API compatibility in inline tests
- style.fg -> style.foreground
- std.time.sleep -> std.Thread.sleep
- Cell.char -> Cell.symbol with proper Symbol comparison
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2025-12-08 18:29:00 +01:00 |
|