import * as plugins from './domtools.plugins.js'; import { type TViewport } from './domtools.css.breakpoints.js'; import { Scroller } from './domtools.classes.scroller.js'; import { WebSetup } from '@push.rocks/websetup'; import { ThemeManager } from './domtools.classes.thememanager.js'; import { Keyboard } from './domtools.classes.keyboard.js'; declare global { var deesDomTools: DomTools | undefined; } export interface IDomToolsState { virtualViewport: TViewport; jwt: string; } export interface IDomToolsContructorOptions { ignoreGlobal?: boolean; } export declare class DomTools { private static initializationPromise; /** * setups domtools */ static setupDomTools(optionsArg?: IDomToolsContructorOptions): Promise; /** * if you can, use the static asysnc .setupDomTools() function instead since it is safer to use. */ static getGlobalDomToolsSync(): DomTools; elements: { headElement: HTMLElement | null; bodyElement: HTMLElement | null; }; websetup: WebSetup; smartstate: plugins.smartstate.Smartstate; domToolsStatePart: Promise>; router: plugins.smartrouter.SmartRouter; convenience: { typedrequest: typeof plugins.typedrequest; smartdelay: typeof plugins.smartdelay; smartjson: typeof plugins.smartjson; smarturl: typeof plugins.smarturl; }; deesComms: plugins.deesComms.DeesComms; scroller: Scroller; themeManager: ThemeManager; keyboard: Keyboard | null; disposed: boolean; domToolsReady: plugins.smartpromise.Deferred; domReady: plugins.smartpromise.Deferred; globalStylesReady: plugins.smartpromise.Deferred; private readonly initializationPromise; private readonly managedDomNodes; private readonly readyStateChangedFunc; constructor(optionsArg: IDomToolsContructorOptions); private runOncePromiseMap; private initialize; private tryMarkDomReady; private trackManagedDomNode; private getHeadOrBodyElement; /** * run a function once and always get the Promise of the first execution * @param identifierArg the indentifier arg identifies functions. functions with the same identifier are considered equal * @param funcArg the actual func arg to run */ runOnce(identifierArg: string, funcArg: () => Promise): Promise; /** * allows to set global styles * @param stylesText the css text you want to set */ setGlobalStyles(stylesText: string): Promise; /** * allows to set global styles * @param stylesText the css text you want to set */ setExternalScript(scriptLinkArg: string): Promise; /** * allows setting external css files * @param cssLinkArg a url to an external stylesheet */ setExternalCss(cssLinkArg: string): Promise; /** * allows setting of website infos * @param optionsArg the website info */ setWebsiteInfo(optionsArg: plugins.websetup.IWebSetupConstructorOptions): Promise; dispose(): void; }