// Theme bridge for plugin slot iframes. // // Slot iframes run with an opaque ("null") origin, so they can't load the // host's globals.css or web fonts cross-origin (see app/(sandbox)/layout.tsx). // The result: plugin slot UIs fall back to the UA default serif font and have // no knowledge of the host's light/dark (or custom) theme. // // To fix that without any cross-origin asset fetch, the host snapshots the // *resolved* theme — the computed `--color-*` token values, the resolved // font-family (which is a pure system-font stack, so no fetch is needed), and // whether dark mode is active — and ships it across the postMessage bridge. // The sandbox runtime replays the snapshot as an injected