import 'jsdom-global/register'; import { DomElement, Optional } from '../../typings/standard-types'; export declare namespace Browsers { interface StyledProps { theme: any; } interface TagStyleProps { color: string; } const validate: (evt: any) => void; const storeLocation: (position: any) => { latitude: number; longitude: number; }; const errorHandler: (err: any) => void; const getLocation: () => void; type OsNameOptions = 'windows' | 'macos' | 'unix' | 'linux' | 'unknown'; const borderColor: ({ theme }: StyledProps) => string; const border: ({ theme }: StyledProps) => string; const borderBottom: ({ theme }: StyledProps) => string; const borderTop: ({ theme }: StyledProps) => string; const borderLeft: ({ theme }: StyledProps) => string; const borderRight: ({ theme }: StyledProps) => string; const noteListIconColor: ({ theme }: StyledProps) => string; const noteDetailIconColor: ({ theme }: StyledProps) => string; const closeIconColor: ({ theme }: StyledProps) => string; const inputStyle: ({ theme }: StyledProps) => string; const tagBackgroundColor: ({ theme, color }: StyledProps & TagStyleProps) => string; const textOverflow: () => string; const flexCenter: () => string; const contextMenuShadow: ({ theme }: StyledProps) => string; const $: (selector: K, doc?: Document) => Optional; const $$: (selector: K, doc?: Document) => NodeListOf; const init: void; const clearAllChildren: (elem: Node) => void; /** * let supportsSlider = supportsInputOfType('range'); * let supportsColorpicker = supportsInputOfType('color'); * @param type */ const supportsInputOfType: (type: string) => boolean; const supportsNativeJSON: () => boolean; const changeParamValue: (param: string, value: any) => void; const getElementsByClass: (searchClass: string, node: any, tag: string) => T[]; const byId: (elem: any) => Optional; /** * Returns the property with the correct vendor prefix appended. * @param {String} property the property name * @returns {String} the property with the correct prefix or null if not * supported. */ const getCssPropertyWithVendorPrefix: (property: string) => string; /** * Gets the position of the mouse on the screen for a given event. * @function * @param {Event} [event] */ const getMousePosition: (event: any) => { x: number; y: number; }; /** * Creates specified element with specified attributes * @param {String} name Type of an element to create * @param {Object} [attrs] Attributes to set on an element * @return {HTMLElement} Newly created element */ const makeElement: (name: string, ...attrs: any[]) => HTMLElement; /** * Wraps element with another element * @param {HTMLElement} element Element to wrap * @param {HTMLElement|String} wrapper Element to wrap with * @param {Object} [attributes] Attributes to set on a wrapper * @return {HTMLElement} wrapper */ const wrapElement: (element: T, wrapper: any, ...attributes: any[]) => void; const createDiv: (html: string) => DomElement; const getElemText: (elem: T) => string; const getBodyScrollTop: () => number; const sortUnorderedList: (id: any, sortDescending?: boolean) => void; const replaceUrlWithHtmlLinks: (text: string, title?: string) => string; const firstAncestor: (elem: T, tagName: string) => T; const toggle: (elem: T) => void; const testKey: (e: T) => boolean; const elem2span: (elem: T) => void; const getElementsByAttribute: (elem: T, att: string, value: any) => T[]; const fade: (elem: T, period: number) => void; const eventuality: (that: any) => void; const cleanNode: (elem: T) => void; const getOffset: (elem: T) => { top; left; }; const getElementBounds: (elem: T) => { left: number; top: number; width: number; height: number; }; const getElements: (...args: any[]) => any; const textContent: (elem: T) => string; const insertAt: (parent: T, child: T, num: number) => void; const rowHeights: (rows: CSSStyleDeclaration[][]) => number[]; const colWidths: (rows: CSSStyleDeclaration[][]) => number[]; const drawTable: (rows: CSSStyleDeclaration[][]) => string; const hasPlugin: (name: string) => boolean; const tag: (name: string, elem: Element) => any; const addClass: (obj: any, clazz: string) => void; const removeClass: (obj: any, clazz: string) => void; /** * Remove the specified CSS class from the element. * @function * @param elementId element id * @param {String} className */ const removeClass2: (elementId: string, className: string) => void; const findById: (id: string) => Optional; const isIdExists: (id: string) => boolean; const findBy: (id: string, el: K) => Optional>; const getAnchorFromURI: (uri: string) => string; const hasClass: (name: string, type: any) => HTMLElementTagNameMap[]; const attr: (elem: any, name: string, value: string) => Optional; const create: (elem: string) => HTMLElement; const getStyle: (elem: any, name: string) => Optional; const pageX: (elem: any) => any; const pageY: (elem: any) => any; const parentX: (elem: any) => any; const parentY: (elem: any) => any; const posX: (elem: any) => Optional; const posY: (elem: any) => Optional; const setX: (elem: any, pos: number) => void; const setY: (elem: any, pos: number) => void; const getHeight: (elem: any) => Optional; const getWidth: (elem: any) => Optional; const resetCSS: (elem: any, prop: any) => any; const fullHeight: (elem: any) => number; const fullWidth: (elem: any) => number; const setOpacity: (elem: any, level: any) => void; const getX: (e: any) => number; const getY: (e: any) => number; const pageHeight: () => number; const pageWidth: () => number; const scrollX: () => number; const scrollY: () => number; const windowHeight: () => number; const windowWidth: () => number; const restoreCSS: (elem: any, prop: any) => void; const hasAttribute: (elem: Element, name: string) => boolean; /** * Helper for making Elements with attributes * * @param {string} tagName - new Element tag name * @param {Array|string} classNames - list or name of CSS classname(s) * @param {object} attributes - any attributes * @returns {Element} */ const make: (tagName: K, classNames?: string[], attributes?: {}) => any; /** * True if the browser supports the HTML5 canvas element * @member {Boolean} supportsCanvas */ const supportsCanvas: boolean; /** * True if the browser supports the EventTarget.addEventListener() method * @member {Boolean} supportsAddEventListener */ const supportsAddEventListener: boolean; /** * True if the browser supports the EventTarget.removeEventListener() method * @member {Boolean} supportsRemoveEventListener */ const supportsRemoveEventListener: boolean; /** * Test whether the submitted canvas is tainted or not. * @argument {Canvas} canvas The canvas to test. * @returns {Boolean} True if the canvas is tainted. */ const isCanvasTainted: (canvas: any) => boolean; /** * A ratio comparing the device screen's pixel density to the canvas's backing store pixel density, * clamped to a minimum of 1. Defaults to 1 if canvas isn't supported by the browser. * @member {Number} pixelDensityRatio * @memberof OpenSeadragon */ const pixelDensityRatio: number; const isIOSDevice: () => boolean; const cssStyleLinkGenerator: (href: string) => string; const cssStyleTagGenerator: (content: string) => string; const getPrintStyleForExports: () => string; const getOsName: () => OsNameOptions; const wrapContentInThemeHtml: (content: string, generalThemeName: string) => string; const isInternalLink: (link: string) => boolean; const combineHtmlElementsIntoHtmlDocumentString: (bodyContent: string, css?: string | undefined, htmlMeta?: string | undefined) => string; const autolink: (data: string) => string; const isChildNode: (parent?: Optional, child?: Optional) => boolean; } //# sourceMappingURL=browsers.d.ts.map