/** * Colour field controller. * * One value, three doors — the platform picker, the text box, the presets — and the whole reason * this needs a controller is that they do not agree on when a value is a decision. A preset closes * the overlay because choosing one is an answer. Typing does not, because `#0` is on its way to * being a colour and a field that committed or rejected on every keystroke would take the half-typed * value away from the person typing it. * * The text being edited is therefore separate from the value being held, which is the same shape the * range picker's draft has and for the same reason. */ import { type MdyReactivity } from "@modyra/core"; import type { MdyWidgetController } from "../contract.js"; import type { MdyColorsFieldControllerOptions, MdyColorsFieldIntent, MdyColorsFieldState } from "./colors-field-types.js"; export interface MdyColorsFieldController extends MdyWidgetController { setValue(value: string): void; setReadonly(readonly: boolean): void; } export declare function createColorsFieldController(options: MdyColorsFieldControllerOptions, reactivity?: MdyReactivity): MdyColorsFieldController;