Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@contentful/live-preview

Package Overview
Dependencies
Maintainers
166
Versions
218
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/live-preview - npm Package Compare versions

Comparing version 2.4.3 to 2.4.4

dist/index-38c901d3.cjs

2

dist/index.js

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

import { C as r } from "./index-8836099c.js";
import { C as r } from "./index-fcc74d3b.js";
export {

@@ -3,0 +3,0 @@ r as ContentfulLivePreview

import * as V from "react";
import ke, { createContext as yr, useMemo as De, useState as hr, useRef as Pe, useContext as Ae, useCallback as gr } from "react";
import { C as Q, d as mr } from "./index-8836099c.js";
import { C as Q, d as mr } from "./index-fcc74d3b.js";
var Z = { exports: {} }, F = {};

@@ -5,0 +5,0 @@ /**

@@ -1,4 +0,10 @@

import type { AssetProps, EntryProps } from 'contentful-management';
import type { AssetProps, EntryProps, SysLink } from 'contentful-management';
import { ContentType, EntityReferenceMap } from '../types';
type Reference = AssetProps | EntryProps;
/**
* Update the reference from the entry editor with the information from the entityReferenceMap.
* If the information is not yet available, it send a message to the editor to retrieve it.
*/
export declare function updateRef(dataFromPreviewApp: Reference | undefined, updateFromEntryEditor: Reference | SysLink, locale: string, entityReferenceMap: EntityReferenceMap): Promise<Reference | undefined | null>;
/**
* Updates REST response data based on CMA entry object

@@ -13,1 +19,2 @@ *

export declare function updateEntity(contentType: ContentType, dataFromPreviewApp: EntryProps, updateFromEntryEditor: EntryProps | AssetProps, locale: string, entityReferenceMap: EntityReferenceMap): Promise<EntryProps>;
export {};
{
"name": "@contentful/live-preview",
"version": "2.4.3",
"version": "2.4.4",
"author": "Contentful GmbH",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -9,2 +9,3 @@ # @contentful/live-preview

<!-- TOC -->
- [Getting started](#getting-started)

@@ -94,3 +95,3 @@ - [Requirements](#requirements)

// ...
const updated = useContentfulLiveUpdates(originalData, {locale});
const updated = useContentfulLiveUpdates(originalData, { locale });
// ...

@@ -135,3 +136,3 @@ ```

```tsx
import gql from "graphql-tag"
import gql from 'graphql-tag';

@@ -152,6 +153,6 @@ const query = gql`

}
`
`;
// ...
const updated = useContentfulLiveUpdates(originalData, { query })
const updated = useContentfulLiveUpdates(originalData, { query });
// ...

@@ -392,2 +393,4 @@ ```

🚧 **Gatsby support is currently under development. Inspector mode is already supported, but some fields with live updates might not be working correctly**
To use the Contentful live preview SDK with Gatsby, you can start with the [gatsby starter contentful homepage](https://www.gatsbyjs.com/starters/gatsbyjs/gatsby-starter-contentful-homepage)

@@ -394,0 +397,0 @@

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