/** * Owns the body-level backdrop lifecycle for every drawer direction. * Keeping the portal in one controller prevents side and bottom presentations * from developing separate interaction and animation rules. */ export default class SlidingContainerBackdrop { /** * @param {HTMLElement} host Element that supplies tokens, state, and event handlers. */ constructor(host: HTMLElement); host: HTMLElement; portalElement: HTMLDivElement; animation: Animation; /** * Returns whether an event target belongs to this backdrop. * @param {EventTarget|null} element Event target. * @returns {boolean} True for the shadow style source or body portal. */ owns(element: EventTarget | null): boolean; /** * Returns the portal and optionally creates it. * @param {object} options Lookup options. * @param {boolean} options.create Create the portal when missing. * @returns {HTMLElement|null} Backdrop portal. */ get({ create }?: { create: boolean; }): HTMLElement | null; /** * Creates the single viewport backdrop used by every presentation. * @returns {HTMLElement|null} Backdrop portal. */ ensure(): HTMLElement | null; /** * Removes the portal and all listeners owned by it. */ remove(): void; /** * Adds scroll blocking and optional dismiss interactions. */ addListeners(): void; /** * Removes every listener that may have been attached to the portal. */ removeListeners(): void; /** * Returns the active backdrop opacity token. * @returns {string} CSS opacity. */ getOpenOpacity(): string; /** * Resolves the portal stacking layer. * @returns {string} CSS z-index. */ getZIndex(): string; /** * Copies computed token styles from the shadow source to the body portal. */ syncStyles(): void; /** * Cancels only the animation owned by this controller. * @param {Animation|null} animation Animation to cancel. */ cancelAnimation(animation?: Animation | null): void; /** * Starts the shared backdrop transition. * @param {boolean} shouldOpen Target visibility. * @param {object} options Timing passed to the Web Animations API. * @returns {Animation|null} Started animation. */ animate(shouldOpen: boolean, options: object): Animation | null; /** * Applies a settled open or closed state. * @param {boolean} isOpen Target visibility. */ setOpen(isOpen: boolean): void; /** * Cancels animation and removes all global state. */ destroy(): void; }