import { Color, Font } from "../../types"; import { DynamicWord } from "../../elements/character/sentence"; import { Pausing } from "../../elements/character/pause"; export type WordConfig = { className: string; ruby: string; color: Color; pause: boolean; cps?: number; } & Font; export declare class Word { static isWord(obj: any): obj is Word; /** * Create a word with an explicit color or re-color an existing word. * @example * ```ts * Word.color("Hello", "#f00"); * ``` * @param text - The existing word or raw text. * @param color - The CSS color to apply. */ static color(text: string | Word, color: Color): Word; /** * Return a bold version of the provided word. * @param text - The text or word to bold. */ static bold(text: string | Word): Word; /** * Return an italic version of the provided word. * @param text - The text or word to italicize. */ static italic(text: string | Word): Word; /** * Wrap raw data (string, dynamic function, or pause) into a `Word` for sentences. * @param text - The payload shown in dialogue, which may be static, dynamic, or a pause. * @param config - Optional styling settings such as color, ruby, and cps. */ constructor(text: T, config?: Partial); /** * Render the text value if it is a plain string. * @returns The raw string, or an empty string for dynamic content. */ toString(): string; }