| 35 | * Options for the {@link box} prompt. |
| 36 | */ |
| 37 | export interface BoxOptions extends CommonOptions { |
| 38 | /** |
| 39 | * Alignment of the content (`'left'`, `'center'`, or `'right'`). |
| 40 | * @default 'left' |
| 41 | */ |
| 42 | contentAlign?: BoxAlignment; |
| 43 | |
| 44 | /** |
| 45 | * Alignment of the title (`'left'`, `'center'`, or `'right'`). |
| 46 | * @default 'left' |
| 47 | */ |
| 48 | titleAlign?: BoxAlignment; |
| 49 | |
| 50 | /** |
| 51 | * The width of the box, either `'auto'` to fit the content or a number for a fixed width. |
| 52 | * @default 'auto' |
| 53 | */ |
| 54 | width?: number | 'auto'; |
| 55 | |
| 56 | /** |
| 57 | * Padding around the title. |
| 58 | * @default 1 |
| 59 | */ |
| 60 | titlePadding?: number; |
| 61 | |
| 62 | /** |
| 63 | * Padding around the content. |
| 64 | * @default 2 |
| 65 | */ |
| 66 | contentPadding?: number; |
| 67 | |
| 68 | /** |
| 69 | * Use rounded corners when `true`, square corners when `false`. |
| 70 | * @default true |
| 71 | */ |
| 72 | rounded?: boolean; |
| 73 | |
| 74 | /** |
| 75 | * Custom function to style the border characters. |
| 76 | */ |
| 77 | formatBorder?: (text: string) => string; |
| 78 | } |
| 79 | |
| 80 | function getPaddingForLine( |
| 81 | lineLength: number, |
nothing calls this directly
no outgoing calls
no test coverage detected