import { ElementHelper } from '../helpers'; import { AnyArenaNode, ArenaKeyboardEvent, NodeAttributes } from '../interfaces'; import { ArenaServiceManager } from './ArenaServiceManager'; declare type ArenaChangeAttribute = CustomEvent<{ attrs: NodeAttributes; target: HTMLElement; stopRender?: boolean; node?: AnyArenaNode; }>; declare type ArenaCustomEvent = CustomEvent; export declare type ArenaRemoveEvent = CustomEvent<{ node: AnyArenaNode; }>; declare global { interface GlobalEventHandlersEventMap { 'arena-change-attribute': ArenaChangeAttribute; 'arena-custom-event': ArenaCustomEvent; 'arena-remove-event': ArenaRemoveEvent; 'beforeinput': InputEvent; } } export declare class ArenaBrowser { protected asm: ArenaServiceManager; protected inputListenerInstance: ((e: Event) => void); protected beforeinputListenerInstance: ((e: InputEvent) => void); protected compositionstartListenerInstance: ((e: CompositionEvent) => void); protected compositionupdateListenerInstance: ((e: CompositionEvent) => void); protected compositionendListenerInstance: ((e: CompositionEvent) => void); protected mouseUpListenerInstance: ((e: MouseEvent) => void); protected keyUpListenerInstance: ((e: KeyboardEvent) => void); protected keyPressListenerInstance: ((e: KeyboardEvent) => void); protected keyDownListenerInstance: ((e: KeyboardEvent) => void); protected selectListenerInstance: ((e: Event) => void); protected copyListenerInstance: ((event: ClipboardEvent) => void); protected pasteListenerInstance: ((event: ClipboardEvent) => void); protected focusListenerInstance: ((event: FocusEvent) => void); protected dropListenerInstance: ((event: DragEvent) => void); protected changeAttributeListenerInstance: ((event: ArenaChangeAttribute) => void); protected arenaCustomEventListenerInstance: ((event: ArenaCustomEvent) => void); protected arenaRemoveEventListenerInstance: ((event: ArenaRemoveEvent) => void); protected lastSelectionStatus: boolean; protected lastSelectionRange: Range | undefined; protected editor: ElementHelper; constructor(asm: ArenaServiceManager); getModifiersSum(e: KeyboardEvent): number; isModificationEvent(e: KeyboardEvent): boolean; /** * In FF pressing ctrl + A selects root container for textarena * the div.textarena-editor contenteditable. And content deletion * does not work. So here we use a hack to change the selection * to all children. */ protected changeSelectionToChildren(s: Selection): void; protected checkSelection(): void; protected checkKeyboardEvent(prefix: string, e: KeyboardEvent): ArenaKeyboardEvent | undefined; protected beforeinputListener(e: InputEvent): void; protected inputListener(e: Event): void; protected compositionstartListener(e: CompositionEvent): void; protected compositionupdateListener(e: CompositionEvent): void; protected compositionendListener(e: CompositionEvent): void; protected mouseUpListener(e: MouseEvent): void; protected keyUpListener(e: KeyboardEvent): void; protected keyPressListener(e: KeyboardEvent): void; keyDownListener(e: KeyboardEvent): void; protected copyListener(e: ClipboardEvent): void; protected pasteListener(e: ClipboardEvent): void; protected focusListener(e: FocusEvent): void; protected selectListener(e: Event): void; protected dropListener(e: DragEvent): void; protected getIdOfTarget(target: HTMLElement): string | undefined; protected changeAttributeListener(e: ArenaChangeAttribute): void; protected arenaCustomEventListener(e: ArenaCustomEvent): void; private resetCursor; protected arenaRemoveEventListener({ detail: { node } }: ArenaRemoveEvent): void; } export {};