import type BasePluginEvent from './BasePluginEvent'; import type { PluginEventType } from '../enum/PluginEventType'; import type { CompatiblePluginEventType } from '../compatibleEnum/PluginEventType'; /** * Data of PluginMouseUpEvent */ export interface PluginMouseUpEventData { /** * Whether this is a mouse click event (mouse up and down on the same position) */ isClicking?: boolean; } /** * Data of PluginContextMenuEvent */ export interface PluginContextMenuEventData { /** * A callback array to let editor retrieve context menu item related to this event. * Plugins can add their own getter callback to this array, * items from each getter will be separated by a splitter item represented by null */ items: any[]; } /** * Data of PluginScrollEvent */ export interface PluginScrollEventData { /** * Current scroll container that triggers this scroll event */ scrollContainer: HTMLElement; } /** * Data of PluginKeyDownEvent */ export interface PluginKeyDownEventData { /** * Whether this event is handled by edit feature */ handledByEditFeature?: boolean; } /** * A base interface of all DOM events */ export interface PluginDomEventBase extends BasePluginEvent { rawEvent: TRawEvent; } /** * This interface represents a PluginEvent wrapping native CompositionEnd event */ export interface PluginCompositionEvent extends PluginDomEventBase { } /** * This interface represents a PluginEvent wrapping native MouseDown event */ export interface PluginMouseDownEvent extends PluginDomEventBase { } /** * This interface represents a PluginEvent wrapping native MouseUp event */ export interface PluginMouseUpEvent extends PluginMouseUpEventData, PluginDomEventBase { } /** * This interface represents a PluginEvent wrapping native ContextMenu event */ export interface PluginContextMenuEvent extends PluginContextMenuEventData, PluginDomEventBase { } /** * This interface represents a PluginEvent wrapping native Mouse event */ export declare type PluginMouseEvent = PluginMouseDownEvent | PluginMouseUpEvent | PluginContextMenuEvent; /** * This interface represents a PluginEvent wrapping native KeyDown event */ export interface PluginKeyDownEvent extends PluginKeyDownEventData, PluginDomEventBase { } /** * This interface represents a PluginEvent wrapping native KeyPress event */ export interface PluginKeyPressEvent extends PluginDomEventBase { } /** * This interface represents a PluginEvent wrapping native KeyUp event */ export interface PluginKeyUpEvent extends PluginDomEventBase { } /** * The interface represents a PluginEvent wrapping native Keyboard event */ export declare type PluginKeyboardEvent = PluginKeyDownEvent | PluginKeyPressEvent | PluginKeyUpEvent; /** * This interface represents a PluginEvent wrapping native input / textinput event */ export interface PluginInputEvent extends PluginDomEventBase { } /** * This interface represents a PluginEvent wrapping native scroll event */ export interface PluginScrollEvent extends PluginScrollEventData, PluginDomEventBase { } /** * This interface represents a PluginEvent wrapping native CompositionEnd event */ export interface CompatiblePluginCompositionEvent extends PluginDomEventBase { } /** * This interface represents a PluginEvent wrapping native MouseDown event */ export interface CompatiblePluginMouseDownEvent extends PluginDomEventBase { } /** * This interface represents a PluginEvent wrapping native MouseUp event */ export interface CompatiblePluginMouseUpEvent extends PluginMouseUpEventData, PluginDomEventBase { } /** * This interface represents a PluginEvent wrapping native ContextMenu event */ export interface CompatiblePluginContextMenuEvent extends PluginContextMenuEventData, PluginDomEventBase { } /** * This interface represents a PluginEvent wrapping native Mouse event */ export declare type CompatiblePluginMouseEvent = CompatiblePluginMouseDownEvent | CompatiblePluginMouseUpEvent | CompatiblePluginContextMenuEvent; /** * This interface represents a PluginEvent wrapping native KeyDown event */ export interface CompatiblePluginKeyDownEvent extends PluginKeyDownEventData, PluginDomEventBase { } /** * This interface represents a PluginEvent wrapping native KeyPress event */ export interface CompatiblePluginKeyPressEvent extends PluginDomEventBase { } /** * This interface represents a PluginEvent wrapping native KeyUp event */ export interface CompatiblePluginKeyUpEvent extends PluginDomEventBase { } /** * The interface represents a PluginEvent wrapping native Keyboard event */ export declare type CompatiblePluginKeyboardEvent = CompatiblePluginKeyDownEvent | CompatiblePluginKeyPressEvent | CompatiblePluginKeyUpEvent; /** * This interface represents a PluginEvent wrapping native input / textinput event */ export interface CompatiblePluginInputEvent extends PluginDomEventBase { } /** * This interface represents a PluginEvent wrapping native scroll event */ export interface CompatiblePluginScrollEvent extends PluginScrollEventData, PluginDomEventBase { } /** * This represents a PluginEvent wrapping native browser event */ export declare type PluginDomEvent = PluginCompositionEvent | PluginMouseEvent | PluginKeyboardEvent | PluginInputEvent | PluginScrollEvent; /** * This represents a PluginEvent wrapping native browser event */ export declare type CompatiblePluginDomEvent = CompatiblePluginCompositionEvent | CompatiblePluginMouseEvent | CompatiblePluginKeyboardEvent | CompatiblePluginInputEvent | CompatiblePluginScrollEvent;