/**
 * Type definition for a validation rule applied to input fields.
 *
 * - `name`: Unique identifier for the rule (used for logging/debugging).
 * - `type`: Determines how the rule is combined with others.
 *    - `'disallow'` rules are AND-ed: every disallow rule must pass for a keystroke to be accepted.
 *    - `'allow'` rules are OR-ed: at least one allow rule must pass (when any allow rule is present).
 *    This lets you compose an allowlist from granular rules, e.g. allowAlphanumeric + allowDash.
 * - `validate`: Function that receives the HTML input and the last typed key,
 *    and returns a boolean indicating whether the input is valid.
 * - `sanitize`: Function that receives the full value (e.g. after paste/autofill)
 *    and returns a cleaned version that satisfies the rule.
 */
export type InputRule = {
    name: string;
    type: 'allow' | 'disallow';
    validate: (input: HTMLInputElement, key: string) => boolean;
    sanitize: (value: string) => string;
};
/**
 * Rule: Disallow the comma (`,`) character in the input.
 *
 * This ensures that users only use dots (`.`) as decimal separators,
 * which is standard in most programming and blockchain contexts.
 */
export declare const disallowComma: InputRule;
/**
 * Rule: Disallow the input from starting with a dot (`.`).
 *
 * For example, `.5` will be considered invalid; `0.5` is preferred.
 * This helps avoid format inconsistencies and parsing errors.
 */
export declare const disallowLeadingDot: InputRule;
/**
 * Rule: Disallow more than one decimal point (`.`) in the input.
 *
 * This ensures valid decimal numbers like `123.45`,
 * and rejects invalid ones like `123.4.5`.
 */
export declare const disallowMultipleDots: InputRule;
/**
 * Rule: Disallow the decimal point (`.`) character in the input.
 *
 * This ensures that users can only enter whole numbers (integers),
 * preventing decimal values from being entered.
 */
export declare const disallowDecimal: InputRule;
/**
 * Rule: Allow digits (0–9) and a dot (`.`).
 *
 * Typically combined with disallowComma, disallowLeadingDot, and disallowMultipleDots
 * to enforce a valid decimal number format.
 */
export declare const allowNumbersAndDot: InputRule;
/**
 * Rule: Allow alphanumeric characters (a–z, A–Z, 0–9).
 *
 * Use alone or combine with allowDash / allowUnderscore to extend the allowed set.
 */
export declare const allowAlphanumeric: InputRule;
/**
 * Rule: Allow the hyphen (`-`) character.
 *
 * Combine with allowAlphanumeric (and optionally allowUnderscore) to build
 * a character allowlist, e.g. for token symbols.
 */
export declare const allowDash: InputRule;
/**
 * Rule: Allow the underscore (`_`) character.
 *
 * Combine with allowAlphanumeric (and optionally allowDash) to build
 * a character allowlist, e.g. for token symbols.
 */
export declare const allowUnderscore: InputRule;
/**
 * Union of all available input rule names.
 */
export type InputRuleName = 'disallowComma' | 'disallowLeadingDot' | 'disallowMultipleDots' | 'disallowDecimal' | 'allowNumbersAndDot' | 'allowAlphanumeric' | 'allowDash' | 'allowUnderscore';
/**
 * Lookup map from rule name to rule object.
 */
export declare const RULES_MAP: Record<InputRuleName, InputRule>;
//# sourceMappingURL=rules.d.ts.map