export declare function createElement(tag: K, attrs?: Record, cssText?: string): HTMLElementTagNameMap[K]; export declare function createDiv(className?: string, cssText?: string): HTMLDivElement; export declare function setStyles(el: HTMLElement, styles: Partial): void; export declare function clearChildren(el: HTMLElement): void; export declare function replaceChildren(el: HTMLElement, ...children: Node[]): void; /** * Brings `parent`'s children into exactly the order given, reusing the nodes * that are already there. * * The alternative — clearing `innerHTML` and re-appending — discards every * element and forces the browser to re-parse, re-style, and re-lay-out the whole * subtree even when the only change was one element moving one slot. During a * column drag that difference is the whole cost: a live cross-panel move rewrites * the column order under the pointer, and rebuilding every header cell for it is * what makes a wide grid stutter and visibly reshuffle. Reordering in place also * preserves each element's identity, so listeners, classes, focus, and in-flight * CSS transitions survive. * * Nodes present in `parent` but absent from `desired` are removed; nodes in * `desired` that are not yet children are inserted. Callers own element * creation and caching — this function never builds anything. * * Complexity: O(existing + desired). A single moved element costs one * `insertBefore`; an unchanged list costs zero DOM mutations. * * @param parent - Element whose children are being reconciled. * @param desired - The exact children `parent` should end up with, in order. * Must not contain duplicates. */ export declare function reconcileChildren(parent: HTMLElement, desired: readonly Node[]): void; export declare function addClasses(el: HTMLElement, ...classes: string[]): void; export declare function removeClasses(el: HTMLElement, ...classes: string[]): void; export declare function toggleClass(el: HTMLElement, cls: string, condition: boolean): void; export declare function getScrollbarWidth(): number; export declare function measureTextWidth(text: string, font: string): number; export declare function clamp(value: number, min: number, max: number): number; export declare function getElementOffset(el: HTMLElement): { top: number; left: number; }; export declare function isScrolledIntoView(el: HTMLElement, container: HTMLElement): boolean; export declare function scrollIntoViewIfNeeded(el: HTMLElement, container: HTMLElement): void; export declare function debounce void>(fn: T, delay: number): (...args: Parameters) => void; export declare function throttle void>(fn: T, interval: number): (...args: Parameters) => void; export declare function raf(fn: () => void): () => void; export declare function rafLoop(fn: (dt: number) => void): () => void; //# sourceMappingURL=dom-utils.d.ts.map