UNPKG

@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.

15 lines (12 loc) 684 B
import { CslpData } from '../../cslp/types/cslp.types.js'; import { VisualBuilderCslpEventDetails } from '../types/visualBuilder.types.js'; /** * Returns the CSLP data of the closest ancestor element with a `data-cslp` attribute * to the target element of a mouse event. * @param event - The mouse event. * @returns The CSLP data of the closest ancestor element with a `data-cslp` attribute, * along with metadata and schema information for the corresponding field. */ declare function getCsDataOfElement(event: MouseEvent): VisualBuilderCslpEventDetails | undefined; declare function getDOMEditStack(ele: Element): CslpData[]; export { getCsDataOfElement, getDOMEditStack };