feat(plugins): add JavaScript plugin system with overlay panel (#303)

This commit is contained in:
sudacode authored and GitHub committed 2026-10-31 19:09:54 -07:00
1 parent 90fc7cf940
commit a9a4c4f083
110 files changed
+5897 -344

No files matched your search

+9
View File
@@ -142,6 +142,13 @@ export interface RawShortcutsConfig extends ShortcutsConfig {
export type DictionaryBackend = 'yomitan' | 'hachidori';
/** One `plugins.<id>` entry; the id names the directory under `<config dir>/plugins/`. */
export interface PluginConfig {
enabled?: boolean;
/** Passed to the plugin as `ctx.settings`. */
settings?: Record<string, unknown>;
}
export interface Config {
dictionaryBackend?: DictionaryBackend;
subtitlePosition?: SubtitlePosition;
@@ -176,6 +183,7 @@ export interface Config {
stats?: StatsConfig;
updates?: UpdatesConfig;
notifications?: NotificationsConfig;
plugins?: Record<string, PluginConfig>;
logging?: {
level?: 'debug' | 'info' | 'warn' | 'error';
rotation?: LogRotation;
@@ -427,6 +435,7 @@ export interface ResolvedConfig {
};
updates: Required<UpdatesConfig>;
notifications: Required<NotificationsConfig>;
plugins: Record<string, Required<PluginConfig>>;
logging: {
level: 'debug' | 'info' | 'warn' | 'error';
rotation: LogRotation;