'use strict'; import {setupResponsiveness} from './toolbar/responsive.jsx'; import {setupPublish} from "./toolbar/publish.jsx"; import {setupDataOptions} from "./toolbar/data-options/DataOptions.jsx"; const previewFrame = document.getElementById('preview_frame'); const rootAttributes = { previewFrame, } setupResponsiveness(rootAttributes); setupDataOptions(rootAttributes); setupPublish(rootAttributes) window.addEventListener('message', function (e) { const RESIZE_CODE = 'resize:'; if (typeof e.data !== 'string' || !e.data.startsWith(RESIZE_CODE)) { return; } const data = JSON.parse(e.data.substring(RESIZE_CODE.length)) previewFrame.style.height = data.height + 'px'; });