export declare const enum StyleAttrsKeys { BackgroundColor = 0, Color = 1, FontFamily = 2, FontSize = 3, FontStyle = 4, FontWeight = 5, Opacity = 6, Outline = 7, TextDecoration = 8, TextDecorationColor = 9, TextDecorationLine = 10, TextDecorationStyle = 11, VerticalAlign = 12, Visibility = 13 } /** * Represents a map between style attribute keys and string values */ export type StyleAttrsDict = { [key in StyleAttrsKeys]?: string; }; /** * Represents a function that modifies style attributes */ export type StyleAttrsModifierFn = (attrs: StyleAttrs) => void; /** * Represents style attributes holder */ export declare class StyleAttrs { private attrArray; private _size; /** * Get attr * @param {StyleAttrKeys} key */ get(key: StyleAttrsKeys): string | undefined; /** * * @param {StyleAttrsKeys} key * @param {string} value */ set(key: StyleAttrsKeys, value: string): void; /** * Delete attrs * @param {StyleAttrKeys} key */ delete(key: StyleAttrsKeys): void; /** * Merge values from another object into this one * @param {StyleAttrs} attrs - The attributes to merge into instance */ update(attrs: StyleAttrsDict): void; /** * Delete all style attributes */ clear(): void; /** * Get number of non-empty attributes * @returns {number} Number of non-empty attributes */ get size(): number; /** * Convert object to string for insertion to `style` elelment attribute * @returns {string} Semi-colon separated list of key:val pairs */ toString(): string; /** * Remove attributes at `keys` if present * @param {StyleAttrsKeys} key * @returns {StyleAttrsModifierFn} Modifier function */ static delete(...keys: StyleAttrsKeys[]): StyleAttrsModifierFn; /** * Append `value` to space separated list if not present * @param {StyleAttrsKeys} key * @param {string} value * @returns {StyleAttrsModifierFn} Modifier function */ static appendVal(key: StyleAttrsKeys, value: string): StyleAttrsModifierFn; /** * Remove `value` from space separated list if present * @param {StyleAttrsKeys} key * @param {string} val * @returns {StyleAttrsModifierFn} Modifier function */ static removeVal(key: StyleAttrsKeys, value: string): StyleAttrsModifierFn; }