export declare const IRC_FMT_COLOR_MAP: { /** * IRC white `rgb(255,255,255)` */ white: string; /** * IRC black `rgb(0,0,0)` */ black: string; /** * IRC blue `rgb(0,0,127)` */ blue: string; /** * IRC green `rgb(0,147,0)` */ green: string; /** * IRC red `rgb(255,0,0)` */ red: string; /** * IRC brown `rgb(127,0,0)` */ brown: string; /** * IRC purple `rgb(156,0,156)` */ purple: string; /** * IRC orange `rgb(252,127,0)` */ orange: string; /** * IRC yellow `rgb(255,255,0)` */ yellow: string; /** * IRC light green `rgb(0,252,0)` */ lightgreen: string; /** * IRC cyan `rgb(0,147,147)` */ cyan: string; /** * IRC light cyan `rgb(0,255,255)` */ lightcyan: string; /** * IRC light blue `rgb(0,0,252)` */ lightblue: string; /** * IRC pink `rgb(255,0,255)` */ pink: string; /** * IRC grey `rgb(127,127,127)` */ grey: string; /** * IRC light grey `rgb(210,210,210)` */ lightgrey: string; }; /** * ^O character, color reset character */ export declare const IRC_FMT_RESET = "\u000F"; export declare const IRC_FMT_FORMAT_MAP: { /** * Normal text */ normal: string; /** * underline text, `^_` */ underline: string; /** * **bold text**, `^B` */ bold: string; /** * *italic text*, `^I` */ italics: string; /** * reverse color text, `^V` */ reverse: string; }; /** * Remove color and format characters from a string. * @param str Text * @returns Stripped text */ export declare const stripFormatting: (str: string) => string; /** * Colorize a string for sending. * @param color IRC color key * @param str Text to colorize * @returns Text with control characters */ export declare const applyTextColor: (color: keyof typeof IRC_FMT_COLOR_MAP, str: string) => string; /** * Apply text formatting to a string for sending. * @param format IRC format key * @param str Text to format * @returns Text with control characters */ export declare const applyTextFormat: (format: keyof typeof IRC_FMT_FORMAT_MAP, str: string) => string; /** * Apply CTCP control characters with a command. * @param message Message * @param command CTCP command, e.g. `ACTION` * @returns Text with control characters */ export declare const applyCTCP: (message: string, command?: string) => string; export declare type IRCTextFormatWrapperFn = (text: string, foregroundColor?: string, backgroundColor?: string, textFormat?: string) => string; /** * Wrap regions of text that have formatting or colors with a custom wrapper, e.g. HTML. * Defaults to a psuedo-XML style wrapper `` * @param line Text with control characters * @param wrapperFn Wrapper function to use * @returns Text with applied wrappers */ export declare function wrapFormattedText(line: string, wrapperFn?: IRCTextFormatWrapperFn): string;