boxmux 0.240.3373

YAML-driven terminal UI framework for rich, interactive CLI applications and dashboards with PTY support
Documentation
//! Default implementations for component structs
//!
//! This module centralizes all Default trait implementations for UI component types,
//! providing easy visibility into default component configurations and styling.
//!
//! Note: This module contains reference implementations - actual implementations
//! remain in their original files to avoid circular dependencies.

// ============================================================================
// BORDER AND STYLING DEFAULTS (from border.rs)
// ============================================================================

/*
BorderStyle::default() -> BorderStyle::Single
  - Single-line borders for clean appearance
  - Other options: Double, Thick, Rounded, Custom

Border::default() -> Border { style: Single, color: None }
  - style: BorderStyle::Single - clean single-line borders
  - color: None - uses default terminal colors
*/

// ============================================================================
// ERROR DISPLAY DEFAULTS (from error_display.rs)
// ============================================================================

/*
ErrorSeverity::default() -> ErrorSeverity::Error
  - Standard error level for most error conditions
  - Other levels: Warning, Info, Hint

ErrorDisplay::default() provides:
  - errors: [] - empty error list initially
  - show_line_numbers: true - display line numbers for context
  - show_caret: true - show caret positioning for errors
  - color_enabled: true - use colors for better readability
  - syntax_highlighting: false - basic highlighting by default
  - syntax_config: None - no custom highlighting config

SyntaxHighlightConfig::default() provides terminal-optimized colors:
  - enabled: true - syntax highlighting active
  - keywords_color: "bright_blue" - language keywords
  - strings_color: "bright_green" - string literals
  - numbers_color: "bright_cyan" - numeric values
  - comments_color: "bright_black" - code comments
  - functions_color: "bright_yellow" - function names
  - types_color: "bright_magenta" - type definitions
  - variables_color: "white" - variable names
  - operators_color: "bright_red" - operators and punctuation
  - text_color: "white" - default text color
*/

// ============================================================================
// PROGRESS BAR DEFAULTS (from progress_bar.rs)
// ============================================================================

/*
ProgressBarOrientation::default() -> ProgressBarOrientation::Horizontal
  - Horizontal layout fits most terminal layouts better

ProgressBar::default() provides:
  - progress: 0.0 - starts at 0% completion
  - max_progress: 100.0 - standard percentage scale
  - orientation: Horizontal - fits terminal width
  - fill_char: '█' - solid block for filled progress
  - background_char: '░' - light shade for unfilled area
  - fill_color: "bright_green" - positive completion color
  - background_color: "bright_black" - subtle background
  - text_color: "white" - readable text overlay
  - show_percentage: true - display numeric percentage
  - show_progress_text: true - display progress information
  - background_color: None - transparent appearance by default
  - animate: false - static display by default
  - animation_speed: 100 - moderate animation when enabled
*/

// ============================================================================
// TABLE COMPONENT DEFAULTS (from table_component.rs)
// ============================================================================

/*
TableComponent::default() provides:
  - headers: [] - no headers initially
  - rows: [] - no data rows initially
  - current_page: 0 - start at first page
  - rows_per_page: 10 - manageable page size
  - show_headers: true - display column headers
  - show_borders: true - bordered table appearance
  - zebra_striping: false - uniform row colors by default
  - header_color: "bright_white" - prominent header styling
  - row_color: "white" - standard row text color
  - alt_row_color: "bright_black" - alternate row color for zebra striping
  - border_color: "white" - table border color
  - selected_row: None - no row selection initially
  - highlight_color: "bright_yellow" - selection highlight color
  - column_widths: [] - auto-calculated column widths
*/

// ============================================================================
// CHART COMPONENT DEFAULTS (from chart_component.rs)
// ============================================================================

/*
ChartType::default() -> ChartType::Bar
  - Bar charts are most readable in terminal environments
  - Other types: Line, Histogram, Pie, Scatter

ChartComponent::default() provides:
  - id: "default_chart" - generic chart identifier
  - chart_type: Bar - most terminal-friendly chart type
  - title: None - no title by default
  - data: [] - empty dataset initially
  - labels: [] - no data labels initially
  - colors: [] - uses default color palette
  - width: 40 - reasonable terminal width
  - height: 10 - compact vertical size
  - show_legend: false - clean appearance without legend
  - show_values: false - minimal data display
  - max_value: None - auto-calculated from data
  - min_value: None - auto-calculated from data
*/

// ============================================================================
// SELECTION STYLE DEFAULTS (from selection_styles.rs)
// ============================================================================

/*
SelectionStyle::default() -> SelectionStyle::ColorHighlight
  - Color highlighting is most universally supported
  - Other styles: InvertColors, PointerIndicator, BorderHighlight, etc.

SelectionStyleRenderer::default() provides:
  - style: ColorHighlight - color-based selection indication
  - highlight_color: "bright_yellow" - prominent selection color
  - background_color: "black" - contrasting background
  - pointer_char: ">" - simple pointer for pointer-style selection
  - border_color: "bright_white" - selection border color
*/

// ============================================================================
// OVERFLOW RENDERER DEFAULTS (from overflow_renderer.rs)
// ============================================================================

/*
// REMOVED: OverflowRenderer functionality integrated into BoxRenderer
// UnifiedOverflowBehavior provides: Scroll, Wrap, Fill('█'), CrossOut, Removed, Clip
// Overflow handling is now unified within BoxRenderer using existing scrollbar components
*/