# Changelog

## 2.1.1

### Patch Changes

- [#3643](https://github.com/sanity-io/visual-editing/pull/3643) [`ae2c174`](https://github.com/sanity-io/visual-editing/commit/ae2c1749f04a69a98b1c5cc72537da82671389ea) Thanks [@rexxars](https://github.com/rexxars)! - fix(deps): widen allowed `@sanity/client` peer dep

## 2.1.0

### Minor Changes

- [#3620](https://github.com/sanity-io/visual-editing/pull/3620) [`8748e20`](https://github.com/sanity-io/visual-editing/commit/8748e20f7a89635f33c0eba4d79d6987a2a6939d) Thanks [@rexxars](https://github.com/rexxars)! - feat: accept any `@sanity/client` version in the loaders via `SanityClientLike`

  Options that took a client used to be typed as `SanityClient | SanityStegaClient`. `SanityClient`
  declares a `#private` field, which makes it nominal rather than structural, so a client only
  satisfied it when it came from the exact same copy of `@sanity/client`. Passing a client from a
  different major failed to typecheck, and so did a duplicate install of the same version:

  ```
  Type 'SanityClient' is not assignable to type 'SanityClient | SanityStegaClient'.
    Property '#private' in type 'SanityClient' refers to a different member that cannot be
    accessed from within type 'SanityClient'.
  ```

  These options now take `SanityClientLike`, a structural interface covering only what the loaders
  use: `config()`, `withConfig()` and `fetch()`. Any client satisfies it, from any version, including
  the ones from `@sanity/client/stega`, `@sanity/preview-kit/client` and `next-sanity`.

  This affects `createQueryStore({client})`, `setServerClient()`, `enableLiveMode({client})`,
  `useLiveMode({client})`, `handlePreview({client})` and `handleLoadQuery({client})`. All of them
  accept strictly more than before, so no changes are needed.

  For SvelteKit, `event.locals.client` still gives you the full `SanityClient` API. If your app
  resolves a different copy of `@sanity/client` than these packages do, name your own client type in
  `app.d.ts` to avoid a mismatch:

  ```ts
  import type { SanityClient } from "@sanity/client";
  import type { LoaderLocals } from "@sanity/svelte-loader";

  declare global {
    namespace App {
      interface Locals extends LoaderLocals<SanityClient> {}
    }
  }
  ```

  The one narrowing is `unstable__serverClient.instance`, which is now `SanityClientLike`. It is
  marked `@internal` and prefixed `unstable__`.

## 2.0.14

### Patch Changes

- [#3560](https://github.com/sanity-io/visual-editing/pull/3560) [`30ddf14`](https://github.com/sanity-io/visual-editing/commit/30ddf1414558d60f2b1178764f1d952dddc9c4c5) Thanks [@squiggler-app](https://github.com/apps/squiggler-app)! - fix(deps): update dependency @sanity/client to ^7.26.2

## 2.0.13

### Patch Changes

- [#3567](https://github.com/sanity-io/visual-editing/pull/3567) [`957dcf6`](https://github.com/sanity-io/visual-editing/commit/957dcf6d43eb2179b365273241ce866bf1ab28c7) Thanks [@stipsan](https://github.com/stipsan)! - Build with `@sanity/pkg-utils` v12 (tsdown). Internal build-tooling change; export paths for consumers are unchanged aside from dropping a broken `types` condition on the `./svelte` export that pointed at a non-existent `dist-svelte/index.d.ts`.

## 2.0.12

### Patch Changes

- [#3548](https://github.com/sanity-io/visual-editing/pull/3548) [`e98a4a2`](https://github.com/sanity-io/visual-editing/commit/e98a4a2d4868b298f3d50eb92cbb848d15ba2225) Thanks [@stipsan](https://github.com/stipsan)! - fix(deps): bump shared dependencies to latest (sanity ^6.6.0, react ^19.2.8, typescript 6.0.3, @sanity/pkg-utils ^11.0.13, styled-components ^6.4.4)

## 2.0.11

### Patch Changes

- [#3515](https://github.com/sanity-io/visual-editing/pull/3515) [`a38e573`](https://github.com/sanity-io/visual-editing/commit/a38e5739d875db5115077a171e34ddd1ed1622e5) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @sanity/client to ^7.24.0

## 2.0.10

### Patch Changes

- [#3490](https://github.com/sanity-io/visual-editing/pull/3490) [`5f90d36`](https://github.com/sanity-io/visual-editing/commit/5f90d36e0312e526b493d3c9f07db46dd6d2f610) Thanks [@stipsan](https://github.com/stipsan)! - Re-export `InsertMenuOptions` from `@sanity/types` instead of `@sanity/insert-menu`

## 2.0.9

### Patch Changes

- [#3477](https://github.com/sanity-io/visual-editing/pull/3477) [`0332f7f`](https://github.com/sanity-io/visual-editing/commit/0332f7faba74f349c7b3ce6ea8270350469307de) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @sanity/client to ^7.23.0

## 2.0.8

### Patch Changes

- [#3452](https://github.com/sanity-io/visual-editing/pull/3452) [`3554859`](https://github.com/sanity-io/visual-editing/commit/3554859a38fcd5f8966ca80979ef1cbb3b7dc80f) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @sanity/client to ^7.22.1

## 2.0.7

### Patch Changes

- [`82a9bc1`](https://github.com/sanity-io/visual-editing/commit/82a9bc1e5179ac7c7e4a878cbe0339362dd22e06) Thanks [@stipsan](https://github.com/stipsan)! - Update Sanity dependency ranges.

## 2.0.6

### Patch Changes

- [#3386](https://github.com/sanity-io/visual-editing/pull/3386) [`2b09955`](https://github.com/sanity-io/visual-editing/commit/2b09955d5dc783d861f256d6728e1be4ebcf8729) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - fix(deps): update @sanity/client to ^7.21.0

## [2.0.5](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v2.0.4...visual-editing-types-v2.0.5) (2026-03-19)

### Bug Fixes

- **deps:** upgrade `@sanity/client` to v7.18.0 ([f8bbe8e](https://github.com/sanity-io/visual-editing/commit/f8bbe8e70003f8bbf93a33f8355381d488b9f8db))

## [2.0.4](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v2.0.3...visual-editing-types-v2.0.4) (2026-02-03)

### Bug Fixes

- **deps:** update non-major ([bce7118](https://github.com/sanity-io/visual-editing/commit/bce71184463bc8fc8e5e55d14db660c3eb5fb35f))

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 3.0.4

## [2.0.3](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v2.0.2...visual-editing-types-v2.0.3) (2025-12-31)

### Bug Fixes

- replace some `catalog:` prefixes with regular semver ([0f7fe31](https://github.com/sanity-io/visual-editing/commit/0f7fe31b1a889cb6f07f5bc4626df726a7ae7e43))

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 3.0.3

## [2.0.2](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v2.0.1...visual-editing-types-v2.0.2) (2025-12-17)

### Bug Fixes

- use `@sanity/tsconfig` and upgrade `@sanity/pkg-utils` ([#3318](https://github.com/sanity-io/visual-editing/issues/3318)) ([e624b3b](https://github.com/sanity-io/visual-editing/commit/e624b3b9000c881b8a5834ea7c2258f3acda943f))

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 3.0.2

## [2.0.1](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v2.0.0...visual-editing-types-v2.0.1) (2025-12-17)

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 3.0.1

## [2.0.0](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.1.8...visual-editing-types-v2.0.0) (2025-12-16)

### ⚠ BREAKING CHANGES

- drop CJS, only ESM is supported

### Bug Fixes

- drop CJS, only ESM is supported ([cd7e68a](https://github.com/sanity-io/visual-editing/commit/cd7e68acd377d5f75c29165be25bdf996ac14050))

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 3.0.0

## [1.1.8](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.1.7...visual-editing-types-v1.1.8) (2025-10-16)

### Bug Fixes

- handle `perspective` for "Open in Studio" links ([#3259](https://github.com/sanity-io/visual-editing/issues/3259)) ([39d5369](https://github.com/sanity-io/visual-editing/commit/39d536957632a9b58cce1fb043053dec0dc3d2ce))

## [1.1.7](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.1.6...visual-editing-types-v1.1.7) (2025-10-15)

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 2.1.0

## [1.1.6](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.1.5...visual-editing-types-v1.1.6) (2025-09-05)

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 2.0.2

## [1.1.5](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.1.4...visual-editing-types-v1.1.5) (2025-08-01)

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 2.0.1

## [1.1.4](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.1.3...visual-editing-types-v1.1.4) (2025-07-24)

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 2.0.0

## [1.1.3](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.1.2...visual-editing-types-v1.1.3) (2025-07-21)

### Bug Fixes

- **deps:** update dependency @sanity/pkg-utils to v7 ([#3125](https://github.com/sanity-io/visual-editing/issues/3125)) ([58d123b](https://github.com/sanity-io/visual-editing/commit/58d123bace5c58f634f239bea88e1d975ec5c963))

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 1.1.13

## [1.1.2](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.1.1...visual-editing-types-v1.1.2) (2025-07-17)

### Bug Fixes

- **deps:** update dependency @sanity/client to ^7.8.0 ([95f2802](https://github.com/sanity-io/visual-editing/commit/95f2802ab1220a55eebd8816098fe6ae80982370))

## [1.1.1](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.1.0...visual-editing-types-v1.1.1) (2025-07-10)

### Bug Fixes

- **deps:** update dependency @sanity/client to v7.6.0 ([#3020](https://github.com/sanity-io/visual-editing/issues/3020)) ([039b859](https://github.com/sanity-io/visual-editing/commit/039b859f2190453e2d7530f2f9c99ba1209e4808))

## [1.1.0](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.18...visual-editing-types-v1.1.0) (2025-05-29)

### Features

- add overlay plugin define helper ([#3026](https://github.com/sanity-io/visual-editing/issues/3026)) ([434aa65](https://github.com/sanity-io/visual-editing/commit/434aa65d5bfd88bc6f3e4831fbd8c9ff5b7d3148))

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 1.1.12

## [1.0.18](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.17...visual-editing-types-v1.0.18) (2025-05-07)

### Bug Fixes

- **deps:** update dependency @sanity/client to v7.1.0 ([#2984](https://github.com/sanity-io/visual-editing/issues/2984)) ([a9f8b89](https://github.com/sanity-io/visual-editing/commit/a9f8b898e4d6d6556336e69c3916ec06456db1f9))

## [1.0.17](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.16...visual-editing-types-v1.0.17) (2025-04-30)

### Bug Fixes

- **deps:** require peer dependency @sanity/client to ^7.0.0 ([de3db1f](https://github.com/sanity-io/visual-editing/commit/de3db1f0765b94a792cd44c23ee97f4615efc7cf))

## [1.0.16](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.15...visual-editing-types-v1.0.16) (2025-04-30)

### Bug Fixes

- **deps:** update dependency @sanity/client to v7 ([#2964](https://github.com/sanity-io/visual-editing/issues/2964)) ([473f7ed](https://github.com/sanity-io/visual-editing/commit/473f7edc872a6bc926dcbc7ecbb355fb7fa23229))

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 1.1.11

## [1.0.15](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.14...visual-editing-types-v1.0.15) (2025-04-11)

### Bug Fixes

- **deps:** update dependency @sanity/client to ^6.29.0 ([2a8ff1e](https://github.com/sanity-io/visual-editing/commit/2a8ff1e9369b8a27bb3c122d5f5f9046be43c5a1))

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 1.1.10

## [1.0.14](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.13...visual-editing-types-v1.0.14) (2025-04-10)

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 1.1.9

## [1.0.13](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.12...visual-editing-types-v1.0.13) (2025-04-01)

### Bug Fixes

- **deps:** update dependency @sanity/client to ^6.28.4 ([#2884](https://github.com/sanity-io/visual-editing/issues/2884)) ([be6dca0](https://github.com/sanity-io/visual-editing/commit/be6dca0867a2f47abccb0cec837968362f7130f5))

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 1.1.8

## [1.0.12](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.11...visual-editing-types-v1.0.12) (2025-03-24)

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 1.1.7

## [1.0.11](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.10...visual-editing-types-v1.0.11) (2025-03-17)

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 1.1.6

## [1.0.10](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.9...visual-editing-types-v1.0.10) (2025-03-12)

### Bug Fixes

- **deps:** update dependency @sanity/client to ^6.28.2 ([#2779](https://github.com/sanity-io/visual-editing/issues/2779)) ([6336984](https://github.com/sanity-io/visual-editing/commit/63369840603698bace92a6b317b830461f65e3ff))
- **deps:** update dependency @sanity/client to ^6.28.3 ([#2808](https://github.com/sanity-io/visual-editing/issues/2808)) ([a2f657d](https://github.com/sanity-io/visual-editing/commit/a2f657dd8a3b63a229492eb5790932da7cacace5))

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 1.1.5

## [1.0.9](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.8...visual-editing-types-v1.0.9) (2025-03-03)

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 1.1.4

## [1.0.8](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.7...visual-editing-types-v1.0.8) (2025-02-24)

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 1.1.3

## [1.0.7](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.6...visual-editing-types-v1.0.7) (2025-02-17)

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 1.1.2

## [1.0.6](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.5...visual-editing-types-v1.0.6) (2025-02-10)

### Bug Fixes

- relax semver ([8af6dd0](https://github.com/sanity-io/visual-editing/commit/8af6dd0d5fb3f0cf6fc9f749d8ca2e1b4a2f4abc))

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 1.1.1

## [1.0.5](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.4...visual-editing-types-v1.0.5) (2025-02-07)

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 1.1.0

## [1.0.4](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.3...visual-editing-types-v1.0.4) (2025-01-28)

### Bug Fixes

- **deps:** update dependency @sanity/client to ^6.27.2 ([#2578](https://github.com/sanity-io/visual-editing/issues/2578)) ([de598b8](https://github.com/sanity-io/visual-editing/commit/de598b8b05fae82755faee31162ecb005af65b02))

## [1.0.3](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.2...visual-editing-types-v1.0.3) (2025-01-22)

### Bug Fixes

- **deps:** update dependency @sanity/client to ^6.27.0 (main) ([#2548](https://github.com/sanity-io/visual-editing/issues/2548)) ([faeb98f](https://github.com/sanity-io/visual-editing/commit/faeb98f5b0f029409c1d5c4e2e0bd4c2e0512cbb))
- remove isDraft ([#2537](https://github.com/sanity-io/visual-editing/issues/2537)) ([bfc5aca](https://github.com/sanity-io/visual-editing/commit/bfc5aca9000c987785ef715c8a3d149cc99c7455))

## [1.0.2](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.1...visual-editing-types-v1.0.2) (2025-01-22)

### Bug Fixes

- **deps:** update dependency @sanity/client to ^6.26.0 ([#2539](https://github.com/sanity-io/visual-editing/issues/2539)) ([668143a](https://github.com/sanity-io/visual-editing/commit/668143a55ab81e29140c7b3aa04ca5501b4acdb9))

## [1.0.1](https://github.com/sanity-io/visual-editing/compare/visual-editing-types-v1.0.0...visual-editing-types-v1.0.1) (2025-01-21)

### Dependencies

- The following workspace dependencies were updated
  - devDependencies
    - @sanity/insert-menu bumped to 1.0.20

## 1.0.0 (2025-01-17)

### Bug Fixes

- replace `@repo/visual-editing-helpers` ([#2520](https://github.com/sanity-io/visual-editing/issues/2520)) ([7784f6f](https://github.com/sanity-io/visual-editing/commit/7784f6f54eb455ec1fe4ec50c387a87a875aceae))
