import { CoreTogglePropertyId } from './property-ids.js'; import { InvalidInlineTokenError } from './error-types.js'; import { DirectState } from './directives.js'; export type TokenParseOk = { ok: true; value: T; }; export type TokenParseError = { ok: false; error: InvalidInlineTokenError; }; export type TokenParseResult = TokenParseOk | TokenParseError; /** * Parsed result for an ST_OnOff property. * `direct` is the canonical tri-state directive; `canonical` is the * normalized OOXML value for export (`null` = ON bare element, `'0'` = OFF). */ export interface StOnOffParsed { direct: DirectState; } /** * Parses a `w:val` attribute value for an ST_OnOff property. * * @param property - The property being parsed (bold/italic/strike). * @param val - The `w:val` attribute value, or `null` for bare element (e.g., ``). * @param xpath - Attribute-level xpath for error reporting. */ export declare function parseStOnOff(property: CoreTogglePropertyId, val: string | null, xpath: string): TokenParseResult; export interface StUnderlineParsed { direct: DirectState; /** Underline type for ON states; `'none'` for OFF; `undefined` for absent. */ underlineType?: string; } /** * Parses a `w:val` attribute for ST_Underline. * * @param val - The `w:val` attribute value, or `null` for bare ``. * @param xpath - Attribute-level xpath for error reporting. */ export declare function parseStUnderline(val: string | null, xpath: string): TokenParseResult; /** * Parses and normalizes a `w:color` attribute on ``. * * Accepts: 6-digit hex (with or without `#`), `auto`. * - Valid hex → lowercase 6-digit with `#` prefix. * - `auto` → `undefined` (theme-resolved, not stored as direct). * - Invalid → error. */ export declare function parseUnderlineColor(val: string | null, xpath: string): TokenParseResult; /** * Parses a `w:themeColor` attribute on ``. * Must be an exact match from ST_ThemeColor (case-sensitive). */ export declare function parseUnderlineThemeColor(val: string | null, xpath: string): TokenParseResult; /** * Parses a `w:themeTint` or `w:themeShade` attribute on ``. * Must be a 2-digit hex string (00–FF). Normalizes to uppercase. */ export declare function parseUnderlineThemeModifier(val: string | null, attribute: 'themeTint' | 'themeShade', xpath: string): TokenParseResult; //# sourceMappingURL=token-parsers.d.ts.map