/** * File field controller. * * A file field holds a selection; a person hands it candidates. Between the two sits a policy — what * is accepted, how many, how large — and that policy is `fileSelectionTransition`, which already * existed and which every renderer wired by hand along with the state around it. * * The state around it is the part worth having here. What was **rejected** has to survive the * transition long enough to be shown: a field that silently drops what it will not take leaves * someone looking at a list missing the file they just chose, with nothing to explain it. And * `dragover` is a state the contract declares, so it belongs to the widget rather than to whichever * renderer remembered to track it. */ import { type MdyReactivity } from "@modyra/core"; import { type MdyFileCandidate } from "../behavior.js"; import type { MdyWidgetController } from "../contract.js"; import type { MdyFileFieldControllerOptions, MdyFileFieldIntent, MdyFileFieldState } from "./file-field-types.js"; export interface MdyFileFieldController extends MdyWidgetController, MdyFileFieldIntent> { setValue(files: readonly TFile[]): void; setReadonly(readonly: boolean): void; } export declare function createFileFieldController(options: MdyFileFieldControllerOptions, reactivity?: MdyReactivity): MdyFileFieldController;