UNPKG

@digital-nature-ltd/carbon-lite

Version:

A simple tool to reduce the carbon usage of your website by blanking out the screen after a period of inactivity

31 lines (30 loc) 1.12 kB
import { CarbonLiteMessage } from './elements/CarbonLiteMessage'; import { CarbonLiteElement } from './elements/CarbonLiteElement'; import { CarbonLiteConfig } from './config/CarbonLiteConfig'; export default class CarbonLite { initialised: boolean; ignoreInteractions: boolean; carbonLite: CarbonLiteElement; carbonLiteMessage: CarbonLiteMessage; carbonLiteTimer: ReturnType<typeof setTimeout> | undefined; carbonLiteMessageTimer: ReturnType<typeof setTimeout> | undefined; config: CarbonLiteConfig; configure(configuration: object): void; debug(message: string): void; init(configuration?: CarbonLiteConfig | null): void; generateStyles(): string; getIframes(): HTMLIFrameElement[]; addGlobalEventListener(eventType: string): void; addEventListeners(): void; addVideoEventListeners(): void; restartTimer(): void; userInteracted(): void; suspend(): void; backgroundIsVisible(): boolean; messageIsVisible(): boolean; resume(): void; hideBackground(): void; hideMessage(): void; fadeOutMessage(): void; open(): void; }