import { EditorPreviewSettings, WorkspaceData } from './api'; import { Base } from '@blinkk/selective-edit/dist/mixins'; /** * Uses string literals to convert a preview server url into a full url. * * @param settings Editor preview settings. * @param workspace Workspace to generate the url for. * @returns Interpolated url for the base preview server. */ export declare function interpolatePreviewUrl(settings: EditorPreviewSettings, workspace: WorkspaceData, params?: Record, path?: string): string; /** * Uses string literals to convert a preview server url into a full url. * * Specific to for loading the settings config file. * * @param settings Editor preview settings. * @param workspace Workspace to generate the url for. * @returns Interpolated url for the base preview server. */ export declare function interpolatePreviewConfigUrl(settings: EditorPreviewSettings, workspace: WorkspaceData): any; export interface PreviewEvent { event: string; details?: any; } export interface PreviewConnectEvent extends PreviewEvent { event: 'connect'; } export declare type PreviewCommunication = PreviewConnectEvent | PreviewEvent; declare const PreviewCommunicator_base: { new (...args: any[]): { _listeners?: Record void)[]> | undefined; addListener(eventName: string, callback: (...args: any) => void): void; /** * Uses string literals to convert a preview server url into a full url. * * Specific to for loading the settings config file. * * @param settings Editor preview settings. * @param workspace Workspace to generate the url for. * @returns Interpolated url for the base preview server. */ readonly listeners: Record void)[]>; triggerListener(eventName: string, ...args: any): void; }; } & typeof Base; /** * Enable communication between the preview iframe and the editor. */ export declare class PreviewCommunicator extends PreviewCommunicator_base { iframe?: HTMLIFrameElement; queue: PreviewCommunication[]; constructor(); connect(iframe: HTMLIFrameElement): void; send(event: PreviewCommunication): void; } export {};