(text: string, targetWidth: number)
| 699 | * Pads text to reach exact width using spaces. |
| 700 | */ |
| 701 | const padText = (text: string, targetWidth: number): string => { |
| 702 | const currentWidth = stringWidth(text) |
| 703 | if (currentWidth >= targetWidth) return text |
| 704 | return text + ' '.repeat(targetWidth - currentWidth) |
| 705 | } |
| 706 | |
| 707 | const renderTable = (table: Table, state: RenderState): ReactNode[] => { |
| 708 | const { palette, nextKey, codeBlockWidth } = state |