# @sanity/presentation-comlink

Latest version **2.2.3** (published 2026-08-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @sanity/presentation-comlink
pnpm add @sanity/presentation-comlink
yarn add @sanity/presentation-comlink
bun add @sanity/presentation-comlink
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.2.3 |
| Published | 2026-08-11 |
| First published | 2025-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20.19 <22 \|\| >=22.12 |
| Dependencies | 4 |
| Unpacked size | 28.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 7 |
| Author | Sanity.io <hello@sanity.io> |
| Maintainers | sanity-svc.npm, sanity-io |

## Links

- npm: https://www.npmjs.com/package/@sanity/presentation-comlink
- Repository: https://github.com/sanity-io/comlink
- Homepage: https://github.com/sanity-io/comlink/tree/main/packages/presentation-comlink#readme
- Issues: https://github.com/sanity-io/comlink/issues
- npm.io page: https://npm.io/package/@sanity/presentation-comlink

## Dependencies (4)

- [xstate](https://npm.io/package/xstate.md) ^5.32.5
- [@sanity/client](https://npm.io/package/@sanity/client.md) ^7.26.2
- [@sanity/comlink](https://npm.io/package/@sanity/comlink.md) ^4.0.3
- [@sanity/visual-editing-types](https://npm.io/package/@sanity/visual-editing-types.md) ^2.0.13

## Recent versions

- 2.2.3 (latest) — 2026-08-11
- 1.0.30-canary.0 (canary) — 2025-10-15
- 1.0.29-audience-decide.2 (audience-decide) — 2025-09-26
- 2.2.2 — 2026-08-05
- 2.2.1 — 2026-08-05
- 2.2.0 — 2026-07-20
- 2.1.0 — 2026-05-27
- 2.0.2 — 2026-05-22
- 2.0.1 — 2025-11-25
- 2.0.0 — 2025-10-21
- 1.0.33 — 2025-10-16
- 1.0.32 — 2025-10-16
- 1.0.31 — 2025-10-16
- 1.0.29-audience-decide.1 — 2025-09-23
- 1.0.29-audience-decide.0 — 2025-09-23
- … 47 more at https://npm.io/package/@sanity/presentation-comlink/versions

## README

# @sanity/presentation-comlink

> [!WARNING]  
> This package is not meant to be used directly, it's a shared dependency of `sanity/presentation` and `@sanity/visual-editing`. Using it in production is at your own risk.

The `sanity/presentation` tool requires a way to communicate with the application that lives within its preview iframe. The application is required to load up at least `@sanity/visual-editing`, but can also load up `@sanity/core-loader`, `next-sanity/live`, `@sanity/svelte-loader`, and `@sanity/react-loader`.
It uses `@sanity/comlink` to communicate over the iframe, and any popup preview windows, over the `window.postMessage` protocol.
The typings for those messages are defined in this package, as well as utils for maintaining compatibility with how older versions of `sanity/presentation` and `@sanity/visual-editing` used to format its message payloads, and helpers for handling payloads..

---
_Source: https://npm.io/package/@sanity/presentation-comlink · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
