10 Commits

Author SHA1 Message Date
phranck 5ad97132b8 Feat: Add @Observable support with Observation framework
- Replace custom Observable protocol and @Published with Apple's @Observable macro
- Add withObservationTracking in renderToBuffer for automatic per-property dependency tracking
- Add type-based @Environment(Type.self) and .environment(object) for observable objects
- Add ObjectEnvironmentModifier for injecting observable objects into the environment
- Add needsCacheClear flag to AppState for thread-safe cache invalidation
- Add cross-platform test script (scripts/test-linux.sh) for Docker-based Linux verification
- Add DemoAppHeader with system info display (OS, version, architecture)
- Consolidate Example App: extract ImageDemoHelpers, KeyboardHelpSection, ValueDisplayRow
- Add pre-push verification rule to CLAUDE.md
- Verified on both macOS and Linux (swift:6.0 container), 1155 tests passing
2026-02-15 23:49:34 +01:00
phranck 8eb8f26781 Refactor: Implement SwiftUI-compatible ToggleStyle API
- Add ToggleStyle protocol matching SwiftUI's pattern
- Add .automatic, .checkbox, .switch built-in styles
- Add .toggleStyle(_:) view modifier via Environment
- All styles render as [ ]/[x] in TUI (documented constraint)
- Remove old ToggleStyle enum (.toggle/.checkbox)
- Update example app and tests for new API
2026-02-13 16:18:13 +01:00
phranck ac5e63eb84 Feat: Add ButtonRole, horizontal Alert buttons, ESC dismiss, arrow key navigation
- Add ButtonRole (.cancel, .destructive) with SwiftUI-conformant API
- Alert renders buttons horizontally, sorted by role (cancel left)
- Alert max width capped at 60 characters for readability
- ESC key dismisses alerts via AlertPresentationModifier handler
- FocusManager: Left/Right arrows navigate within sections (like Up/Down)
- Move completed plans to done/ directory
- Update example pages with minor adjustments
2026-02-08 23:00:59 +01:00
phranck 989b90effa Refactor: Rename .foregroundColor() to .foregroundStyle() for SwiftUI API parity 2026-02-08 16:36:53 +01:00
phranck ce772ea6f3 Refactor: Checkbox style uses dot (●) instead of square
- Changed indicator from ◼ (U+25FC) to ● (large dot)
- More consistent with toggle indicator style
- Checkbox now shows [●] when on, [ ] when off
- Updated example page state summary
- All 591 tests passing
2026-02-06 18:03:01 +01:00
phranck 941d8b704d Refactor: Checkbox uses U+25FC (black small square)
- Changed indicator from  to ◼ (U+25FC)
- Smaller, more compact checkbox appearance
- Updated example page state summary
- All 571 tests passing
2026-02-06 17:45:45 +01:00
phranck 6d1a4e876e Refactor: Checkbox uses U+25FE (black medium square) instead of U+25A3
- Changed indicator from ▣ to  (U+25FE)
- Better visual weight and consistency
- Updated example page state summary
- All 571 tests passing
2026-02-06 17:44:19 +01:00
phranck 0713f3ead7 Refactor: Checkbox uses U+25A3 (square with horizontal fill) instead of dot
- Changed indicator from ● to ▣ (U+25A3)
- More visually distinctive for checkboxes
- Updated example page state summary
- All 571 tests passing
2026-02-06 17:43:21 +01:00
phranck 989861738c Refactor: Checkbox style uses dot (●) instead of x
- Checkbox toggle now shows [●] when on, [ ] when off
- More consistent with dot-based toggle style [●○]
- Updated example page to show new checkbox indicator
- All 571 tests passing
2026-02-06 17:41:17 +01:00
phranck a0af77af15 Feat: Toggle component with toggle and checkbox styles
- Toggle struct with string initializer for SwiftUI API parity
- ToggleStyle enum: .toggle (slider ●○) and .checkbox ([x])
- ToggleHandler for Space/Enter keyboard events
- Focus indicator with pulsing accent dot (inherited from Button pattern)
- Disabled state with tertiary color
- .disabled() modifier for control
- Comprehensive tests (17 tests, 571 total passing)
- TogglePage example with both styles, disabled states, and live state demo
- Added to main menu with shortcut key 7
2026-02-06 17:34:00 +01:00