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

@contentful/live-preview

Package Overview
Dependencies
Maintainers
165
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 1.14.0 to 1.14.1

dist/index-0a5c53eb.js

4

dist/index.d.ts

@@ -6,3 +6,3 @@ import { FieldTagging } from './fieldTagging';

debugMode?: boolean;
enableFieldTagging?: boolean;
enableInspectorMode?: boolean;
enableLiveUpdates?: boolean;

@@ -15,3 +15,3 @@ }

static liveUpdatesEnabled: boolean;
static init({ debugMode, enableFieldTagging, enableLiveUpdates }?: ContentfulLivePreviewInitConfig): Promise<FieldTagging | null> | undefined;
static init({ debugMode, enableInspectorMode, enableLiveUpdates }?: ContentfulLivePreviewInitConfig): Promise<FieldTagging | null> | undefined;
static subscribe(data: Argument, locale: string, callback: SubscribeCallback): VoidFunction;

@@ -18,0 +18,0 @@ static getProps({ fieldId, entryId, locale, }: LivePreviewProps): Record<TagAttributes, string | null | undefined>;

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

import { C as r } from "./index-7eac4424.js";
import { C as r } from "./index-0a5c53eb.js";
export {

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

import * as f from "react";
import { useState as v, useRef as c } from "react";
import { d as o, C as g } from "./index-7eac4424.js";
import { d as o, C as g } from "./index-0a5c53eb.js";
var l = Object.prototype.hasOwnProperty;

@@ -5,0 +5,0 @@ function p(e, t, n) {

{
"name": "@contentful/live-preview",
"version": "1.14.0",
"version": "1.14.1",
"author": "Contentful GmbH",

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

# @contentful/live-preview
> **Warning:** This package is currently in an **ALPHA** state (i.e., not suitable for production use and subject to breaking changes).
Preview SDK for both the field tagging connection + live content updates by [Contentful](https://www.contentful.com/).

@@ -29,2 +27,4 @@

- [Developer Documentation](https://www.contentful.com/developers/docs/tutorials/general/live-preview/)
### Initializing the SDK

@@ -52,3 +52,3 @@

ContentfulLivePreview.init({
enablefieldTagging: false, // This allows you to toggle the inspector mode which is on by default
enableInspectorMode: false, // This allows you to toggle the inspector mode which is on by default
enableLiveUpdates: false, // This allows you to toggle the live updates which is on by default

@@ -59,5 +59,5 @@ debugMode: false, // This allows you to toggle the debug mode which is off by default

### Field Tagging
### Inspector Mode (field tagging)
To tag fields you need to add the live preview data-attributes (`data-contentful-entry-id`, `data-contentful-field-id`, `data-contentful-locale`) to the rendered HTML element output.
To use the inspector mode, you need to tag fields by adding the live preview data-attributes (`data-contentful-entry-id`, `data-contentful-field-id`, `data-contentful-locale`) to the rendered HTML element output.
You can do this in React via our helper function.

@@ -64,0 +64,0 @@ The necessary styles for the live edit tags can be found in the '@contentful/live-preview/style.css' file.

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