/** * The colours a field offers when a document names none. * * Three renderers each carried a list of their own — eight colours in one, ten in another, fourteen * in the third — so the same document drew a different palette depending on which adapter rendered * it, and none of the three could be pointed at as the one the library suggests. * * Eight hues around the wheel and two neutrals: enough to cover what a person reaches for without a * grid nobody scans, and no relation to the theme's own tokens, because a suggestion is not a * decision about the page. */ export declare const MDY_COLOR_PRESETS: readonly string[]; /** A HEX value, and the one rule that matters: a partial spelling is not a colour and is not an error either. */ export type MdyColorValueIntent = { readonly type: "native"; readonly value: string; } | { readonly type: "text"; readonly value: string; } | { readonly type: "preset"; readonly value: string; }; export interface MdyColorValueTransition { readonly value: string | undefined; readonly close: boolean; readonly touched: boolean; } /** Canonical HEX transition. Invalid partial text preserves the committed value. */ export declare function colorValueTransition(intent: MdyColorValueIntent): MdyColorValueTransition; /** * Case-insensitive comparison for equivalent HEX spellings. * * Either side may be absent. A colour field holds a string by contract, but this function is * published and decides whether the swatch redraws, whether the field is dirty and whether a draft * is written — so a caller holding a colour nobody has chosen yet asks the question on both sides. * Two absences are the same colour; one absence is not the colour on the other side. */ export declare function colorValueEquals(left: string | null | undefined, right: string | null | undefined): boolean; /** * A palette as pairs of value and name, however a document spelled it. * * A document may write a colour as a string or as a value with a label, and every renderer needs the * same two facts from either shape — the colour to paint and the words to announce. Normalised in * one place so three renderers do not each decide what an unlabelled entry is called. * * An entry with no label is announced by its value. That is poor and it is honest: nobody has named * `#4361ee`, and a name invented here would claim a meaning it does not have. */ export declare function colorPresetsOf(presets: ReadonlyArray | undefined): ReadonlyArray<{ readonly value: string; readonly label: string; }>;