@kotori-bot/tools
Version:
Tools For Kotori
21 lines (20 loc) • 2.11 kB
TypeScript
import { type ColorsAdapterImpl, type ColorsConfig, type ColorsCustomRules, colorsIdentity } from './utils';
export * from './utils';
export * from './adapters';
export declare class Colors<T extends string = ''> {
protected readonly customRules: ColorsCustomRules<T>;
readonly c: ColorsAdapterImpl;
constructor(config: ColorsAdapterImpl | ColorsConfig<T>);
parse(text: string): string;
batch(batches: string[]): string[];
dye(text: string, color: (typeof colorsIdentity)[number] | 'clear' | keyof T): string;
clear(text: string): string;
}
export declare namespace Colors {
function createColor<T extends string>(config: ConstructorParameters<typeof Colors<T>>[0]): Colors<T>;
const parse: (text: string) => string;
const batch: (batches: string[]) => string[];
const dye: (text: string, color: number | typeof Symbol.iterator | "length" | "toString" | "concat" | "slice" | "indexOf" | "lastIndexOf" | "includes" | "at" | "reset" | "bold" | "dim" | "italic" | "underline" | "inverse" | "hidden" | "strikethrough" | "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "bgBlack" | "bgRed" | "bgGreen" | "bgYellow" | "bgBlue" | "bgMagenta" | "bgCyan" | "bgWhite" | "blackBright" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright" | "bgBlackBright" | "bgRedBright" | "bgGreenBright" | "bgYellowBright" | "bgBlueBright" | "bgMagentaBright" | "bgCyanBright" | "bgWhiteBright" | "clear" | "charAt" | "charCodeAt" | "localeCompare" | "match" | "replace" | "search" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr" | "valueOf" | "codePointAt" | "endsWith" | "normalize" | "repeat" | "startsWith" | "anchor" | "big" | "blink" | "fixed" | "fontcolor" | "fontsize" | "italics" | "link" | "small" | "strike" | "sub" | "sup" | "padStart" | "padEnd" | "trimEnd" | "trimStart" | "trimLeft" | "trimRight" | "matchAll" | "replaceAll") => string;
const clear: (text: string) => string;
}
export default Colors;