Feat: lookup in context menu (#595)

* add lookup widget

* add lookup result

* refactor

* refactor

* add translate widget

* make translate widget works

* refactor locales

* typo

* remove deprecated component

* refactor lookup prompt
This commit is contained in:
an-lee
2024-05-10 11:16:38 +08:00
committed by GitHub
parent 69a6f721ca
commit 0e8de4881c
30 changed files with 597 additions and 552 deletions

View File

@@ -73,6 +73,21 @@ type EnjoyAppType = {
onNotification: (
callback: (event, notification: NotificationType) => void
) => void;
onLookup: (
callback: (
event,
selection: string,
position: { x: number; y: number }
) => void
) => void;
offLookup: () => void;
onTranslate: (
callback: (
event,
selection: string,
position: { x: number; y: number }
) => void
) => void;
shell: {
openExternal: (url: string) => Promise<void>;
openPath: (path: string) => Promise<void>;