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.

51 lines (50 loc) 1.31 kB
import "./chunk-5WRI5ZAA.js"; // src/light-sdk.ts var _LightLivePreviewHoC = class _LightLivePreviewHoC { static init() { if (typeof window === "undefined") { return Promise.resolve(_LightLivePreviewHoC.previewConstructors); } return _LightLivePreviewHoC.initializePreview(); } static initializePreview() { _LightLivePreviewHoC.previewConstructors = { livePreview: {}, visualBuilder: {} }; _LightLivePreviewHoC.onEntryChangeCallbacks = {}; return Promise.resolve(_LightLivePreviewHoC.previewConstructors); } static get hash() { return ""; } static get config() { return {}; } static isInitialized() { return false; } static onEntryChange(callback, config = {}) { const { skipInitialRender = false } = config; if (!skipInitialRender) { callback(); } return "live-preview-id"; } static onLiveEdit(callback) { return "live-preview-id"; } static unsubscribeOnEntryChange() { } static getSdkVersion() { return "3.4.0"; } }; _LightLivePreviewHoC.previewConstructors = {}; _LightLivePreviewHoC.onEntryChangeCallbacks = {}; var LightLivePreviewHoC = _LightLivePreviewHoC; var light_sdk_default = LightLivePreviewHoC; export { light_sdk_default as default }; //# sourceMappingURL=light-sdk.js.map