import { RENDERER_SOURCE } from './protocol.js'; import type { FiberNode, DOMRectLike } from './protocol.js'; // ── Fiber hook script ───────────────────────────────────────────────────────── // This script is injected into the sandboxed iframe before the remote app // initialises. It installs a React DevTools global hook so React reports every // commit. On each commit, we walk the Fiber tree, serialize it to FiberNode[], // and postMessage the result to the host. // // The script must be self-contained (no imports) because it runs in the iframe. // We generate it as a string via buildFiberHookScript() so it can be injected // via a