-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
3,347 additions
and
858 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
declare namespace Menu { | ||
/** | ||
* Import Electron types | ||
*/ | ||
type _MenuItemConstructorOptions = import('electron').MenuItemConstructorOptions; | ||
type _MenuItem = import('electron').MenuItem; | ||
type _BrowserWindow = import('electron').BrowserWindow; | ||
|
||
/** | ||
* Public types | ||
*/ | ||
type NativeClick = (item: _MenuItem, window: _BrowserWindow, event: Event) => void; | ||
type CutsomClick = (item: _MenuItemConstructorOptions, window: _BrowserWindow, event: Event) => void; | ||
|
||
type Params = ParamsId | ParamsAction | ParamsCommand; | ||
type MenuItem = Items.MenuName & Items.PluginItem & Items.Separator & Items.Submenu & Items.Menu & Items.StringKey; | ||
|
||
type MenuAction = { | ||
type: string; | ||
}; | ||
|
||
type PluginMenuItem = PluginMenuItemOptions & _MenuItemConstructorOptions; | ||
|
||
namespace Items { | ||
interface MenuName { | ||
type: string; | ||
key: string; | ||
string: string; | ||
plugin: string; | ||
} | ||
|
||
interface Separator { | ||
type: 'separator'; | ||
} | ||
interface Submenu { | ||
type: 'submenu' | ||
name: string; | ||
submenu: [MenuName & Separator & Submenu & Menu & PluginItem & StringKey]; | ||
} | ||
interface Menu { | ||
disabled?: boolean; | ||
type: 'run-menu-action'; | ||
menuAction: MenuAction; | ||
name: MenuName | ||
} | ||
interface PluginItem { | ||
type: 'plugin-name'; | ||
plugin: string; | ||
} | ||
interface StringKey { | ||
type: 'string-key'; | ||
string: string; | ||
} | ||
} | ||
|
||
interface PluginMenuItemOptions { | ||
pluginMenuAction?: MenuAction; | ||
} | ||
|
||
interface ParamsId { | ||
id: string; | ||
click?: NativeClick | CutsomClick | ||
} | ||
interface ParamsAction { | ||
action: string; | ||
click?: NativeClick | CutsomClick | ||
} | ||
interface ParamsCommand { | ||
command: string; | ||
click?: NativeClick | CutsomClick | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
declare namespace Extensions { | ||
interface Extension { | ||
id: number; | ||
path: string; | ||
lastKnownName: string; | ||
manifestPath: string; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
declare namespace MenuState { | ||
interface State { | ||
[name: string]: boolean; | ||
} | ||
|
||
interface MenuStateParams { | ||
actionState?: State; | ||
pluginMenuData?: Menu.MenuItem[]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
declare namespace Request { | ||
interface Responce { | ||
url: string; | ||
data: string; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
declare namespace Resources { | ||
interface File { | ||
name: string; | ||
data: Promise<string | void>; | ||
} | ||
|
||
interface Page { | ||
url: string; | ||
data: string; | ||
links: string[]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
declare namespace WepApi { | ||
interface SetPluginMenuDataProps { | ||
data: Menu.MenuItem[]; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.