feat(studio-channel): trust deco Editor's origin by default

Merged
TL
3d ago
+46-26

deco Editor (editor.decocms.com) frames a site's draft like Studio does, but the page's Studio channel only answers exact origins, so the editor's section wireframe and HTML swap never load there.

This adds https://editor.decocms.com to DEFAULT_STUDIO_ORIGINS in @decocms/blocks/protocol, @decocms/tanstack and @decocms/nextjs (the channel's trusted list and the CSP's script-src/frame-ancestors). A site that sets studioOrigins or DECO_STUDIO_ORIGIN is unchanged. The page still imports a module only from a URL on the origin of the message naming it, so the editor serves its own modules.

Tests: the origin lists in the studio, csp, worker, DecoDocument and StudioBridge tests. READMEs and skills updated. The two failing proxy.test.ts tests and the compat-v7 lint warning fail on main too.

šŸ¤– Generated with Claude Code


Summary by cubic

Trusts deco Editor's origin (https://editor.decocms.com) by default so its section wireframe and HTML swap load when it frames a site's draft. Adds the origin to DEFAULT_STUDIO_ORIGINS in @decocms/blocks/protocol, @decocms/tanstack, and @decocms/nextjs, which feeds the channel's trusted list and the CSP's script-src/frame-ancestors. Sites that set studioOrigins or DECO_STUDIO_ORIGIN are unchanged, and the page still imports modules only from the origin of the message naming them.