import { a as ValidatorFactory, F as FieldOptions, V as ValidationStatus, L as LocaleData, d as ValidatorOptions } from './types-ClrfwyJw.cjs'; declare abstract class Plugin = Record> { /** Options passed by the user when instantiating the plugin */ readonly opts: T; /** Set by Core.registerPlugin() before install() is called */ protected core: Core; private _enabled; constructor(opts?: Partial); /** Called by Core.registerPlugin() — gives plugin access to the core instance */ setCore(core: Core): void; /** Called after setCore(). Add event listeners and filters here. */ install(): void; /** Called by Core.deregisterPlugin() and Core.destroy(). Remove everything install() added. */ uninstall(): void; /** Re-enable after disable() */ enable(): void; /** Temporarily suspend plugin without uninstalling */ disable(): void; isEnabled(): boolean; } declare class Core { readonly form: HTMLFormElement; private fields; private elements; private plugins; private results; private validatorResults; private validators; private locale; private emitter; private filter; constructor(form: HTMLFormElement); on(event: string, handler: (...args: unknown[]) => void): this; off(event: string, handler: (...args: unknown[]) => void): this; emit(event: string, ...args: unknown[]): this; registerFilter(name: string, func: (...args: unknown[]) => unknown): this; deregisterFilter(name: string, func: (...args: unknown[]) => unknown): this; executeFilter(name: string, defaultValue: T, args: unknown[]): T; registerPlugin(name: string, plugin: Plugin): this; deregisterPlugin(name: string): this; enablePlugin(name: string): this; disablePlugin(name: string): this; registerValidator(name: string, factory: ValidatorFactory): this; /** Remove a single validator from a field's validator map. No-op if not found. */ removeValidator(field: string, validatorName: string): this; /** Remove a validator factory from the global registry. No-op if not found. */ deregisterValidator(name: string): this; addField(field: string, options: FieldOptions): this; removeField(field: string): this; getFields(): Record; getElements(field: string): HTMLElement[]; getValidatorResult(field: string, validator: string): ValidationStatus; setLocale(locale: LocaleData): this; enableValidator(field: string, validator: string): this; disableValidator(field: string, validator: string): this; validate(): Promise; validateField(field: string): Promise; private validateElement; private getElementValue; private queryElements; resetField(field: string): this; reset(): this; destroy(): void; } interface DependencyOptions { /** Map of field name → space-separated list of dependent fields to revalidate */ [field: string]: string; } declare class Dependency extends Plugin { /** Fields currently being revalidated by this plugin — prevents infinite loops */ private revalidating; private onFieldValidated; install(): void; uninstall(): void; } interface StartEndDateOptions { /** Date format string. Supported tokens: YYYY, MM, DD. Separator: `-` or `/`. */ format: string; startDate: { /** Name of the start date field */ field: string; /** Error message shown on the start date field when start > end */ message: string; }; endDate: { /** Name of the end date field */ field: string; /** Error message shown on the end date field when end < start */ message: string; }; [key: string]: unknown; } declare class StartEndDate extends Plugin { private readonly _id; /** Validator key added to the start date field */ private get startKey(); /** Validator key added to the end date field */ private get endKey(); /** Prevent recursive cross-revalidation */ private revalidating; private onFieldValidated; install(): void; uninstall(): void; } interface SequenceOptions { enabled?: boolean; [key: string]: unknown; } declare class Sequence extends Plugin { private previousResults; constructor(opts?: SequenceOptions); private onValidatorValidated; private shouldValidate; /** Post-validation filter: clear messages after the first failure (by definition order). */ private trimToFirstFailure; install(): void; uninstall(): void; } interface TransformerOptions { /** * Map of field name → map of validator name → transform function. * The function receives (field, element, validator) and returns the transformed string value. */ [field: string]: { [validator: string]: (field: string, element: HTMLElement, validator: string) => string; }; } declare class Transformer extends Plugin { private valueFilter; install(): void; uninstall(): void; } interface AriaOptions { [key: string]: unknown; } declare class Aria extends Plugin { private readonly _id; private containerIds; private onElementValidated; private onFieldValidated; private onFieldRemoved; install(): void; uninstall(): void; } interface AutoFocusOptions { /** Called before focusing the first invalid element. */ onPrefocus?: (payload: { field: string; element: HTMLElement; }) => void; [key: string]: unknown; } declare class AutoFocus extends Plugin { private fieldStatuses; constructor(opts?: Partial); private onFieldValidated; private onFormInvalid; private onFieldRemoved; private onFormValidating; private onFormReset; install(): void; uninstall(): void; } type TooltipPlacement = "top" | "bottom" | "left" | "right"; type TooltipTrigger = "hover" | "click"; interface TooltipOptions { /** Where the tooltip appears relative to the field element. Default: 'top' */ placement?: TooltipPlacement; /** What triggers the tooltip. Default: 'hover' */ trigger?: TooltipTrigger; [key: string]: unknown; } declare class Tooltip extends Plugin { private tip; private messages; private currentElement; private triggerListeners; constructor(opts?: TooltipOptions); private onElementValidated; private onFieldRemoved; private onDocumentClicked; private attachTrigger; private detachTrigger; private showTip; private hideTip; install(): void; uninstall(): void; } interface DefaultSubmitOptions { [key: string]: unknown; } declare class DefaultSubmit extends Plugin { constructor(opts?: DefaultSubmitOptions); private onFormValid; install(): void; uninstall(): void; } type FieldValidationStatus = ValidationStatus | "Validating"; interface FieldStatusOptions { onStatusChanged?: (areFieldsValid: boolean) => void; [key: string]: unknown; } declare class FieldStatus extends Plugin { private statuses; constructor(opts?: FieldStatusOptions); private onFieldAdded; private onFieldRemoved; private onFieldValidating; private onFieldValidated; private onFormReset; private notifyStatusChanged; areFieldsValid(): boolean; getStatuses(): Map; install(): void; uninstall(): void; } interface DeclarativeOptions { /** Attribute prefix for validators. Default: "data-vd-" */ prefix?: string; /** Map HTML5 attributes (required, type, minlength, etc.) to validators. Default: false */ html5Input?: boolean; [key: string]: unknown; } declare class Declarative extends Plugin { /** Fields whose declarative attrs have already been processed — prevents infinite loops */ private addedFields; constructor(opts?: DeclarativeOptions); install(): void; uninstall(): void; private onFieldAdded; private onFieldRemoved; /** Scan form for all elements with [name] or [prefix+field], parse each one. */ private parseAllElements; /** Parse data-vd-* attributes (and html5 attrs if enabled) from a single element. */ parseElement(el: HTMLElement): { validators: Record; }; /** Coerce attribute string values to their natural types. */ private normalizeValue; private toCamelCase; } interface CharCounterOptions { enabled?: boolean; /** CSS selector for the counter container. Defaults to ".vd-plugins-char-counter" within the field's parent. */ container?: string; /** Function to format the counter text. Defaults to "current / max". */ renderCount?: (current: number, max: number) => string; /** CSS class added to the container when the character count exceeds max. */ exceededClass?: string; /** Only apply the counter to these field names. Defaults to all fields with a stringLength max. */ fields?: string[]; [key: string]: unknown; } declare class CharCounter extends Plugin { private counters; constructor(opts?: CharCounterOptions); private renderCount; private getMax; private shouldTrack; private attachToField; private detachFromField; private onFieldAdded; private onFieldRemoved; install(): void; uninstall(): void; } interface SummaryOptions { enabled?: boolean; /** CSS selector for the summary container element. Default: ".vd-plugins-summary" */ container?: string; /** Renders the title line. Return empty string to omit. */ renderTitle?: () => string; /** Renders a single error item. Receives field name and message. */ renderItem?: (field: string, message: string) => string; /** Scroll the container into view after rendering. Default: false */ autoScroll?: boolean; [key: string]: unknown; } declare class Summary extends Plugin { /** Last known error messages: field → message[] */ private messages; constructor(opts?: SummaryOptions); private getContainer; private onElementValidated; private onFormInvalid; private onFormClear; install(): void; uninstall(): void; } interface PasswordStrengthOptions { /** The field name to evaluate password strength for */ field: string; /** Error message when score is below minScore. Default: 'The password is not strong enough' */ message?: string; /** Minimum required score (0–4). Default: 3 */ minScore?: number; /** Called after each evaluation */ onScore?: (payload: { field: string; score: number; valid: boolean; }) => void; [key: string]: unknown; } declare class PasswordStrength extends Plugin { private readonly _id; private get validatorName(); private buildFactory; install(): void; uninstall(): void; } type ExcludedFn = (field: string, element: HTMLElement) => boolean; interface ExcludedOptions { excluded?: string | ExcludedFn; [key: string]: unknown; } declare class Excluded extends Plugin { private isExcluded; install(): void; uninstall(): void; } interface TriggerOptions { /** DOM event name or map of field→event. Use false to disable for a field. */ event?: string | Record; /** Debounce delay in milliseconds */ delay?: number; [key: string]: unknown; } declare class Trigger extends Plugin { private handlers; private timers; constructor(opts?: TriggerOptions); private onFieldAdded; private onFieldRemoved; private getEventForField; private attachToElements; private detachFromElements; install(): void; uninstall(): void; } interface MessageOptions { /** CSS selector for a custom message container. If omitted, a div is inserted after the field. */ container?: string; /** CSS class added to the message container element */ clazz?: string; /** When true, only the first error message is shown per field. Default: false. */ first?: boolean; [key: string]: unknown; } declare class Message extends Plugin { /** Map from field element → message container element */ private containers; private onElementValidated; private onFieldRemoved; install(): void; uninstall(): void; } interface IconOptions { valid?: string; invalid?: string; validating?: string; [key: string]: unknown; } declare class Icon extends Plugin { private icons; constructor(opts?: IconOptions); private onElementValidated; private onFieldRemoved; install(): void; uninstall(): void; } interface SubmitButtonOptions { /** CSS selector for submit button(s). Defaults to [type="submit"]. */ selector?: string; [key: string]: unknown; } declare class SubmitButton extends Plugin { constructor(opts?: SubmitButtonOptions); private getButtons; private onValidating; private onDone; install(): void; uninstall(): void; } interface Bootstrap5Options { validClass?: string; invalidClass?: string; [key: string]: unknown; } declare class Bootstrap5 extends Plugin { private trackedElements; constructor(opts?: Bootstrap5Options); private onElementValidated; install(): void; uninstall(): void; } interface BulmaOptions { validClass?: string; invalidClass?: string; [key: string]: unknown; } declare class Bulma extends Plugin { private trackedElements; constructor(opts?: BulmaOptions); private onElementValidated; install(): void; uninstall(): void; } interface TailwindOptions { /** Space-separated Tailwind classes for valid state */ validClass?: string; /** Space-separated Tailwind classes for invalid state */ invalidClass?: string; [key: string]: unknown; } declare class Tailwind extends Plugin { private trackedElements; private applyClasses; private onElementValidated; install(): void; uninstall(): void; } export { Aria as A, Bootstrap5 as B, CharCounter as C, Declarative as D, Excluded as E, FieldStatus as F, type SummaryOptions as G, type TailwindOptions as H, Icon as I, Tooltip as J, type TooltipOptions as K, type TooltipPlacement as L, Message as M, type TooltipTrigger as N, Transformer as O, PasswordStrength as P, type TransformerOptions as Q, Trigger as R, Sequence as S, Tailwind as T, type TriggerOptions as U, type AriaOptions as a, AutoFocus as b, type AutoFocusOptions as c, type Bootstrap5Options as d, Bulma as e, type BulmaOptions as f, type CharCounterOptions as g, Core as h, type DeclarativeOptions as i, DefaultSubmit as j, type DefaultSubmitOptions as k, Dependency as l, type DependencyOptions as m, type ExcludedOptions as n, type FieldStatusOptions as o, type FieldValidationStatus as p, type IconOptions as q, type MessageOptions as r, type PasswordStrengthOptions as s, Plugin as t, type SequenceOptions as u, StartEndDate as v, type StartEndDateOptions as w, SubmitButton as x, type SubmitButtonOptions as y, Summary as z };