import { type LiteralUnion } from "type-fest"; import { type ForegroundColorName } from "./colorize.js"; /** * Common text styling props used by components like Text and Separator. */ export interface TextStyles { /** * Change text color. Tinky uses Ansis under the hood, so all its functionality * is supported. */ readonly color?: LiteralUnion; /** * Same as `color`, but for the background. */ readonly backgroundColor?: LiteralUnion; /** * Dim the color (make it less bright). */ readonly dimColor?: boolean; /** * Make the text bold. */ readonly bold?: boolean; /** * Make the text italic. */ readonly italic?: boolean; /** * Make the text underlined. */ readonly underline?: boolean; /** * Make the text crossed out with a line. */ readonly strikethrough?: boolean; /** * Inverse background and foreground colors. */ readonly inverse?: boolean; } /** * Applies text styles (color, bold, etc.) to a string using Ansis. * * @param text - The text to apply styles to. * @param styles - The styles to apply. * @returns The styled text. */ export declare const applyTextStyles: (text: string, styles: TextStyles) => string;