export interface CheckItems { elements: Array; selectors: Array; } export interface AppState { selectedElement: string | null; focusedElement: string | null; problemElements: Array; } /** * Handler for the application requesting a11y checks. If the items to be checked are null, the * entire context should be checked. */ declare type CheckHandler = (items: CheckItems | null) => void; declare type StateHandler = (data: AppState) => void; export declare class Panel { private panel?; private panelDiv; private onCheckElements; private onExternalStateChange; /** * Creates a new panel */ constructor(options: { watch: boolean; minimized: boolean; onCheckElements: CheckHandler; onExternalStateChange: StateHandler; }); /** * Passes an error report from Axe into the panel for display & processing */ reportViolations(violations: unknown): void; /** * Indicates that an element has been selected via interaction in the target page. */ elementSelected(selector: string): void; /** * Notifies the panel that DOM changes have occured */ notifyChanges(changes: Array): void; /** * Initializes the panel in an embedded iframe */ private createFramePanel; /** * Opens the embedded frame, and moves the panel into it */ private openFramePanel; private closeFramePanel; /** * Sets up all the subscriptions for the panel. * Takes the panel as an argument to guarantee we only run it after the * panel has been created. */ private setUpPanelSubscriptions; /** * Sets the style to expand or collapse the frame */ private setMinimized; /** * Opens an external window and moves the panel into it */ private openExternalPanel; } export {};