2022-03-28 13:25:05 +00:00
|
|
|
export type AppEvent = "page:click" | "editor:complete";
|
2022-03-20 08:56:28 +00:00
|
|
|
|
|
|
|
export type ClickEvent = {
|
2022-03-28 13:25:05 +00:00
|
|
|
page: string;
|
2022-03-20 08:56:28 +00:00
|
|
|
pos: number;
|
|
|
|
metaKey: boolean;
|
|
|
|
ctrlKey: boolean;
|
|
|
|
altKey: boolean;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type IndexEvent = {
|
|
|
|
name: string;
|
|
|
|
text: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
export interface AppEventDispatcher {
|
2022-03-29 10:13:46 +00:00
|
|
|
dispatchAppEvent(name: AppEvent, data?: any): Promise<void>;
|
2022-03-20 08:56:28 +00:00
|
|
|
}
|