Releases: eduard-un/divi-react-scan
Release list
v2.1.0
First tagged release. Runs React Scan inside the Divi 5 Visual Builder.
One instance, both React trees
The Visual Builder renders in two same-origin documents — the builder UI in the top window and page modules in the #et-vb-app-frame iframe. React Scan now runs once, in the top window, with Divi's own DevTools hook assignment feeding it both renderers. One toolbar, one power toggle, both trees.
The earlier two-instance design needed hook-guard.js to block that hook assignment, and left each toolbar controlling only its own realm. Both are gone.
Cross-frame outline geometry
Stock React Scan treats every host element's rectangle as belonging to the overlay window, so app-frame outlines land in the wrong place. The vendored bundle now maps and clips same-origin iframe rectangles into the top viewport before drawing, and correctly handles:
- room left for the builder and page bars
- centred tablet and phone previews
- preview zoom via
transform: scale(...) - iframe scrolling, resizing, and style-based zoom
- deep iframe hit-testing for the inspector
useOffscreenCanvasWorker is disabled, because live iframe geometry updates mutate main-thread outline state.
Toolbar stylesheet fix
Repairs an upstream rendering bug: React Scan's Tailwind 4 stylesheet lives in the toolbar's shadow root, but browsers only honour @property registrations from document stylesheets. Every --tw-* variable resolved to nothing, so the power toggle's knob fell out of its track when scanning was off and element borders went missing. The patch routes Tailwind's own no-@property fallback through the cascade instead, registering nothing on the host document.
Notes for maintainers
assets/react-scan.js is a patched build of React Scan 0.5.7, not a stock vendor drop. An upstream bump means rebasing patches/react-scan-cross-frame.patch and rebuilding — patches/README.md pins the upstream commit and the SHA-256 of both the stock and patched bundles, and documents the steps.
Requires the Divi 5 Visual Builder; loads only there, and only for users who can edit posts.