UNPKG

tm-text

Version:

Trackmania and Maniaplanet text parser and formatter

19 lines (18 loc) 722 B
import { TOKEN } from '../utils/syntax'; import type { HtmlifyOptions } from '../utils/options'; import type { LinkTokenKind, Token } from '../utils/syntax'; interface BlockState { linkKind: LinkTokenKind | false; linkHref: string | false; [TOKEN.BOLD]: boolean; [TOKEN.COLOR]: string | false; [TOKEN.ITALIC]: boolean; [TOKEN.SHADOW]: boolean; [TOKEN.UPPERCASE]: boolean; [TOKEN.WIDTH_NARROW]: boolean; [TOKEN.WIDTH_NORMAL]: boolean; [TOKEN.WIDTH_WIDE]: boolean; } export declare const KIND_TO_CSS_MAP: Readonly<Partial<Record<keyof BlockState, string>>>; export declare const htmlify: (input: string | Token[], options?: Partial<HtmlifyOptions>) => string; export default htmlify;