UNPKG

@blinkk/editor

Version:

Structured content editor with live previews.

38 lines (37 loc) 1.26 kB
import { BasePart, Part } from '..'; import { TemplateResult } from '@blinkk/selective-edit'; import { DataStorage } from '../../../utility/dataStorage'; import { DeviceData } from '../../api'; import { EditorState } from '../../state'; import { LiveEditor } from '../../editor'; export interface PreviewFrameConfig { /** * State class for working with editor state. */ state: EditorState; /** * Storage class for working with settings. */ storage: DataStorage; } interface FrameSize { height?: number; width?: number; scale: number; } export declare class PreviewFramePart extends BasePart implements Part { config: PreviewFrameConfig; container?: HTMLElement; constructor(config: PreviewFrameConfig); classesForPart(): Record<string, boolean>; /** * Get the size of the container so that the device preview can be * scaled correctly with the size of the preview area. * * This is really hacky, but unknown if there is a different way in * lit-html to get the size of parent element. */ getIframeSize(device?: DeviceData, isRotated?: boolean): FrameSize; template(editor: LiveEditor, device?: DeviceData, isRotated?: boolean): TemplateResult; } export {};