import type{ComplexAttributeConverter}from'lit'; /** A closed-string-set converter that can also normalize direct JavaScript property writes. */ export interface LiteralSetConverterextends ComplexAttributeConverter{ /** Returns `value` when it belongs to the declared set, otherwise the configured fallback. */ readonly normalize:(value:unknown)=>T; /** Normalizes a reflected write and immediately repairs a foreign raw attribute value. */ readonly normalizeReflected:(host:Element,attribute:string,value:unknown)=>T;} /** * Creates one fail-safe contract for a reflected closed string property. * * Lit applies converters to attribute reads and reflection, but not to direct property writes. * Components with a custom accessor therefore use the same object's `normalize()` method in the * setter, keeping markup and untyped JavaScript writes on one authoritative path. */ export declare function literalSetConverter(values:readonly T[],fallback:T):LiteralSetConverter; /** * A closed-string-set converter whose UNSET state is a real state rather than a fallback value. */ export interface OptionalLiteralSetConverterextends ComplexAttributeConverter{ /** Returns `value` when it belongs to the declared set, otherwise `undefined`. */ readonly normalize:(value:unknown)=>T|undefined; /** * Normalizes a reflected write and repairs a foreign raw attribute value, REMOVING the attribute * when the write resolves to unset. An absent attribute stays absent -- adding it is Lit's job. */ readonly normalizeReflected:(host:Element,attribute:string,value:unknown)=>T|undefined;} /** * Creates one fail-safe contract for a reflected OPT-IN closed string property -- the shape a * component adopts when a shared vocabulary reaches it after release. * * The difference from {@linkcode literalSetConverter} is where an unsupported value lands. That one * is right whenever the property always resolves to a member, so a typo falls back to the declared * default. This one is right whenever the component has a distinct pre-vocabulary rendering it must * keep: snapping `size="huge"` to `m` would silently restyle markup whose author asked for nothing * of the sort, so an unsupported value resolves to *absent* and the stale attribute is removed with * it, leaving no tier selector matching. */ export declare function optionalLiteralSetConverter(values:readonly T[]):OptionalLiteralSetConverter; /** Reflects non-empty strings while keeping the empty/default value absent from markup. */ export declare const omittedEmptyStringConverter:ComplexAttributeConverter; /** * Restores a declared string/number default when an attribute is removed while preserving the * component's established initial reflection. Lit's `useDefault` restores removal too, but it * intentionally omits the initial reflected attribute and therefore changes that DOM contract. */ export declare function declaredDefaultConverter(declaredDefault:T):ComplexAttributeConverter; /** * Converter for a reflected boolean whose default is `true`. * * The non-default `false` value is serialized explicitly so declarative markup can distinguish it * from the absent attribute while the default value stays absent from the DOM. */ export declare const trueDefaultBooleanConverter:ComplexAttributeConverter; /** Parse-only variant for a true-defaulting property that is not reflected. */ export declare const trueDefaultBooleanFromAttributeConverter:ComplexAttributeConverter; /** * Presence-reflecting variant retained for properties whose established reflected contract uses * an empty attribute for `true` and no attribute for `false`. */ export declare const presenceTrueDefaultBooleanConverter:ComplexAttributeConverter; /** Native spellcheck serialization using the explicit `"true"` / `"false"` vocabulary. */ export declare const spellcheckConverter:ComplexAttributeConverter; /** Normalizes the combined Web Awesome boolean and Shoelace string write vocabularies. */ export declare const normalizeAutocorrect:(value:boolean|string|null)=>boolean; /** Native/Web Awesome `autocorrect` IDL parsing: the property is boolean while the HTML * attribute uses the enumerated `"on"`/`"off"` vocabulary. */ export declare const autocorrectConverter:ComplexAttributeConverter; /** Spellcheck variant that keeps the default `true` value absent and serializes only `false`. */ export declare const trueDefaultSpellcheckConverter:ComplexAttributeConverter; /** Parse-only spellcheck variant for non-reflected properties. */ export declare const spellcheckFromAttributeConverter:ComplexAttributeConverter;