import { MockMediaQueryList } from './mocks'; import type { MediaValues } from './types'; /** * Static class for working with the mocked media state. * * After calling `mockMatchMedia`, each MediaQueryList that is created via * `window.matchMedia` is enrolled in the static #observers array on this class. * * Values for the current media state are represented as a single object with * features as keys and their values, e.g. `{ width: '1000px' }`. When a value * is changed, those changes are evaluated to determine whether an observer * should be notified. */ export declare class MediaState { #private; /** * Given a media query, evaluates whether the current environment matches. */ static evaluate(query: string): boolean; /** * Whenever a new MediaQueryList is created, parse its media query for * recognizable features, e.g. width, height, orientation, and format it * into the MediaQueryObserver shape in order to easily determine whether it * needs to be notified when a media value changes. */ static observe: (mediaQueryList: MockMediaQueryList) => void; /** * Set media value(s) and notify all observers that are potentially subscribed * to changes in queried features. */ static setValue: (values: MediaValues) => void; /** * Ultimately exported as `clearMedia`. */ static reset: () => void; }