@usedetach/editor-protocol
v0.2.1
Published
Versioned postMessage contract between the Detach editor and a storefront preview frame.
Downloads
402
Readme
@usedetach/editor-protocol
The versioned postMessage contract between the
Detach editor and a storefront preview frame.
Every message is a versioned envelope validated with Zod on both sides, and origins are checked
against explicit allowlists — never "*".
npm install @usedetach/editor-protocolYou rarely import this directly: @usedetach/react's preview bridge speaks it for you.
Reach for it when implementing a preview frame for a framework the SDKs do not cover yet.
Its only dependency is zod, deliberately — the protocol has to be loadable by both ends without
dragging a renderer along.
