/** * Applying a part contract to a real element. * * A projection decides what a control exposes — classes, id, role, ARIA state — and this writes that * decision to the DOM. Consuming the whole contract is what keeps every renderer of a kind * semantically identical: an attribute added to a projection reaches the DOM without any renderer * being edited, and no renderer can expose a different subset of a widget's states. */ import type { MdyPartContract } from "./contract.js"; /** * Applies an {@link MdyPartContract} — classes, styles, id, role, attributes — to an element, * replacing only what the contract controls on each call. * * Safe to re-run on every state change: it patches the same element rather than replacing it, so * focus and caret position survive. * * Only the classes the contract names are touched. An element's classes come from more than one * place — written once at creation, toggled by a host binding on every change — and rewriting the * whole attribute would drop the ones this does not own, silently and without breaking rendering. * A contract naming no classes therefore leaves `class` untouched. */ export declare function applyPart(node: HTMLElement, part: MdyPartContract): void;