/****
 * hidePiiData.ts
 *
 * Purpose
 * -------
 * Utilities for anonymizing Personally Identifiable Information (PII) in rendered DOM content.
 * The main entry point is `hidePiiData`, which shuffles visible text inside a target element.
 *
 * Integration / Activation
 * -----------------------
 * Activation can be toggled with **Ctrl+Shift+U / Cmd+Shift+U**, or by setting the
 * `<html>` attribute `data-hide-pii="shuffle"`. When activated, new or changed content
 * marked with `data-pii="visible"` is processed by this module.
 * This file does not attach observers by itself. It only exposes pure DOM utilities.
 *
 * High level behavior
 * -------------------
 * 1. Tokenize text on whitespace while preserving the original whitespace.
 * 2. For email tokens, clean punctuation, pad each part to at least six characters,
 *    shuffle both parts independently, and rejoin with `@`.
 * 3. For normal tokens shorter than six characters, pad with random alphanumerics before shuffling.
 * 4. Preserve capitalization pattern for simple Name like tokens (e.g. `Alice`) after shuffling.
 *
 * Data attributes used
 * --------------------
 * - `data-pii="visible"` marks elements that should be anonymized.
 * - `data-pii="hidden"` is written to elements that have already been processed to help external code introspect state.
 * - `data-hide-pii="shuffle"` on `<html>` is used by an external observer to decide when to call `hidePiiData`.
 */
/**
 * Shuffle text while preserving whitespace.
 *
 * Behavior
 * --------
 * - Tokenization uses `\S+` to process non whitespace runs and preserves the original whitespace.
 * - Email like tokens are handled by `shuffleEmail`.
 * - Non email tokens shorter than six characters are padded with random alphanumerics before shuffling.
 * - For simple Name like tokens (regex `^[A-Z][a-z]+$`), capitalization is preserved after shuffling.
 */
export declare const shuffleText: (str: string, preserveCase?: boolean) => string;
export declare const shufflePii: (text: string) => string;
/**
 * Shuffle text nodes or input values inside the provided element(s).
 *
 * Parameters
 * ----------
 * - `target`: either a single `Element` or a `NodeListOf<Element>`.
 * - `forceResult`: optional string to override output directly.
 *
 * How it works
 * ------------
 * - Marks each processed element with `data-pii="hidden"`.
 * - If the element is an `<input>`, it shuffles the `value` string and writes it back.
 * - For non input elements, it walks text nodes with a `TreeWalker` and replaces the node values
 *   with their shuffled variants.
 *
 * Performance notes
 * -----------------
 * - Work is proportional to the number of text nodes in `target`.
 * - Avoid calling this repeatedly on large subtrees without batching.
 */
export declare const hidePiiData: (target: Element | NodeListOf<Element>, forceResult?: string) => void;
