1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
//! High-performance data table with virtual scrolling, column customization,
//! and cell selection.
//!
//! The table module provides a flexible, feature-rich table component designed
//! to handle large datasets efficiently through virtual rendering. Rows are
//! only rendered when visible, making performance independent of data size.
//! Supports multiple selection modes (row, column, cell), keyboard navigation,
//! context menus, and dynamic column configuration.
//!
//! # Architecture
//! The table system is split into several components:
//! - [`Table`]: The main rendering element (thin wrapper around TableState)
//! - [`TableState`]: Manages table state and keyboard handling
//! - [`TableDelegate`]: Trait for custom column definitions and cell rendering
//! - [`TableColumn`]: Column metadata (width, sortability, custom renderers)
//!
//! # Features
//! - **Virtual Scrolling**: Only visible rows are rendered, linear O(1) memory
//! cost
//! - **Selection Modes**: Row, column, or cell selection with multi-select
//! support
//! - **Keyboard Navigation**: Arrow keys, Tab, Home/End, PageUp/Down with
//! intelligent selection
//! - **Column Customization**: Resizable, reorderable, fixed (pinned), and
//! sortable columns
//! - **Custom Renderers**: Per-column cell rendering via
//! `TableColumn::builder_for_cell()`
//! - **Striping & Borders**: Optional alternate row colors and grid borders
//! - **Context Menus**: Right-click support on rows and cells
//! - **Scrollbar Control**: Independent control of vertical/horizontal
//! scrollbar visibility
//!
//! # Example
//! ```rust,ignore
//! use woocraft::{Table, TableState, TableDelegate};
//!
//! // Simple table with standard delegate
//! let table_state = cx.new(|cx| {
//! let delegate = MyTableDelegate { rows: vec![...] };
//! TableState::new(delegate, cx)
//! });
//!
//! Table::new(&table_state)
//! .stripe(true)
//! .bordered(true)
//! ```
//!
//! # Performance Notes
//! - Table uses virtual rendering via GPUI's layout system; O(1) memory for
//! 10k+ rows
//! - Column rendering is memoized; changing one column doesn't re-render
//! unchanged columns
//! - For very large tables (100k+ rows), ensure `TableDelegate::row_count()` is
//! O(1)
//! - Custom cell renderers should avoid blocking operations; consider async
//! cells via `Entity<View>`
use ;
use crateSize;
pub use *;
pub use *;
pub use *;
pub use *;
/// Configuration options for table styling and behavior.
///
/// Used internally by [`Table`] to pass configuration to [`TableState`].
pub