export type BoxBorderStyle = { /** * Top left corner * @example `┌` * @example `╔` * @example `╓` */ tl: string; /** * Top right corner * @example `┐` * @example `╗` * @example `╖` */ tr: string; /** * Bottom left corner * @example `└` * @example `╚` * @example `╙` */ bl: string; /** * Bottom right corner * @example `┘` * @example `╝` * @example `╜` */ br: string; /** * Horizontal line * @example `─` * @example `═` * @example `─` */ h: string; /** * Vertical line * @example `│` * @example `║` * @example `║` */ v: string; }; declare const boxStylePresets: Record; export type BoxStyle = { /** * The border color * @default 'white' */ borderColor: 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray' | 'blackBright' | 'redBright' | 'greenBright' | 'yellowBright' | 'blueBright' | 'magentaBright' | 'cyanBright' | 'whiteBright'; /** * The border style * @default 'solid' * @example 'single-double-rounded' * @example * ```ts * { * tl: '┌', * tr: '┐', * bl: '└', * br: '┘', * h: '─', * v: '│', * } * ``` */ borderStyle: BoxBorderStyle | keyof typeof boxStylePresets; /** * The vertical alignment of the text * @default 'center' */ valign: 'top' | 'center' | 'bottom'; /** * The padding of the box * @default 2 */ padding: number; /** * The left margin of the box * @default 1 */ marginLeft: number; /** * The top margin of the box * @default 1 */ marginTop: number; /** * The top margin of the box * @default 1 */ marginBottom: number; }; /** * The border options of the box */ export type BoxOpts = { /** * Title that will be displayed on top of the box * @example 'Hello World' * @example 'Hello {name}' */ title?: string; style?: Partial; }; export declare function box(text: string, _opts?: BoxOpts): string; export {};