- StatusBar bordered style now uses appearance-based borderStyle
- Replace help item (`?`) with appearance item (`a`) in system items
- Add `showAppearanceItem` flag to StatusBarState
- Add `StatusBarItemOrder.appearance` for proper ordering
- Update SystemStatusBarItem to include appearance cycling
- Pressing `a` now cycles through appearances (line, rounded, doubleLine, heavy, block)
The StatusBar bordered style adapts to the current appearance, showing the
same border style as all other controls in the app.
Each theme now has a darker background with a subtle color tint:
- Green: #0F1A0F (dark with green tint)
- Amber: #1A150F (dark with amber/orange tint)
- White: #121418 (dark with cool/blue tint)
- Red: #1A0F0F (dark with red tint)
This gives each theme a more distinctive character while keeping
the backgrounds dark and easy on the eyes.
Replace all reset codes in rendered content with 'reset + restore background'
to ensure the theme background persists after styled text ends.
This fixes the issue where text with ANSI formatting would reset the
background color, leaving parts of the terminal with the wrong background.
- WindowGroup.renderScene wraps each line with background color code
- StatusBar rendering also uses theme background
- Ensures entire terminal has consistent background color
- Add Terminal.fillBackground() method to fill screen with a color
- Add ANSIRenderer.backgroundCode() helper for background escape sequences
- AppRunner now fills screen with theme.background before rendering content
- Remove unnecessary .frame() and .background() from ContentView
This ensures the entire terminal has a consistent background color that
changes when switching themes.
- Update all 4 phosphor themes (Green, Amber, White, Red) to use neutral
dark background (#1E1E1E) matching Spotnik reference
- Simplify theme names (remove 'Phosphor' suffix)
- Menu: Use theme.foreground for items, theme.accent for selection
- Button: Use theme colors for default focused style and focus indicator
- Panel/Card: Use theme.border as default border color
- BorderModifier: Use theme.border as default
All 189 tests passing.
- Remove DefaultTheme, DarkTheme, LightTheme
- GreenPhosphorTheme is now the default theme
- Theme cycling order: Green → Amber → White → Red → NCurses
- .default now maps to GreenPhosphorTheme
The render() method was creating a new EnvironmentValues with the default
theme, overwriting any theme changes made by ThemeManager. Now the current
theme is explicitly set from themeManager.currentTheme.
- ThemeManager is no longer a singleton
- Access via Environment: @Environment(\.themeManager)
- Type-safe setTheme() API: themeManager.setTheme(.amber)
- ThemeManager injected by AppRunner into environment
- Custom themes supported via init(themes:)
QuitBehavior:
- .always: Quit works from any screen (default)
- .rootOnly: Quit only works from main screen (no context pushed)
- Quit item hidden in status bar when not allowed
ThemeManager:
- Singleton for managing theme cycling
- cycleTheme() / cyclePreviousTheme() methods
- setTheme(at:) and setTheme(withId:) for direct access
- Automatically updates environment and triggers re-render
- 't' key now cycles themes in AppRunner
- System items are now built dynamically based on flags
- showHelpItem (default: true) - controls ? help visibility
- showThemeItem (default: true) - controls t theme visibility
- Quit item is always shown when showSystemItems is true
- Removed unused configureSystemItems method
- StatusBarState now initializes with all 3 system items
- Added deduplication logic to StatusBar.renderToBuffer
- User items with same shortcut override system items
- Updated Example App to not duplicate 'q quit'
- Updated tests for 3 system items instead of 1
- StatusBar now has separate userItems and systemItems properties
- User items are sorted by order, then system items (fixed order) appended
- Rendering combines both: [sorted user items] + [system items]
- User items override system items with same shortcut (deduplication)
- StatusBarState passes items separately to StatusBar
- Alignment applies to the combined items
- Updated tests to use userItems property
- Add StatusBarItemOrder for consistent item positioning
- System items (quit, help, theme) appear on the right side
- User items appear on the left, can override system items
- Separate tracking of user vs system items in StatusBarState
- Add showSystemItems flag to disable system items in tests
- Items sorted by order value (lower = left, higher = right)
- User items override system items with the same shortcut
- Add comprehensive tests for system item behavior (189 total)
BREAKING CHANGE: Package name changed due to name collision with
existing rensbreur/SwiftTUI package.
Changes:
- Rename package from SwiftTUI to TUIKit in Package.swift
- Rename Sources/SwiftTUI to Sources/TUIKit
- Rename Sources/SwiftTUIExample to Sources/TUIKitExample
- Rename Tests/SwiftTUITests to Tests/TUIKitTests
- Rename SwiftTUI.swift to TUIKit.swift
- Update all imports: import SwiftTUI -> import TUIKit
- Update all code references: SwiftTUI.renderToBuffer -> TUIKit.renderToBuffer
- Update documentation comments
- Rename swiftTUIVersion to tuiKitVersion
All 181 tests passing.