import Async from "typescene-async"; import Style from "./Style"; import { Component } from "./"; /** Static class that manages the available (fixed) screen space in the browser window */ export declare abstract class Screen { static SHADE_OPACITY: number; static SHADE_GRADIENT_CENTER: number; static SHADE_BLUR: number; static SHADE_TRANSITION_SEC: number; /** "Extra small" horizontal root width in pixels, default 550 */ static EXTRASMALL_WIDTH: number; /** "Small" horizontal root width in pixels, default 720 */ static SMALL_WIDTH: number; /** "Large" horizontal root width in pixels, default 960 */ static LARGE_WIDTH: number; /** "Extra large" horizontal root width in pixels, default 1200 */ static EXTRALARGE_WIDTH: number; /** Number of pixels available on horizontal axis (observable) */ static width: number; /** Number of pixels available on vertical axis (observable) */ static height: number; /** True if root width is less than EXTRASMALL_WIDTH; (screen root element also has class "UI-Screen-ExtraSmall") Note that this also implies that .isSmall is true */ static isExtraSmall: boolean; /** True if horizontal resolution is less than SMALL_WIDTH; (screen root element also has class "UI-Screen-Small") */ static isSmall: boolean; /** True if horizontal resolution is LARGE_WIDTH or above; (screen root element also has class "UI-Screen-Large") */ static isLarge: boolean; /** True if horizontal resolution is EXTRALARGE_WIDTH or above; (screen root element also has class "UI-Screen-ExtraLarge") Note that this also implies that .isLarge is true */ static isExtraLarge: boolean; /** True if display stack is empty (observable) */ static isBlank: boolean; /** True if any containers are displayed as modals (observable) */ static isModalDisplayed: boolean; /** Encapsulation of screen container style */ static style: Style; /** Promise that resolves to true when ready to display the UI */ static ready: Async.Promise; /** Display a component on top of other content; positioning parameters are used if given, otherwise component is centered or displayed full screen (for non-container components, font sizes need to be set manually) */ static display(component: Component | PromiseLike, options?: { escHandler?: () => void; modal?: boolean; shade?: boolean; vertAlign?: string; horzAlign?: string; margin?: string; keyDownHandler?: (KeyboardEvent) => void; stayOnTop?: boolean; }): void; /** Returns true if given component is currently displayed on screen */ static isDisplayed(component: Component): boolean; /** Remove the given container (previously passed to display*), and stop observing its rendering output; if second argument is true, does not immediately remove the DOM element but waits for next screen update (e.g. to display another container) */ static remove(component: Component | PromiseLike, noDOMUpdate?: boolean): void; /** Remove modal container(s) on top; does not invoke escHandler callbacks */ static closeModal(closeAll?: boolean): void; /** Remove all containers to clear the screen; if second argument is true, does not immediately remove the DOM elements but waits for next screen update (e.g. to display another container) */ static clear(noDOMUpdate?: boolean): void; /** (Try to) block input on screen until given promise is resolved, OR until another component is displayed */ static blockAll(promise?: PromiseLike): void; /** Update all child elements of the fixed screen element */ private static _update(noDOMUpdate?); /** Helper to create an observer for given component, or a new wrapper around given modal component */ private static _layerElement(component, options); /** Fade in modal shade (and cancel previous fade out) */ private static _fadeShadeIn(); /** Fade out modal shade and remove it (unless put back by later update) */ private static _fadeShadeOut(); /** Static initializer called when the DOM is ready */ private static _init(resolve); private static _pendingUpdate; private static _domStateData; private static _screen; private static _shade; private static _shadeFadeTimer; private static _stack; constructor(); } export default Screen;