import type { Accessor } from "solid-js"; /** * Minimum shape required by {@link fieldStateAttrs}. Compounds typically * pass `state` from `createMemo` that already spreads `field.state()`; only * these five fields are read. */ export interface FieldStateAttrSource { /** `true` = valid, `false` = invalid, `null`/`undefined` = unknown. */ valid: boolean | null | undefined; touched: boolean; dirty: boolean; filled: boolean; focused: boolean; } /** * Standard field-state `data-*` attribute getter-bag. Each property is a * live getter reading through the source accessor โ€” safe to spread into * `mergeRootProps` without losing reactivity. */ export interface FieldStateAttrs { readonly "data-valid": "" | undefined; readonly "data-invalid": "" | undefined; readonly "data-touched": "" | undefined; readonly "data-dirty": "" | undefined; readonly "data-filled": "" | undefined; readonly "data-focused": "" | undefined; } /** * Project a field-state accessor into the canonical `data-*` getter bag. * Used by checkbox/radio/switch/etc. wrappers to attach the standard * field-validity attrs without hand-writing six getters per compound. * * The source needn't be a plain `Accessor` โ€” any * memo whose return value is shape-compatible works. Output composes with * `mergeRootProps` because every key is a getter, so spread destructuring * is the only thing that breaks reactivity (same caveat as every slot * factory in this codebase โ€” see solidify.md ยง1 wave-1 papercut #1). */ export declare function fieldStateAttrs(state: Accessor): FieldStateAttrs; //# sourceMappingURL=field-state-attrs.d.ts.map