@sanity/overlays
Advanced tools
Comparing version 2.1.0-pink-lizard to 2.1.0
131
CHANGELOG.md
@@ -8,2 +8,133 @@ <!-- markdownlint-disable --><!-- textlint-disable --> | ||
## [2.1.0](https://github.com/sanity-io/visual-editing/compare/overlays-v2.0.4...overlays-v2.1.0) (2023-12-05) | ||
### Features | ||
* add new `same-origin` option ([#471](https://github.com/sanity-io/visual-editing/issues/471)) ([09621ad](https://github.com/sanity-io/visual-editing/commit/09621ad85897d4c600cbf7a011f8ddcfed75841e)) | ||
### Bug Fixes | ||
* **types:** add missing exports ([fd52637](https://github.com/sanity-io/visual-editing/commit/fd52637f1ca932965260a00132f31148533ce913)) | ||
## [2.0.4](https://github.com/sanity-io/visual-editing/compare/overlays-v2.0.3...overlays-v2.0.4) (2023-11-29) | ||
### Bug Fixes | ||
* **deps:** update dependency @sanity/client to ^6.9.0 ([#434](https://github.com/sanity-io/visual-editing/issues/434)) ([c7c8ec5](https://github.com/sanity-io/visual-editing/commit/c7c8ec59e6503060eb60800bac4a494e39c1595c)) | ||
* **deps:** update dependency @sanity/client to ^6.9.1 ([#437](https://github.com/sanity-io/visual-editing/issues/437)) ([6974b0d](https://github.com/sanity-io/visual-editing/commit/6974b0d6fabd9911af40f6a1de645473b47df19d)) | ||
## [2.0.3](https://github.com/sanity-io/visual-editing/compare/overlays-v2.0.2...overlays-v2.0.3) (2023-11-27) | ||
### Bug Fixes | ||
* **overlays:** only render overlays in iframe if channel is connected ([#411](https://github.com/sanity-io/visual-editing/issues/411)) ([1aa40fc](https://github.com/sanity-io/visual-editing/commit/1aa40fc412d575cffd84a2427072ddade849a3a1)) | ||
## [2.0.2](https://github.com/sanity-io/visual-editing/compare/overlays-v2.0.1...overlays-v2.0.2) (2023-11-21) | ||
### Bug Fixes | ||
* **overlays:** use getComputedStyle over computedStyleMap ([#412](https://github.com/sanity-io/visual-editing/issues/412)) ([63398e4](https://github.com/sanity-io/visual-editing/commit/63398e4fa1d4a1e8830964200f15b88e8c0d387a)) | ||
## [2.0.1](https://github.com/sanity-io/visual-editing/compare/overlays-v2.0.0...overlays-v2.0.1) (2023-11-16) | ||
### Bug Fixes | ||
* **deps:** update dependency @sanity/client to ^6.8.6 ([#374](https://github.com/sanity-io/visual-editing/issues/374)) ([f62967a](https://github.com/sanity-io/visual-editing/commit/f62967a2068844b358357c7c2254cd1d9228ba6d)) | ||
## [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) | ||
@@ -10,0 +141,0 @@ |
/** | ||
* The origin that are allowed to connect to the overlay. | ||
* @example 'https://my.sanity.studio' | ||
* @example location.origin | ||
* @example 'same-origin' | ||
* @public | ||
*/ | ||
export declare type AllowStudioOrigin = | ||
| 'same-origin' | ||
| `https://${string}` | ||
| `http://${string}` | ||
| string | ||
/** | ||
* Creates a controller which dispatches overlay related events | ||
@@ -46,4 +59,11 @@ * | ||
export declare function enableOverlays(options?: { | ||
/** | ||
* The origin that are allowed to connect to the overlay. | ||
* @example 'https://my.sanity.studio' | ||
* @example location.origin | ||
* @example 'same-origin' | ||
* @defaultValue 'same-origin' | ||
*/ | ||
allowStudioOrigin?: AllowStudioOrigin | ||
history?: HistoryAdapter | ||
studioUrl?: string | ||
zIndex?: string | number | ||
@@ -58,4 +78,6 @@ }): DisableOverlays | ||
click: (event: MouseEvent) => void | ||
mousedown: (event: MouseEvent) => void | ||
mouseenter: (event: MouseEvent) => void | ||
mouseleave: (event: MouseEvent) => void | ||
mousemove: (event: MouseEvent) => void | ||
} | ||
@@ -68,3 +90,3 @@ | ||
export declare interface HistoryAdapter { | ||
subscribe: (navigate: (update: HistoryUpdate) => void) => () => void | ||
subscribe: (navigate: HistoryAdapterNavigate) => () => void | ||
update: (update: HistoryUpdate) => void | ||
@@ -74,2 +96,8 @@ } | ||
/** | ||
* | ||
* @public | ||
*/ | ||
export declare type HistoryAdapterNavigate = (update: HistoryUpdate) => void | ||
/** | ||
* Preview frame history update | ||
@@ -203,2 +231,5 @@ * @public | ||
/** | ||
* @public | ||
*/ | ||
export declare interface OverlayRect { | ||
@@ -225,3 +256,5 @@ x: number | ||
export declare type SanityNode = { | ||
/** @deprecated */ | ||
projectId?: string | ||
/** @deprecated */ | ||
dataset?: string | ||
@@ -228,0 +261,0 @@ id: string |
@@ -1,1 +0,1 @@ | ||
export{c as createOverlayController,e as enableOverlays}from"./_chunks/index-KnK_kWWp.js";//# sourceMappingURL=index.js.map | ||
export{c as createOverlayController,e as enableOverlays}from"./_chunks/index-JtjVptJR.js";//# sourceMappingURL=index.js.map |
{ | ||
"name": "@sanity/overlays", | ||
"version": "2.1.0-pink-lizard", | ||
"version": "2.1.0", | ||
"homepage": "https://github.com/sanity-io/visual-editing/tree/main/packages/overlays#readme", | ||
@@ -37,2 +37,3 @@ "bugs": { | ||
"dist", | ||
"src", | ||
"CHANGELOG.md" | ||
@@ -107,17 +108,19 @@ ], | ||
"dependencies": { | ||
"@sanity/ui": "^1.8.3", | ||
"@sanity/client": "^6.9.1", | ||
"@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.53.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"@sanity/pkg-utils": "^3.3.2", | ||
"@types/react": "^18.2.41", | ||
"@types/react-dom": "^18.2.17", | ||
"@typescript-eslint/eslint-plugin": "^6.13.2", | ||
"@typescript-eslint/parser": "^6.13.2", | ||
"eslint": "^8.55.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-prettier": "^5.0.1", | ||
@@ -127,8 +130,9 @@ "eslint-plugin-react": "^7.33.2", | ||
"eslint-plugin-simple-import-sort": "^10.0.0", | ||
"ls-engines": "^0.9.0", | ||
"happy-dom": "^12.10.3", | ||
"ls-engines": "^0.9.1", | ||
"rimraf": "^5.0.5", | ||
"typescript": "^5.2.2", | ||
"vitest": "^0.34.6", | ||
"channels": "0.0.0", | ||
"visual-editing-helpers": "0.0.0" | ||
"typescript": "^5.3.2", | ||
"vitest": "^1.0.1", | ||
"@sanity/channels": "0.0.0", | ||
"@sanity/visual-editing-helpers": "0.0.0" | ||
}, | ||
@@ -139,4 +143,3 @@ "engines": { | ||
"publishConfig": { | ||
"access": "public", | ||
"tag": "pink-lizard" | ||
"access": "public" | ||
}, | ||
@@ -147,5 +150,5 @@ "scripts": { | ||
"lint": "eslint .", | ||
"test": "vitest --pass-with-no-tests", | ||
"test": "vitest --pass-with-no-tests --typecheck", | ||
"watch": "pkg watch --strict" | ||
} | ||
} |
# @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. | ||
This package is used with the [Presentation](https://www.sanity.io/docs/presentation) tool in the Sanity Studio to create clickable elements to take editors right from previews to the document and field they want to edit. | ||
@@ -22,3 +20,3 @@ ## Getting started | ||
# 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 +26,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 +93,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1974088
34
3229
2
8
18
94
75
+ Added@sanity/client@^6.9.1
+ Added@sanity/client@6.22.4(transitive)
+ Added@sanity/eventsource@5.0.2(transitive)
+ Added@types/event-source-polyfill@1.0.5(transitive)
+ Added@types/eventsource@1.1.15(transitive)
+ Added@types/follow-redirects@1.14.4(transitive)
+ Added@types/node@22.9.0(transitive)
+ Added@types/progress-stream@2.0.5(transitive)
+ Addedcompute-scroll-into-view@3.1.0(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddecompress-response@7.0.0(transitive)
+ Addedevent-source-polyfill@1.0.31(transitive)
+ Addedeventsource@2.0.2(transitive)
+ Addedfollow-redirects@1.15.9(transitive)
+ Addedget-it@8.6.5(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-retry-allowed@2.2.0(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedmimic-response@3.1.0(transitive)
+ Addedpostcss@8.4.49(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedprogress-stream@2.0.0(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedrxjs@7.8.1(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedscroll-into-view-if-needed@3.1.0(transitive)
+ Addedspeedometer@1.0.0(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstyled-components@6.1.1(transitive)
+ Addedthrough2@2.0.5(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removedpostcss@8.4.47(transitive)
- Removedstyled-components@6.1.0(transitive)
Updated@sanity/ui@^1.9.3
Updatedstyled-components@6.1.1