/** * adowire client — adowire:loading directive * * Manages visibility, class, and attribute changes on elements that carry one * of the following attribute forms while a server round-trip is in-flight: * * adowire:loading — hidden by default; shown while loading * adowire:loading.remove — shown by default; hidden while loading * adowire:loading.class="x" — class "x" added while loading * adowire:loading.class.remove="x" — class "x" removed while loading * adowire:loading.attr="disabled" — attribute set while loading, removed after * * The modifier is encoded in the attribute *name* itself (same convention as * Livewire's wire:loading), so each variant requires its own attribute-presence * check and querySelectorAll selector. * * Public API * ────────── * initLoading() — call once at boot; hides all plain adowire:loading elements * applyLoading() — call when a request starts * removeLoading() — call when a request ends (in a finally block) */ /** * Apply the default hidden state to every plain `adowire:loading` element. * * Must be called once during page bootstrap (before the first user interaction) * so that loading indicators are invisible at rest. It is safe to call again * after a full-page navigation re-runs the bootstrap sequence. */ export declare function initLoading(): void; /** * Transition every `adowire:loading*` element into the *loading* state. * * Called at the beginning of each server round-trip. * * - `adowire:loading` → reveal (remove `display:none`) * - `adowire:loading.remove` → conceal (add `display:none`) * - `adowire:loading.class="x"` → add class(es) `x` * - `adowire:loading.class.remove="x"` → remove class(es) `x` * - `adowire:loading.attr="x"` → set attribute `x` (with empty value) */ export declare function applyLoading(): void; /** * Transition every `adowire:loading*` element back to the *idle* state. * * Called in the `finally` block of each server round-trip so it runs whether * the request succeeded or failed. Exactly reverses every change made by * {@link applyLoading}. * * - `adowire:loading` → re-conceal (restore `display:none`) * - `adowire:loading.remove` → re-reveal (remove `display:none`) * - `adowire:loading.class="x"` → remove class(es) `x` * - `adowire:loading.class.remove="x"` → re-add class(es) `x` * - `adowire:loading.attr="x"` → remove attribute `x` */ export declare function removeLoading(): void;