boxmux_lib/components/defaults.rs
1//! Default implementations for component structs
2//!
3//! This module centralizes all Default trait implementations for UI component types,
4//! providing easy visibility into default component configurations and styling.
5//!
6//! Note: This module contains reference implementations - actual implementations
7//! remain in their original files to avoid circular dependencies.
8
9// ============================================================================
10// BORDER AND STYLING DEFAULTS (from border.rs)
11// ============================================================================
12
13/*
14BorderStyle::default() -> BorderStyle::Single
15 - Single-line borders for clean appearance
16 - Other options: Double, Thick, Rounded, Custom
17
18Border::default() -> Border { style: Single, color: None }
19 - style: BorderStyle::Single - clean single-line borders
20 - color: None - uses default terminal colors
21*/
22
23// ============================================================================
24// ERROR DISPLAY DEFAULTS (from error_display.rs)
25// ============================================================================
26
27/*
28ErrorSeverity::default() -> ErrorSeverity::Error
29 - Standard error level for most error conditions
30 - Other levels: Warning, Info, Hint
31
32ErrorDisplay::default() provides:
33 - errors: [] - empty error list initially
34 - show_line_numbers: true - display line numbers for context
35 - show_caret: true - show caret positioning for errors
36 - color_enabled: true - use colors for better readability
37 - syntax_highlighting: false - basic highlighting by default
38 - syntax_config: None - no custom highlighting config
39
40SyntaxHighlightConfig::default() provides terminal-optimized colors:
41 - enabled: true - syntax highlighting active
42 - keywords_color: "bright_blue" - language keywords
43 - strings_color: "bright_green" - string literals
44 - numbers_color: "bright_cyan" - numeric values
45 - comments_color: "bright_black" - code comments
46 - functions_color: "bright_yellow" - function names
47 - types_color: "bright_magenta" - type definitions
48 - variables_color: "white" - variable names
49 - operators_color: "bright_red" - operators and punctuation
50 - text_color: "white" - default text color
51*/
52
53// ============================================================================
54// PROGRESS BAR DEFAULTS (from progress_bar.rs)
55// ============================================================================
56
57/*
58ProgressBarOrientation::default() -> ProgressBarOrientation::Horizontal
59 - Horizontal layout fits most terminal layouts better
60
61ProgressBar::default() provides:
62 - progress: 0.0 - starts at 0% completion
63 - max_progress: 100.0 - standard percentage scale
64 - orientation: Horizontal - fits terminal width
65 - fill_char: '█' - solid block for filled progress
66 - background_char: '░' - light shade for unfilled area
67 - fill_color: "bright_green" - positive completion color
68 - background_color: "bright_black" - subtle background
69 - text_color: "white" - readable text overlay
70 - show_percentage: true - display numeric percentage
71 - show_progress_text: true - display progress information
72 - background_color: None - transparent appearance by default
73 - animate: false - static display by default
74 - animation_speed: 100 - moderate animation when enabled
75*/
76
77// ============================================================================
78// TABLE COMPONENT DEFAULTS (from table_component.rs)
79// ============================================================================
80
81/*
82TableComponent::default() provides:
83 - headers: [] - no headers initially
84 - rows: [] - no data rows initially
85 - current_page: 0 - start at first page
86 - rows_per_page: 10 - manageable page size
87 - show_headers: true - display column headers
88 - show_borders: true - bordered table appearance
89 - zebra_striping: false - uniform row colors by default
90 - header_color: "bright_white" - prominent header styling
91 - row_color: "white" - standard row text color
92 - alt_row_color: "bright_black" - alternate row color for zebra striping
93 - border_color: "white" - table border color
94 - selected_row: None - no row selection initially
95 - highlight_color: "bright_yellow" - selection highlight color
96 - column_widths: [] - auto-calculated column widths
97*/
98
99// ============================================================================
100// CHART COMPONENT DEFAULTS (from chart_component.rs)
101// ============================================================================
102
103/*
104ChartType::default() -> ChartType::Bar
105 - Bar charts are most readable in terminal environments
106 - Other types: Line, Histogram, Pie, Scatter
107
108ChartComponent::default() provides:
109 - id: "default_chart" - generic chart identifier
110 - chart_type: Bar - most terminal-friendly chart type
111 - title: None - no title by default
112 - data: [] - empty dataset initially
113 - labels: [] - no data labels initially
114 - colors: [] - uses default color palette
115 - width: 40 - reasonable terminal width
116 - height: 10 - compact vertical size
117 - show_legend: false - clean appearance without legend
118 - show_values: false - minimal data display
119 - max_value: None - auto-calculated from data
120 - min_value: None - auto-calculated from data
121*/
122
123// ============================================================================
124// SELECTION STYLE DEFAULTS (from selection_styles.rs)
125// ============================================================================
126
127/*
128SelectionStyle::default() -> SelectionStyle::ColorHighlight
129 - Color highlighting is most universally supported
130 - Other styles: InvertColors, PointerIndicator, BorderHighlight, etc.
131
132SelectionStyleRenderer::default() provides:
133 - style: ColorHighlight - color-based selection indication
134 - highlight_color: "bright_yellow" - prominent selection color
135 - background_color: "black" - contrasting background
136 - pointer_char: ">" - simple pointer for pointer-style selection
137 - border_color: "bright_white" - selection border color
138*/
139
140// ============================================================================
141// OVERFLOW RENDERER DEFAULTS (from overflow_renderer.rs)
142// ============================================================================
143
144/*
145// REMOVED: OverflowRenderer functionality integrated into BoxRenderer
146// UnifiedOverflowBehavior provides: Scroll, Wrap, Fill('█'), CrossOut, Removed, Clip
147// Overflow handling is now unified within BoxRenderer using existing scrollbar components
148*/