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

@contentful/live-preview

Package Overview
Dependencies
Maintainers
4
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 4.1.1 to 4.1.2

dist/index-2NJWBdxg.js

2

dist/index.js

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

import { C as t, I as o, L as E, b as a, e as n, V as i, a as I, f as r, o as d, c as p } from "./index-DJiGEKYp.js";
import { C as t, I as o, L as E, b as a, e as n, V as i, a as I, f as r, o as d, c as p } from "./index-2NJWBdxg.js";
export {

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

import { useEffect, type PropsWithChildren, type ReactElement } from 'react';
import { DocumentNode } from 'graphql';
import { ContentfulLivePreviewInitConfig } from './index.js';
import type { InspectorModeTags } from './inspectorMode/types.js';
import { Argument, LivePreviewAssetProps, LivePreviewEntryProps, LivePreviewProps } from './types.js';
import { ContentfulLivePreview, ContentfulLivePreviewInitConfig } from './index.js';
import { Argument } from './types.js';
type UseEffectParams = Parameters<typeof useEffect>;

@@ -28,11 +27,31 @@ type EffectCallback = UseEffectParams[0];

export declare function useContentfulLiveUpdates<T extends Argument | null | undefined>(data: T, locale?: string, skip?: boolean): T;
type GetInspectorModeProps<T> = (props: ({
[K in Exclude<keyof LivePreviewEntryProps, keyof T | 'locale' | 'environment' | 'space'>]: LivePreviewEntryProps[K];
type SharedProps = {
entryId?: string;
assetId?: string;
locale?: string;
space?: string;
environment?: string;
};
type InspectorModeProps = SharedProps & {
fieldId: string;
};
type RequireEntryOrAssetId<T, U> = U extends {
entryId: string;
} | {
[K in Exclude<keyof LivePreviewAssetProps, keyof T | 'locale' | 'environment' | 'space'>]: LivePreviewAssetProps[K];
}) & Pick<LivePreviewProps, 'environment' | 'locale' | 'space'>) => InspectorModeTags;
/**
* Generates the function to build the required properties for the inspector mode (field tagging)
*/
export declare function useContentfulInspectorMode<T = undefined | Partial<LivePreviewAssetProps> | Partial<LivePreviewEntryProps>>(sharedProps?: T): GetInspectorModeProps<T>;
assetId: string;
} ? T & {
locale?: string;
space?: string;
environment?: string;
} : T & ({
entryId: string;
} | {
assetId: string;
}) & {
locale?: string;
space?: string;
environment?: string;
};
type ConstrainedSharedProps<U> = U extends SharedProps ? U : never;
export declare function useContentfulInspectorMode<U extends SharedProps>(sharedProps?: ConstrainedSharedProps<U>): (props: RequireEntryOrAssetId<Omit<InspectorModeProps, keyof SharedProps>, U>) => ReturnType<typeof ContentfulLivePreview.getProps> | null;
export {};
import xe, { createContext as yr, useRef as N, useMemo as ee, useEffect as br, useState as hr, useContext as ke, useCallback as gr } from "react";
import { i as Er, C as re, d as Rr } from "./index-DJiGEKYp.js";
import { i as Er, C as re, d as Rr } from "./index-2NJWBdxg.js";
var Q = { exports: {} }, W = {};

@@ -4,0 +4,0 @@ /**

{
"name": "@contentful/live-preview",
"version": "4.1.1",
"version": "4.1.2",
"author": "Contentful GmbH",

@@ -75,3 +75,3 @@ "license": "MIT",

},
"gitHead": "8f225235823488d73bed4a515de2785217c0f051"
"gitHead": "b1c292be6cb412f1d06f840c066af266b849da54"
}

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

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