| 770 | |
| 771 | // Helper to render a horizontal separator line |
| 772 | const renderSeparator = (leftChar: string, midChar: string, rightChar: string): void => { |
| 773 | let line = leftChar |
| 774 | columnWidths.forEach((width, idx) => { |
| 775 | line += '─'.repeat(width + 2) // +2 for padding spaces |
| 776 | line += idx < columnWidths.length - 1 ? midChar : rightChar |
| 777 | }) |
| 778 | nodes.push( |
| 779 | <span key={nextKey()} fg={palette.dividerFg}> |
| 780 | {line} |
| 781 | </span>, |
| 782 | ) |
| 783 | nodes.push('\n') |
| 784 | } |
| 785 | |
| 786 | // Pre-wrap all cell contents so we know the height of each row |
| 787 | const wrappedRows: string[][][] = rows.map((row) => |