Socket
Socket
Sign inDemoInstall

@sanity/overlays

Package Overview
Dependencies
Maintainers
42
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/overlays - npm Package Compare versions

Comparing version 2.0.0-pink-lizard to 2.0.0

dist/_chunks/index-BxmHSACi.cjs

170

CHANGELOG.md

@@ -8,2 +8,120 @@ <!-- markdownlint-disable --><!-- textlint-disable -->

## [2.0.0](https://github.com/sanity-io/visual-editing/compare/overlays-v2.3.4-pink-lizard...overlays-v2.0.0) (2023-11-15)
### Features
* production ready release ([#246](https://github.com/sanity-io/visual-editing/issues/246)) ([993c3cc](https://github.com/sanity-io/visual-editing/commit/993c3cc621921971087053950a1dc88fd9e34762))
## [2.3.4-pink-lizard](https://github.com/sanity-io/visual-editing/compare/overlays-v2.3.3-pink-lizard...overlays-v2.3.4-pink-lizard) (2023-11-15)
### Bug Fixes
* **overlays:** add `mode=presentation` to intent links ([a838cd8](https://github.com/sanity-io/visual-editing/commit/a838cd8b392f8f74d18463709d7f24a3aac28ed6))
## [2.3.3-pink-lizard](https://github.com/sanity-io/visual-editing/compare/overlays-v2.3.2-pink-lizard...overlays-v2.3.3-pink-lizard) (2023-11-13)
### Bug Fixes
* click-to-edit links in overlays pass in `preview` params of the current page ([d90ec9e](https://github.com/sanity-io/visual-editing/commit/d90ec9efe79d11f7f5c880c0439090d25dfc42d7))
* **deps:** Update dependency @sanity/client to ^6.8.4 ([5dbbe06](https://github.com/sanity-io/visual-editing/commit/5dbbe062ac1dd71a251e70d15caa1c5d53a505f6))
* **deps:** Update dependency @sanity/client to ^6.8.5 ([#361](https://github.com/sanity-io/visual-editing/issues/361)) ([e8e61c1](https://github.com/sanity-io/visual-editing/commit/e8e61c1a377b2737db60a1c3e42160794b26ad9b))
* **deps:** Update dependency @sanity/ui to ^1.9.3 ([#355](https://github.com/sanity-io/visual-editing/issues/355)) ([e10f6a7](https://github.com/sanity-io/visual-editing/commit/e10f6a79243b040aaba73c94146348f509164064))
* make `allowStudioOrigin` required ([700e140](https://github.com/sanity-io/visual-editing/commit/700e14025d327514152528138501353961034999))
* use `createEditUrl ` from `@sanity/client` ([e83bb2b](https://github.com/sanity-io/visual-editing/commit/e83bb2bf28794477300d914e053d77b6ad1c07e4))
## [2.3.2-pink-lizard](https://github.com/sanity-io/visual-editing/compare/overlays-v2.3.1-pink-lizard...overlays-v2.3.2-pink-lizard) (2023-11-11)
### Bug Fixes
* **deps:** Update dependency @sanity/ui to ^1.9.2 ([#335](https://github.com/sanity-io/visual-editing/issues/335)) ([5b17c77](https://github.com/sanity-io/visual-editing/commit/5b17c7785f748eea4d0dae57e0c906e8bc3f3918))
## [2.3.1-pink-lizard](https://github.com/sanity-io/visual-editing/compare/overlays-v2.3.0-pink-lizard...overlays-v2.3.1-pink-lizard) (2023-11-10)
### Bug Fixes
* **presentation:** prevent iframe from taking focus ([fbd02fd](https://github.com/sanity-io/visual-editing/commit/fbd02fd3b83774546c017a84cf8c444eff5dfe4f))
* **presentation:** prevent scrolling when array items close ([da2ad22](https://github.com/sanity-io/visual-editing/commit/da2ad22c7e825cebdff0dbfa374b65ca3a50e04c))
* remove initial url sender ([badda86](https://github.com/sanity-io/visual-editing/commit/badda8677af485467f469ef39f710566ba2908b4))
* send initial URL on load ([3caf2e3](https://github.com/sanity-io/visual-editing/commit/3caf2e35511e4bfd7275131f2301b1f32742e70b))
* **types:** add `HistoryAdapterNavigate` exported type ([7e8340f](https://github.com/sanity-io/visual-editing/commit/7e8340f0b5313885b4205bad60f3b2db62f79309))
## [2.3.0-pink-lizard](https://github.com/sanity-io/visual-editing/compare/overlays-v2.2.1-pink-lizard...overlays-v2.3.0-pink-lizard) (2023-11-09)
### Features
* **overlays:** toggle overlay using mod key ([#228](https://github.com/sanity-io/visual-editing/issues/228)) ([60484e1](https://github.com/sanity-io/visual-editing/commit/60484e1458fdc9f85071cdbca2afc0978fae8041))
### Bug Fixes
* **presentation:** complete keyboard implementation ([a931b1b](https://github.com/sanity-io/visual-editing/commit/a931b1b68cf85a17dd1ab8010445313c4d75539a))
## [2.2.1-pink-lizard](https://github.com/sanity-io/visual-editing/compare/overlays-v2.2.0-pink-lizard...overlays-v2.2.1-pink-lizard) (2023-11-08)
### Bug Fixes
* use `studioPath` utils from `@sanity/client/csm` ([a804364](https://github.com/sanity-io/visual-editing/commit/a80436410083ae88f6dc46a259ae3a08a7f4b59f))
## [2.2.0-pink-lizard](https://github.com/sanity-io/visual-editing/compare/overlays-v2.1.2-pink-lizard...overlays-v2.2.0-pink-lizard) (2023-11-08)
### ⚠ BREAKING CHANGES
* lazy load live mode ([#281](https://github.com/sanity-io/visual-editing/issues/281))
* renamed `studioUrl` to `allowStudioOrigin`to clarify it's CORS related
### Bug Fixes
* lazy load live mode ([#281](https://github.com/sanity-io/visual-editing/issues/281)) ([e52991c](https://github.com/sanity-io/visual-editing/commit/e52991cc974df76647c4ede51de16527c14e6c10))
* renamed `studioUrl` to `allowStudioOrigin`to clarify it's CORS related ([589a7c2](https://github.com/sanity-io/visual-editing/commit/589a7c29ef61bb53f249847b4d5b9ae78ad252f2))
## [2.1.2-pink-lizard](https://github.com/sanity-io/visual-editing/compare/overlays-v2.1.1-pink-lizard...overlays-v2.1.2-pink-lizard) (2023-11-07)
### Bug Fixes
* **deps:** Update dependency @sanity/ui to ^1.9.0 ([#274](https://github.com/sanity-io/visual-editing/issues/274)) ([4b971e3](https://github.com/sanity-io/visual-editing/commit/4b971e38c480322b4041206b5fd6378b01797ca4))
## [2.1.1-pink-lizard](https://github.com/sanity-io/visual-editing/compare/overlays-v2.1.0-pink-lizard...overlays-v2.1.1-pink-lizard) (2023-11-04)
### Bug Fixes
* scroll into view if needed ([dfbbdbb](https://github.com/sanity-io/visual-editing/commit/dfbbdbb38ea9220cc820441c5e8f7296c44922fb))
## [2.1.0-pink-lizard](https://github.com/sanity-io/visual-editing/compare/overlays-v2.0.2-pink-lizard...overlays-v2.1.0-pink-lizard) (2023-11-04)
### Features
* use the new `@sanity/client/stega` features ([#252](https://github.com/sanity-io/visual-editing/issues/252)) ([fa08bb2](https://github.com/sanity-io/visual-editing/commit/fa08bb24e6413bfa49adb79df256217e06ed0844))
### Bug Fixes
* handle stega nodes in a way that supports focus ([#254](https://github.com/sanity-io/visual-editing/issues/254)) ([dce801f](https://github.com/sanity-io/visual-editing/commit/dce801f3b76e6e2bb0597345b5deacc2038e6fec))
## [2.0.2-pink-lizard](https://github.com/sanity-io/visual-editing/compare/overlays-v2.0.1-pink-lizard...overlays-v2.0.2-pink-lizard) (2023-11-03)
### Bug Fixes
* **overlays:** flash overlays when mounting ([6a9a86d](https://github.com/sanity-io/visual-editing/commit/6a9a86d9eca784dff1ff55686b9b91ca9203f6a9))
## [2.0.1-pink-lizard](https://github.com/sanity-io/visual-editing/compare/overlays-v2.0.0-pink-lizard...overlays-v2.0.1-pink-lizard) (2023-11-02)
### Bug Fixes
* attempt bundling `@sanity/ui` and `styled-components` for hydrogen compat ([b39f58a](https://github.com/sanity-io/visual-editing/commit/b39f58a33e6114be37d69d852b40ff35397d8591))
* **CHANGELOG:** restore continuity ([c9f19cd](https://github.com/sanity-io/visual-editing/commit/c9f19cd7d8be297b99f7feb9c678b34822d10c8b))
* don't bundle `uuid` ([6e11ca5](https://github.com/sanity-io/visual-editing/commit/6e11ca552cc05dc37295900c5aab511ab7b6eef9))
## [2.0.0-pink-lizard](https://github.com/sanity-io/visual-editing/compare/overlays-v0.1.16-pink-lizard...overlays-v2.0.0-pink-lizard) (2023-11-02)

@@ -141,56 +259,8 @@

## [0.1.0-pink-lizard.0](https://github.com/sanity-io/visual-editing/compare/overlays-v0.0.0-pink-lizard.0...overlays-v0.1.0-pink-lizard.0) (2023-10-19)
## [1.0.6](https://github.com/sanity-io/overlays/compare/v1.0.5...v1.0.6) (2023-09-12)
### Features
* basic e2e event dispatching ([#59](https://github.com/sanity-io/visual-editing/issues/59)) ([4217a69](https://github.com/sanity-io/visual-editing/commit/4217a69f2f01d19f5391960c23dc74b05d6fc19b))
* common schema ([#50](https://github.com/sanity-io/visual-editing/issues/50)) ([73aa91e](https://github.com/sanity-io/visual-editing/commit/73aa91e09811864b001cb4370fb3f9af6eeb16ba))
* composer routing ([#68](https://github.com/sanity-io/visual-editing/issues/68)) ([053d7e2](https://github.com/sanity-io/visual-editing/commit/053d7e2949ac9f54dee0421e4bc3e28c979c8fb6))
* **composer:** dev mode features ([e0e8785](https://github.com/sanity-io/visual-editing/commit/e0e87855f5ca08560cf25de9171c80d4646c2205))
* overlay toggling ([4918656](https://github.com/sanity-io/visual-editing/commit/4918656fb7d5d979ce831b00e88c8fa66e5f196e))
* **overlays:** allow z-index configuration ([ed78fbe](https://github.com/sanity-io/visual-editing/commit/ed78fbe42a6e3fbf030c4d52f529467f24a608e3))
* **overlays:** implement controller ([#46](https://github.com/sanity-io/visual-editing/issues/46)) ([a3b74f3](https://github.com/sanity-io/visual-editing/commit/a3b74f3060271635f1dc08e01533e6775e892dbb))
* sync preview location ([e4fe2c9](https://github.com/sanity-io/visual-editing/commit/e4fe2c997bebd9524398af16c3bb7b9edb678566))
### Bug Fixes
* add `@sanity/client` to peer deps ([acf0bd0](https://github.com/sanity-io/visual-editing/commit/acf0bd09eced687de5ffbc4afa79dee576e1cc72))
* add `node.module` condition ([0625af8](https://github.com/sanity-io/visual-editing/commit/0625af845bd2db73862219a45018ee92faef071a))
* correctly handle channel target origins ([#117](https://github.com/sanity-io/visual-editing/issues/117)) ([67a66fb](https://github.com/sanity-io/visual-editing/commit/67a66fb7cd7047745fd7736e756f2e4c86d8cf7c))
* **deps:** update dependency @floating-ui/react-dom to ^2.0.2 ([#12](https://github.com/sanity-io/visual-editing/issues/12)) ([0132187](https://github.com/sanity-io/visual-editing/commit/01321871cf72e6531d4ae11a99facdb8dad86a08))
* **deps:** Update dependency @sanity/icons to ^2.5.0 ([#92](https://github.com/sanity-io/visual-editing/issues/92)) ([c6ae743](https://github.com/sanity-io/visual-editing/commit/c6ae7435c6c0e51cdfadd0e79635ba119559e676))
* **deps:** Update dependency @sanity/ui to ^1.8.2 ([#13](https://github.com/sanity-io/visual-editing/issues/13)) ([2c0a38c](https://github.com/sanity-io/visual-editing/commit/2c0a38cf72d1567db13a4ecd83d97efc4dd958a1))
* **deps:** Update dependency nanoid to ^5.0.2 ([#115](https://github.com/sanity-io/visual-editing/issues/115)) ([d585a80](https://github.com/sanity-io/visual-editing/commit/d585a80aea1dcf12e50442599530f24835ab258c))
* **deps:** Update dependency nanoid to v5 ([#36](https://github.com/sanity-io/visual-editing/issues/36)) ([c887ea0](https://github.com/sanity-io/visual-editing/commit/c887ea04efd13f2aedf6232db9d98a2f973a344c))
* **deps:** Update dependency react-intersection-observer to ^9.5.2 ([#14](https://github.com/sanity-io/visual-editing/issues/14)) ([ccf55e7](https://github.com/sanity-io/visual-editing/commit/ccf55e799eaf7ce9b78ce41778ebc1fc3e7e5070))
* **deps:** Update dependency sanity to ^3.18.1 ([#123](https://github.com/sanity-io/visual-editing/issues/123)) ([70fcdc9](https://github.com/sanity-io/visual-editing/commit/70fcdc9c4da07287e449e0f264921c5dfee065e4))
* **deps:** update dependency styled-components to ^5.3.11 ([#15](https://github.com/sanity-io/visual-editing/issues/15)) ([532f436](https://github.com/sanity-io/visual-editing/commit/532f436f91994ae55f1ede24b23d295a58a24c72))
* **deps:** Update dependency valibot to ^0.17.1 ([#56](https://github.com/sanity-io/visual-editing/issues/56)) ([3ff8e2b](https://github.com/sanity-io/visual-editing/commit/3ff8e2b52aab65e54ad24cc76d5a08224fac8721))
* **deps:** Update dependency valibot to ^0.19.0 ([#96](https://github.com/sanity-io/visual-editing/issues/96)) ([98c9198](https://github.com/sanity-io/visual-editing/commit/98c91981993d9bf6685635b8bd0af51b0d6e8789))
* handle draft ids in linker ([f419387](https://github.com/sanity-io/visual-editing/commit/f4193875e70edaf6473abd29e53afedf5f481df4))
* **overlays:** improve element registration/activation on mutation ([af52162](https://github.com/sanity-io/visual-editing/commit/af5216254034fa7efa0eedeadc337e567e40c10e))
* **overlays:** prevent scroll on clicked elements ([1fb65b6](https://github.com/sanity-io/visual-editing/commit/1fb65b68b0930a69f3b5da016701c932b06b9594))
* **overlays:** use correct styling for element borders ([1baf4ef](https://github.com/sanity-io/visual-editing/commit/1baf4ef48807e743554046f013e95214b3e81953))
* prevent multiple instantiations ([#28](https://github.com/sanity-io/visual-editing/issues/28)) ([6f6e8ee](https://github.com/sanity-io/visual-editing/commit/6f6e8ee870224976183b5b24e40aeaadd54f83db))
* React StrictMode race conditions ([ba2a5af](https://github.com/sanity-io/visual-editing/commit/ba2a5af34e85a818434df1e795490fad7f2b095a))
* reenable mutationObserver cleanup ([#27](https://github.com/sanity-io/visual-editing/issues/27)) ([c634dbf](https://github.com/sanity-io/visual-editing/commit/c634dbfc616554f249ac31020c6a3d404d3e010a))
* remove `zod` import ([df06ab0](https://github.com/sanity-io/visual-editing/commit/df06ab078542c9779bb940379a9b0cab29e090bf))
* track if channels are healthy ([4cc24a0](https://github.com/sanity-io/visual-editing/commit/4cc24a08bcfd318f4006d7c8f062d70764e22c65))
- overlays not always rendering as top item or clickable ([#32](https://github.com/sanity-io/overlays/issues/32)) ([8d905a1](https://github.com/sanity-io/overlays/commit/8d905a1b25db6bb73791f58b4a157cc80535fd2e))
## 0.0.0 (2023-09-08)
### Bug Fixes
* add `node.module` condition ([0625af8](https://github.com/sanity-io/visual-editing/commit/0625af845bd2db73862219a45018ee92faef071a))
* **deps:** update dependency @floating-ui/react-dom to ^2.0.2 ([#12](https://github.com/sanity-io/visual-editing/issues/12)) ([0132187](https://github.com/sanity-io/visual-editing/commit/01321871cf72e6531d4ae11a99facdb8dad86a08))
* **deps:** Update dependency @sanity/ui to ^1.8.2 ([#13](https://github.com/sanity-io/visual-editing/issues/13)) ([2c0a38c](https://github.com/sanity-io/visual-editing/commit/2c0a38cf72d1567db13a4ecd83d97efc4dd958a1))
* **deps:** Update dependency react-intersection-observer to ^9.5.2 ([#14](https://github.com/sanity-io/visual-editing/issues/14)) ([ccf55e7](https://github.com/sanity-io/visual-editing/commit/ccf55e799eaf7ce9b78ce41778ebc1fc3e7e5070))
* **deps:** update dependency styled-components to ^5.3.11 ([#15](https://github.com/sanity-io/visual-editing/issues/15)) ([532f436](https://github.com/sanity-io/visual-editing/commit/532f436f91994ae55f1ede24b23d295a58a24c72))
* prevent multiple instantiations ([#28](https://github.com/sanity-io/visual-editing/issues/28)) ([6f6e8ee](https://github.com/sanity-io/visual-editing/commit/6f6e8ee870224976183b5b24e40aeaadd54f83db))
* reenable mutationObserver cleanup ([#27](https://github.com/sanity-io/visual-editing/issues/27)) ([c634dbf](https://github.com/sanity-io/visual-editing/commit/c634dbfc616554f249ac31020c6a3d404d3e010a))
* remove `zod` import ([df06ab0](https://github.com/sanity-io/visual-editing/commit/df06ab078542c9779bb940379a9b0cab29e090bf))
## [1.0.5](https://github.com/sanity-io/overlays/compare/v1.0.4...v1.0.5) (2023-09-05)

@@ -197,0 +267,0 @@

@@ -46,4 +46,9 @@ /**

export declare function enableOverlays(options?: {
/**
* The origin that are allowed to connect to the overlay.
* @example `https://my.sanity.studio`
* @example `location.origin`
*/
allowStudioOrigin: string
history?: HistoryAdapter
studioUrl?: string
zIndex?: string | number

@@ -58,4 +63,6 @@ }): DisableOverlays

click: (event: MouseEvent) => void
mousedown: (event: MouseEvent) => void
mouseenter: (event: MouseEvent) => void
mouseleave: (event: MouseEvent) => void
mousemove: (event: MouseEvent) => void
}

@@ -68,3 +75,3 @@

export declare interface HistoryAdapter {
subscribe: (navigate: (update: HistoryUpdate) => void) => () => void
subscribe: (navigate: HistoryAdapterNavigate) => () => void
update: (update: HistoryUpdate) => void

@@ -74,2 +81,8 @@ }

/**
*
* @public
*/
export declare type HistoryAdapterNavigate = (update: HistoryUpdate) => void
/**
* Preview frame history update

@@ -203,2 +216,5 @@ * @public

/**
* @public
*/
export declare interface OverlayRect {

@@ -225,4 +241,6 @@ x: number

export declare type SanityNode = {
projectId: string
dataset: string
/** @deprecated */
projectId?: string
/** @deprecated */
dataset?: string
id: string

@@ -229,0 +247,0 @@ path: string

@@ -1,2 +0,1 @@

export { createOverlayController, enableOverlays } from './_chunks/index-7v9h7nhP.js';
//# sourceMappingURL=index.js.map
export{c as createOverlayController,e as enableOverlays}from"./_chunks/index-qDWOOM-K.js";//# sourceMappingURL=index.js.map
{
"name": "@sanity/overlays",
"version": "2.0.0-pink-lizard",
"version": "2.0.0",
"homepage": "https://github.com/sanity-io/visual-editing/tree/main/packages/overlays#readme",

@@ -106,15 +106,18 @@ "bugs": {

"dependencies": {
"@sanity/ui": "^1.8.3",
"@sanity/client": "^6.8.5",
"@sanity/ui": "^1.9.3",
"@vercel/stega": "0.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"styled-components": "^6.1.0"
"scroll-into-view-if-needed": "^3.1.0",
"styled-components": "6.1.1",
"uuid": "^9.0.1"
},
"devDependencies": {
"@sanity/pkg-utils": "^3.2.2",
"@types/react": "^18.2.34",
"@types/react-dom": "^18.2.14",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"eslint": "^8.52.0",
"@sanity/pkg-utils": "^3.2.3",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",

@@ -126,3 +129,3 @@ "eslint-plugin-prettier": "^5.0.1",

"ls-engines": "^0.9.0",
"rimraf": "^5.0.1",
"rimraf": "^5.0.5",
"typescript": "^5.2.2",

@@ -137,4 +140,3 @@ "vitest": "^0.34.6",

"publishConfig": {
"access": "public",
"tag": "pink-lizard"
"access": "public"
},

@@ -141,0 +143,0 @@ "scripts": {

# @sanity/overlays — Visual Editing
[![npm stat](https://img.shields.io/npm/dm/@sanity/overlays.svg?style=flat-square)](https://npm-stat.com/charts.html?package=@sanity/overlays)
[![npm version](https://img.shields.io/npm/v/@sanity/overlays/pink-lizard.svg?style=flat-square)](https://www.npmjs.com/package/@sanity/overlays)
[![npm version](https://img.shields.io/npm/v/@sanity/overlays.svg?style=flat-square)](https://www.npmjs.com/package/@sanity/overlays)
[![gzip size][gzip-badge]][bundlephobia]
[![size][size-badge]][bundlephobia]
> **Warning**
>
> This is an experimental package. Breaking changes may be introduced at any time. It's not production ready.
## Getting started

@@ -22,3 +18,3 @@

# For React.js applications
npm install --save-exact @sanity/overlays@pink-lizard @sanity/react-loader@pink-lizard
npm install @sanity/overlays @sanity/react-loader
```

@@ -28,3 +24,3 @@

# Framework agnostic JavaScript libraries
npm install --save-exact @sanity/overlays@pink-lizard @sanity/core-loader@pink-lizard
npm install @sanity/overlays @sanity/core-loader
```

@@ -95,4 +91,4 @@

[gzip-badge]: https://img.shields.io/bundlephobia/minzip/@sanity/overlays@pink-lizard?label=gzip%20size&style=flat-square
[size-badge]: https://img.shields.io/bundlephobia/min/@sanity/overlays@pink-lizard?label=size&style=flat-square
[bundlephobia]: https://bundlephobia.com/package/@sanity/overlays@pink-lizard
[gzip-badge]: https://img.shields.io/bundlephobia/minzip/@sanity/overlays?label=gzip%20size&style=flat-square
[size-badge]: https://img.shields.io/bundlephobia/min/@sanity/overlays?label=size&style=flat-square
[bundlephobia]: https://bundlephobia.com/package/@sanity/overlays

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc