import type { PlatformView, PlatformWindow, WindowingPort } from "../platform/ports"; import type { ViewCreationOptions, ViewInfo } from "./types"; /** * Check if a WebContentsView exists and is valid. */ export declare function isValidView(view?: PlatformView): view is PlatformView; /** * Check if a WebContentsView's webContents is still alive (not destroyed). */ export declare function isViewAlive(view?: PlatformView): boolean; /** * Check if a BrowserWindow exists and is not destroyed. */ export declare function isWindowAlive(window?: PlatformWindow | null): window is PlatformWindow; /** * Get a view from the map with validation. * Throws an error if view is not found or destroyed. */ export declare function requireView(viewId: number, views: Map): ViewInfo; /** * Get a view by app ID from the map, returning the first matching view. * Throws an error if view is not found or destroyed. */ export declare function requireViewByAppId(appId: string, views: Map): { viewId: number; viewInfo: ViewInfo; }; /** * Create a new WebContentsView with standard options. */ export declare function createView(options: ViewCreationOptions, windows: WindowingPort): PlatformView; /** * Safely destroy a view and remove it from the main window. */ export declare function destroyView(viewInfo: ViewInfo, mainWindow: PlatformWindow | null): void; /** * Remove all destroyed views from a view map. * Returns the number of views cleaned up. */ export declare function cleanupDestroyedViews(views: Map): number; //# sourceMappingURL=viewLifecycle.d.ts.map