UNPKG

@reaktly-js/tone-accessibility

Version:

A vanilla JS Accessability Widget compliant with ADA and WCAG 2.2.

39 lines (38 loc) 1.04 kB
import { ToneConfig } from './types'; /** * @class Tone * @description The main class for the Tone Accessibility Widget. */ export declare class Tone { private container; private config; private i18n; private constructor(); /** * Initializes the widget. This is the new entry point. * @param options The configuration for the widget. */ static init(options?: ToneConfig): Promise<Tone | null>; /** * Builds the widget's UI after all services have been initialized. */ private buildUI; private defineCustomElements; private createWidgetContainer; /** * Dynamically adds configured components to the menu. * @param menu The menu element to add components to. */ private addConfiguredComponents; private setupEventListeners; /** * Handles a language change request for the widget's internal UI. */ private handleLanguageChange; } declare global { interface Window { Tone: typeof Tone; } } export default Tone;