import { EDITOR_METHODS, FRAME_EVENTS, type PluginFrameTheme } from './plugin-frame-bridge' import { PLUGIN_ERROR_CODES, PLUGIN_PROTOCOL_VERSION } from './plugin-protocol' import { PLUGIN_DECLARATIVE_POST_GLOBAL, PLUGIN_FRAME_TRANSPORT_GLOBAL } from './plugin-frame-guest' import { PLUGIN_HOST_API_MAJOR } from '../workers/plugin-host-api-major' import { PLUGIN_FRAME_FACADES_SCRIPT } from './plugin-panel-shell-facades' import { PLUGIN_FRAME_DOCUMENT_SCRIPT } from './plugin-panel-shell-document' import { PLUGIN_FRAME_USER_METHODS, pluginFrameMethodsFor, pluginHostApiMinorFor } from '../workers/plugin-host-api' /** Prepend CSP before any untrusted panel HTML: opaque origins alone still permit CORS fetch/beacons. Parsed CSP survives * DOM removal and later CSP can only tighten it. Open head/html exposes design tokens to plugin CSS. * Shared Electron-free builder keeps desktop and serve wrapping identical. */ // Residuals below apply only to the srcdoc iframe that browser clients (serve/web) still use; // desktop frames are isolated guests (buildPluginGuestShellHtml, plugin-isolated-frames.md). // Residual shared with doc preview: Electron 43 resolves `` outside CSP // and session hooks, so DNS labels can still leak. // Residual WebRTC channel: the prelude removes RTCPeerConnection from the panel window only. A // child `