/** * Headless primitive field controller. * * Wraps a form-engine field handle and exposes a universal state/view * contract plus a small intent/command surface for focus/blur/input. */ import type { MdyReactivity } from "@modyra/core"; import type { MdyWidgetController } from "../contract.js"; import type { MdyFieldState } from "./field-types.js"; import type { MdyTextFieldControllerOptions, MdyTextFieldIntent } from "./text-field-types.js"; export interface MdyTextFieldController extends MdyWidgetController, MdyTextFieldIntent> { /** Set the value programmatically without producing a command. */ setValue(value: TValue): void; /** Update the readonly state. */ setReadonly(readonly: boolean): void; } export declare function createTextFieldController(options: MdyTextFieldControllerOptions, reactivity?: MdyReactivity): MdyTextFieldController; /** * How much of a slider's track is filled, as a ratio. * * A slider is a numeric field with a track, so it is served by this controller — and this was the * whole content of a file called `slider-field-types.ts`, which declared no type at all. A module * named for what it does not contain is a module nobody finds. */ export declare function sliderFillRatio(value: unknown, min: number, max: number): number;