Socket
Socket
Sign inDemoInstall

@sanity/presentation

Package Overview
Dependencies
Maintainers
44
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/presentation - npm Package Compare versions

Comparing version 1.6.1 to 1.7.0

dist/_chunks/index-ADWVEpEn.cjs

7

CHANGELOG.md
# Changelog
## [1.7.0](https://github.com/sanity-io/visual-editing/compare/presentation-v1.6.1...presentation-v1.7.0) (2024-01-22)
### Features
* **presentation:** support create intent and document navigation ([#731](https://github.com/sanity-io/visual-editing/issues/731)) ([1579971](https://github.com/sanity-io/visual-editing/commit/157997105bf461e332a21972ee1853220db09f73))
## [1.6.1](https://github.com/sanity-io/visual-editing/compare/presentation-v1.6.0...presentation-v1.6.1) (2024-01-19)

@@ -5,0 +12,0 @@

8

dist/index.d.ts

@@ -79,3 +79,9 @@ /// <reference types="react" />

export declare type PresentationNavigateContextValue = (preview: string) => void
export declare type PresentationNavigateContextValue = (
preview: string | undefined,
document?: {
type: string
id: string
},
) => void

@@ -82,0 +88,0 @@ export declare interface PresentationParams

2

dist/index.js

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

export{p as presentationTool,u as usePresentationNavigate,e as usePresentationParams}from"./_chunks/index-nfty5GbG.js";//# sourceMappingURL=index.js.map
export{p as presentationTool,u as usePresentationNavigate,e as usePresentationParams}from"./_chunks/index-Ku2cP-pD.js";//# sourceMappingURL=index.js.map
{
"name": "@sanity/presentation",
"version": "1.6.1",
"version": "1.7.0",
"homepage": "https://github.com/sanity-io/visual-editing/tree/main/packages/presentation#readme",

@@ -110,2 +110,3 @@ "bugs": {

"@sanity/preview-url-secret": "^1.5.3",
"@sanity/uuid": "3.0.2",
"@types/lodash.isequal": "^4.5.8",

@@ -126,3 +127,3 @@ "fast-deep-equal": "3.1.3",

"@sanity/visual-editing-helpers": "0.2.4",
"happy-dom": "^13.1.4",
"happy-dom": "^13.2.1",
"react": "^18.2.0",

@@ -129,0 +130,0 @@ "react-dom": "^18.2.0",

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

import { uuid } from '@sanity/uuid'
import { getPublishedId } from 'sanity'

@@ -27,3 +28,11 @@ import { SearchParam } from 'sanity/router'

}
if (intent === 'create') {
searchParams.preview = searchParams.preview || '/'
return {
type: type || '*',
id: id || uuid(),
_searchParams: Object.entries(searchParams),
}
}
return { intent, params, payload }
}
import { createContext } from 'react'
export type PresentationNavigateContextValue = (preview: string) => void
export type PresentationNavigateContextValue = (
preview: string | undefined,
document?: { type: string; id: string },
) => void
export const PresentationNavigateContext =
createContext<PresentationNavigateContextValue | null>(null)

Sorry, the diff of this file is not supported yet

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