/** * The **Toast Container** — owns the fixed, viewport-level layer and the six * per-position stacking regions that toasts mount into. Regions are created * lazily (a page that only ever shows bottom-right toasts allocates one region) * and the layer itself is `pointer-events: none` so it never blocks the app; * only the individual toasts re-enable pointer events. * * Insertion order places the newest toast nearest its docked edge (top regions * grow downward, bottom regions grow upward), configurable via `newestOnTop`. * All positioning/spacing is theme-driven CSS (`toast.css.ts`); this class only * sets the gap custom property. * * @packageDocumentation */ import { ToastPosition } from './toast.types'; /** Manages the toast layer and its per-position regions. */ export declare class ToastContainer { private readonly host; private gap; private newestOnTop; private layerEl; private readonly regions; /** * @param host - The element the layer is appended to (default `document.body`). * @param gap - Gap between stacked toasts, in px. * @param newestOnTop - Render the newest toast nearest its docked edge. */ constructor(host: HTMLElement, gap: number, newestOnTop: boolean); /** Updates the inter-toast gap (applied via a CSS custom property). */ setGap(gap: number): void; /** Updates the newest-on-top ordering policy for subsequent mounts. */ setNewestOnTop(value: boolean): void; /** Lazily creates the viewport layer. */ private ensureLayer; /** Lazily creates the region for a position. */ private ensureRegion; /** * Mounts a toast element at a position, ordered so the newest sits nearest the * docked edge. * * @param position - The docked position. * @param el - The toast root element. */ mount(position: ToastPosition, el: HTMLElement): void; /** * Removes a toast element from the DOM. * * @param el - The toast root element. */ unmount(el: HTMLElement): void; /** Removes the layer and all regions. */ destroy(): void; } //# sourceMappingURL=toast-container.d.ts.map