import type { ImportDiagnostic, RichText, RiveArtboardGraph } from '@flighthq/types/contract'; /** * Builds a rich text node from a Rive text drawable. * * The words live in the drawable's **value runs**, each naming a style, and a style's colour comes * from a paint child of its own — the same shape a fill takes on a shape. `styleId` indexes the * artboard's component numbering, the same space `parentId` uses, rather than indexing styles in * declaration order. * * Runs are joined in file order and **each run contributes one `TextFormatRange`** over the span it * occupies in the joined string, which is what carries a drawable whose runs differ in style. One * range per run rather than one only where the style changes: a run is the unit the file authored, so * a consumer reads back the structure that was written rather than a coalesced version of it. * * A text drawable always becomes a `RichText`, never a `TextLabel`, even when a single run means the * ranges are redundant with the format. `TextFormatRange` lives only on `RichTextData`, so the kind * would otherwise depend on the *contents* of the file — a caller that registered a renderer for one * kind would silently lose every multi-run text. One Rive concept maps to one Flight kind. */ export declare function createRiveRichText(artboard: Readonly, index: number, fontNames: readonly string[], diagnostics?: ImportDiagnostic[]): RichText; //# sourceMappingURL=riveText.d.ts.map