@contentstack/live-preview-utils
Version:
Contentstack provides the Live Preview SDK to establish a communication channel between the various Contentstack SDKs and your website, transmitting live changes to the preview pane.
33 lines (30 loc) • 1 kB
TypeScript
import { Signal } from '@preact/signals';
interface VisualBuilderGlobalStateImpl {
previousSelectedEditableDOM: HTMLElement | Element | null;
previousHoveredTargetDOM: Element | null;
previousEmptyBlockParents: Element[] | [];
focusFieldValue: string | null;
focusFieldReceivedInput: boolean;
audienceMode: boolean;
locale: string;
variant: string | null;
focusElementObserver: MutationObserver | null;
referenceParentMap: Record<string, string>;
isFocussed: boolean;
}
declare class VisualBuilder {
private customCursor;
private overlayWrapper;
private visualBuilderContainer;
private focusedToolbar;
static VisualBuilderGlobalState: Signal<VisualBuilderGlobalStateImpl>;
private handlePositionChange;
private scrollEventHandler;
private resizeEventHandler;
private resizeObserver;
private mutationObserver;
private threadMutationObserver;
constructor();
destroy: () => void;
}
export { VisualBuilder };