import { protocol } from "@codesandbox/pitcher-client";
import { SandboxBrowserSession } from "./types";
import { WebSocketSession } from "./sessions/WebSocketSession";
export * from "./sessions/WebSocketSession";
export { createPreview, Preview } from "./previews";
/**
 * Connect to a Sandbox from the browser and automatically reconnect. `getSession` requires and endpoint that resumes the Sandbox. `onFocusChange` can be used to notify when a reconnect should happen.
 */
export declare function connectToSandbox(options: {
    session: SandboxBrowserSession;
    getSession: (id: string) => Promise<SandboxBrowserSession>;
    onFocusChange?: (cb: (isFocused: boolean) => void) => () => void;
    initStatusCb?: (event: protocol.system.InitStatus) => void;
}): Promise<WebSocketSession>;
