feat(core): add Electron runtime, services, and app composition

This commit is contained in:
2026-02-22 21:43:43 -08:00
parent 448ce03fd4
commit d3fd47f0ec
562 changed files with 69719 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import type { SecondarySubMode } from '../../types';
export function createBuildCycleSecondarySubModeMainDepsHandler(deps: {
getSecondarySubMode: () => SecondarySubMode;
setSecondarySubMode: (mode: SecondarySubMode) => void;
getLastSecondarySubToggleAtMs: () => number;
setLastSecondarySubToggleAtMs: (timestampMs: number) => void;
broadcastToOverlayWindows: (channel: string, mode: SecondarySubMode) => void;
showMpvOsd: (text: string) => void;
}) {
return () => ({
getSecondarySubMode: () => deps.getSecondarySubMode(),
setSecondarySubMode: (mode: SecondarySubMode) => deps.setSecondarySubMode(mode),
getLastSecondarySubToggleAtMs: () => deps.getLastSecondarySubToggleAtMs(),
setLastSecondarySubToggleAtMs: (timestampMs: number) =>
deps.setLastSecondarySubToggleAtMs(timestampMs),
broadcastSecondarySubMode: (mode: SecondarySubMode) =>
deps.broadcastToOverlayWindows('secondary-subtitle:mode', mode),
showMpvOsd: (text: string) => deps.showMpvOsd(text),
});
}