mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-10 04:46:07 -08:00
feat(plugins): add JavaScript plugin system with overlay panel (#303)
This commit is contained in:
1 parent
90fc7cf940
commit
a9a4c4f083
110 files changed
+5897
-344
No files matched your search
+16
-2
@@ -388,6 +388,13 @@ export interface ConfigHotReloadPayload {
|
||||
secondarySubMode: SecondarySubMode;
|
||||
}
|
||||
|
||||
/** Content of the shared plugin panel. `panelId` changes each time a plugin opens a new panel. */
|
||||
export interface PluginPanelSnapshot {
|
||||
panelId: number;
|
||||
title: string;
|
||||
markdown: string;
|
||||
}
|
||||
|
||||
export interface SessionActionDispatchRequest {
|
||||
actionId: SessionActionId;
|
||||
payload?: SessionActionPayload;
|
||||
@@ -538,6 +545,9 @@ export interface ElectronAPI {
|
||||
onOpenSessionHelp: (callback: (payload: SessionHelpOpenPayload) => void) => void;
|
||||
onOpenChangelog: (callback: () => void) => void;
|
||||
getChangelogSnapshot: (options?: { refresh?: boolean }) => Promise<ChangelogSnapshot>;
|
||||
onOpenPluginPanel: (callback: (snapshot: PluginPanelSnapshot) => void) => void;
|
||||
onPluginPanelUpdate: (callback: (snapshot: PluginPanelSnapshot) => void) => void;
|
||||
onPluginPanelClose: (callback: (panelId: number) => void) => void;
|
||||
onOpenControllerSelect: (callback: () => void) => void;
|
||||
onOpenControllerDebug: (callback: () => void) => void;
|
||||
onOpenJimaku: (callback: () => void) => void;
|
||||
@@ -615,7 +625,10 @@ export interface ElectronAPI {
|
||||
| 'subtitle-sidebar'
|
||||
| 'session-help'
|
||||
| 'character-dictionary'
|
||||
| 'changelog',
|
||||
| 'changelog'
|
||||
| 'plugin-panel',
|
||||
/** Which instance closed, for modals that swap content in place (the plugin panel's id). */
|
||||
instanceId?: number,
|
||||
) => void;
|
||||
notifyOverlayModalOpened: (
|
||||
modal:
|
||||
@@ -634,7 +647,8 @@ export interface ElectronAPI {
|
||||
| 'subtitle-sidebar'
|
||||
| 'session-help'
|
||||
| 'character-dictionary'
|
||||
| 'changelog',
|
||||
| 'changelog'
|
||||
| 'plugin-panel',
|
||||
) => void;
|
||||
reportOverlayContentBounds: (measurement: OverlayContentMeasurement) => void;
|
||||
onSessionBindingsChanged: (callback: (bindings: CompiledSessionBinding[]) => void) => void;
|
||||
|
||||
Reference in new issue
Block a user