import type { Character } from "../../elements/character"; import { Pausing } from "../../elements/character/pause"; import { Word } from "../../elements/character/word"; import type { ScriptCtx } from "../../elements/script"; import { Sound } from "../../elements/sound"; import { Color, Font } from "../../types"; export type SentenceConfig = { pause?: boolean | number; voice: Sound | null; character: Character | null; voiceId: string | number | null; color?: Color; } & Font; export type SentenceUserConfig = Partial & { voice: Sound | string | null | undefined; }>; export type DynamicWord = (ctx: ScriptCtx) => DynamicWordResult; export type DynamicWordResult = string | Word | Pausing | (string | Word | Pausing)[]; export type StaticWord = string | Pausing | Word; export type SingleWord = StaticWord | DynamicWord; export type SentencePrompt = SingleWord[] | SingleWord; export declare class Sentence { /** * Build a new sentence from a prompt or mix of words, pauses, and dynamic data. * @param text - The sentence prompt used to render the dialogue. * @param config - Optional styling, voice, or character overrides. * @example * ```ts * new Sentence(["Hello, ", Word.color("world", "#f00")], { * character, * }); * ``` */ constructor(text: SentencePrompt, config?: SentenceUserConfig); /** * Clone the sentence and reuse its configuration. * @example * ```ts * const sentence = new Sentence("Hello, world"); * const sentence2 = sentence.copy(); * ``` */ copy(): Sentence; }