import type { PaneRuntimeState } from "../core/state/app/state"; import type { AppConfig } from "./config"; export interface DesktopSharedStateSnapshot { config: AppConfig; paneState: Record; focusedPaneId: string | null; activePanel: "left" | "right"; statusBarVisible: boolean; mainStateRevision?: number; layoutChanged?: boolean; } export interface DesktopDockPreviewState { paneId: string | null; edge: "left" | "right" | "top" | "bottom" | null; } export interface DesktopThemePreviewState { theme: string | null; } export interface DesktopWindowBridge { kind: "main" | "detached"; paneId?: string; syncMainState?(snapshot: DesktopSharedStateSnapshot): Promise; syncThemePreview?(preview: DesktopThemePreviewState): Promise; replaceDetachedPaneState?(paneId: string, paneState: PaneRuntimeState): Promise; popOutPane?(paneId: string): Promise; dockDetachedPane?(paneId: string): Promise; closeDetachedPane?(paneId: string): Promise; focusDetachedPane?(paneId: string): Promise; subscribeState(listener: (snapshot: DesktopSharedStateSnapshot) => void): () => void; subscribeDockPreview?(listener: (preview: DesktopDockPreviewState) => void): () => void; subscribeThemePreview?(listener: (preview: DesktopThemePreviewState) => void): () => void; }