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

@contentful/live-preview

Package Overview
Dependencies
Maintainers
175
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.15.2 to 2.17.1

dist/csm/encode.d.ts

4

dist/helpers/utils.d.ts

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

import type { EditorMessage } from '../messages';
import { PostMessageMethods } from '../messages';
import type { EditorMessage } from '../messages';
/**

@@ -14,3 +14,3 @@ * Sends the given message to the editor

*/
export declare class StorageMap<T extends unknown> {
export declare class StorageMap<T> {
private storageKey;

@@ -17,0 +17,0 @@ private value;

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

import { DocumentNode } from 'graphql';
import type { ContentfulSubscribeConfig } from '..';
import { Argument, SubscribeCallback } from '../types';
import { DocumentNode } from 'graphql';
type ValidatedConfig = {

@@ -5,0 +5,0 @@ data: Argument;

@@ -20,2 +20,5 @@ import { type DocumentNode } from 'graphql';

targetOrigin?: string | string[];
experimental?: {
ignoreManuallyTaggedElements?: boolean;
};
}

@@ -22,0 +25,0 @@ export interface ContentfulSubscribeConfig {

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

import { C as t, I as o, L as E, a, b as i, P as I, V as n, e as r, o as P } from "./index-NIkMjWc6.js";
import { C as t, I as o, L as E, a, b as i, P as I, V as n, e as r, o as P } from "./index-b4Vp5X41.js";
export {

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

import { type MessageFromEditor } from '../messages';
type InspectorModeOptions = {
locale: string;
targetOrigin: string[];
ignoreManuallyTaggedElements?: boolean;
};
export declare class InspectorMode {
private defaultLocale;
private targetOrigin;
private options;
private isScrolling;

@@ -12,7 +16,4 @@ private scrollTimeout?;

private taggedElementMutationObserver?;
constructor({ locale, targetOrigin }: {
locale: string;
targetOrigin: string[];
});
receiveMessage(data: MessageFromEditor): void;
constructor(options: InspectorModeOptions);
receiveMessage: (data: MessageFromEditor) => void;
/** Checks if the hovered element is an tagged entry and then sends it to the editor */

@@ -37,1 +38,2 @@ private addHoverListener;

}
export {};

@@ -6,9 +6,7 @@ import { InspectorModeAttributes } from './types';

*/
export declare function getInspectorModeAttributes(element: Element, fallbackLocale?: string): InspectorModeAttributes | null;
export declare function getInspectorModeAttributes(element: Element, fallbackLocale: string): InspectorModeAttributes | null;
/**
* Query the document for all tagged elements
* **Attention:** Can include elements that have not all attributes,
* if you want to have only valid ones check for `getTaggedInformation`
*/
export declare function getAllTaggedElements(): Element[];
export declare function getAllTaggedElements(root?: Document, ignoreManual?: boolean): Element[];
/**

@@ -15,0 +13,0 @@ * Returns a list of tagged entries on the page

@@ -16,3 +16,3 @@ import { useEffect, type PropsWithChildren, type ReactElement } from 'react';

*/
export declare function ContentfulLivePreviewProvider({ children, locale, debugMode, enableInspectorMode, enableLiveUpdates, targetOrigin, }: PropsWithChildren<ContentfulLivePreviewInitConfig>): ReactElement;
export declare function ContentfulLivePreviewProvider({ children, locale, debugMode, enableInspectorMode, enableLiveUpdates, targetOrigin, experimental, }: PropsWithChildren<ContentfulLivePreviewInitConfig>): ReactElement;
interface Options {

@@ -19,0 +19,0 @@ locale?: string;

import Zr, { createContext as At, useRef as mr, useMemo as $r, useEffect as jt, useState as Dt, useContext as Qr, useCallback as It } from "react";
import { c as Er, g as Ft, C as Ur, d as Lt } from "./index-NIkMjWc6.js";
import { c as Er, g as Ft, C as Ur, d as Lt } from "./index-b4Vp5X41.js";
var Mr = { exports: {} }, Me = {};
/**
* @license React
* react-jsx-runtime.development.js
* react-jsx-runtime.production.min.js
*

@@ -15,4 +15,32 @@ * Copyright (c) Facebook, Inc. and its affiliates.

function Mt() {
return Jr || (Jr = 1, process.env.NODE_ENV !== "production" && function() {
var d = Zr, v = Symbol.for("react.element"), P = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), A = Symbol.for("react.strict_mode"), I = Symbol.for("react.profiler"), U = Symbol.for("react.provider"), j = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), Y = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), ie = Symbol.for("react.offscreen"), Ue = Symbol.iterator, de = "@@iterator";
if (Jr)
return Me;
Jr = 1;
var d = Zr, v = Symbol.for("react.element"), x = Symbol.for("react.fragment"), A = Object.prototype.hasOwnProperty, j = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, I = { key: !0, ref: !0, __self: !0, __source: !0 };
function U(w, _, Y) {
var C, F = {}, H = null, ie = null;
Y !== void 0 && (H = "" + Y), _.key !== void 0 && (H = "" + _.key), _.ref !== void 0 && (ie = _.ref);
for (C in _)
A.call(_, C) && !I.hasOwnProperty(C) && (F[C] = _[C]);
if (w && w.defaultProps)
for (C in _ = w.defaultProps, _)
F[C] === void 0 && (F[C] = _[C]);
return { $$typeof: v, type: w, key: H, ref: ie, props: F, _owner: j.current };
}
return Me.Fragment = x, Me.jsx = U, Me.jsxs = U, Me;
}
var $e = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Xr;
function $t() {
return Xr || (Xr = 1, process.env.NODE_ENV !== "production" && function() {
var d = Zr, v = Symbol.for("react.element"), x = Symbol.for("react.portal"), A = Symbol.for("react.fragment"), j = Symbol.for("react.strict_mode"), I = Symbol.for("react.profiler"), U = Symbol.for("react.provider"), w = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), Y = Symbol.for("react.suspense"), C = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), ie = Symbol.for("react.offscreen"), Ue = Symbol.iterator, de = "@@iterator";
function Ne(r) {

@@ -45,3 +73,3 @@ if (r === null || typeof r != "object")

function we(r) {
return !!(typeof r == "string" || typeof r == "function" || r === x || r === I || wr || r === A || r === Y || r === w || ze || r === ie || Rr || Ye || pe || typeof r == "object" && r !== null && (r.$$typeof === H || r.$$typeof === F || r.$$typeof === U || r.$$typeof === j || r.$$typeof === _ || // This needs to include all possible module reference object
return !!(typeof r == "string" || typeof r == "function" || r === A || r === I || wr || r === j || r === Y || r === C || ze || r === ie || Rr || Ye || pe || typeof r == "object" && r !== null && (r.$$typeof === H || r.$$typeof === F || r.$$typeof === U || r.$$typeof === w || r.$$typeof === _ || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since

@@ -70,13 +98,13 @@ // we don't know which Flight build this will end up being used

switch (r) {
case A:
return "Fragment";
case x:
return "Fragment";
case P:
return "Portal";
case I:
return "Profiler";
case A:
case j:
return "StrictMode";
case Y:
return "Suspense";
case w:
case C:
return "SuspenseList";

@@ -86,3 +114,3 @@ }

switch (r.$$typeof) {
case j:
case w:
var a = r;

@@ -239,10 +267,10 @@ return oe(a) + ".Consumer";

for (var f = G.stack.split(`
`), S = s.stack.split(`
`), y = f.length - 1, m = S.length - 1; y >= 1 && m >= 0 && f[y] !== S[m]; )
`), O = s.stack.split(`
`), y = f.length - 1, m = O.length - 1; y >= 1 && m >= 0 && f[y] !== O[m]; )
m--;
for (; y >= 1 && m >= 0; y--, m--)
if (f[y] !== S[m]) {
if (f[y] !== O[m]) {
if (y !== 1 || m !== 1)
do
if (y--, m--, m < 0 || f[y] !== S[m]) {
if (y--, m--, m < 0 || f[y] !== O[m]) {
var R = `

@@ -279,3 +307,3 @@ ` + f[y].replace(" at new ", " at ");

return L("Suspense");
case w:
case C:
return L("SuspenseList");

@@ -315,4 +343,4 @@ }

if (typeof r[c] != "function") {
var S = Error((s || "React class") + ": " + i + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[c] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw S.name = "Invariant Violation", S;
var O = Error((s || "React class") + ": " + i + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[c] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw O.name = "Invariant Violation", O;
}

@@ -433,4 +461,4 @@ f = r[c](a, c, s, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");

{
var l, c = {}, f = null, S = null;
i !== void 0 && (ir(i), f = "" + i), Ar(a) && (ir(a.key), f = "" + a.key), or(a) && (S = a.ref, sr(a, p));
var l, c = {}, f = null, O = null;
i !== void 0 && (ir(i), f = "" + i), Ar(a) && (ir(a.key), f = "" + a.key), or(a) && (O = a.ref, sr(a, p));
for (l in a)

@@ -443,7 +471,7 @@ ye.call(a, l) && !Oe.hasOwnProperty(l) && (c[l] = a[l]);

}
if (f || S) {
if (f || O) {
var m = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
f && me(c, m), S && ur(c, m);
f && me(c, m), O && ur(c, m);
}
return fr(r, f, S, p, s, K.current, c);
return fr(r, f, O, p, s, K.current, c);
}

@@ -575,4 +603,4 @@ }

(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (f += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var S = je(p);
S ? f += S : f += Q();
var O = je(p);
O ? f += O : f += Q();
var y;

@@ -597,3 +625,3 @@ r === null ? y = "null" : Se(r) ? y = "array" : r !== void 0 && r.$$typeof === v ? (y = "<" + (z(r.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : y = typeof r, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", y, f);

}
return r === x ? Ir(m) : Dr(m), m;
return r === A ? Ir(m) : Dr(m), m;
}

@@ -608,39 +636,11 @@ }

var Ie = dr, V = Fr;
Me.Fragment = x, Me.jsx = Ie, Me.jsxs = V;
}()), Me;
$e.Fragment = A, $e.jsx = Ie, $e.jsxs = V;
}()), $e;
}
var $e = {};
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Xr;
function $t() {
if (Xr)
return $e;
Xr = 1;
var d = Zr, v = Symbol.for("react.element"), P = Symbol.for("react.fragment"), x = Object.prototype.hasOwnProperty, A = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, I = { key: !0, ref: !0, __self: !0, __source: !0 };
function U(j, _, Y) {
var w, F = {}, H = null, ie = null;
Y !== void 0 && (H = "" + Y), _.key !== void 0 && (H = "" + _.key), _.ref !== void 0 && (ie = _.ref);
for (w in _)
x.call(_, w) && !I.hasOwnProperty(w) && (F[w] = _[w]);
if (j && j.defaultProps)
for (w in _ = j.defaultProps, _)
F[w] === void 0 && (F[w] = _[w]);
return { $$typeof: v, type: j, key: H, ref: ie, props: F, _owner: A.current };
}
return $e.Fragment = P, $e.jsx = U, $e.jsxs = U, $e;
}
process.env.NODE_ENV === "production" ? Mr.exports = $t() : Mr.exports = Mt();
process.env.NODE_ENV === "production" ? Mr.exports = Mt() : Mr.exports = $t();
var Ut = Mr.exports, Tr = { exports: {} };
Tr.exports;
(function(d, v) {
var P = 200, x = "__lodash_hash_undefined__", A = 1, I = 2, U = 9007199254740991, j = "[object Arguments]", _ = "[object Array]", Y = "[object AsyncFunction]", w = "[object Boolean]", F = "[object Date]", H = "[object Error]", ie = "[object Function]", Ue = "[object GeneratorFunction]", de = "[object Map]", Ne = "[object Number]", X = "[object Null]", E = "[object Object]", We = "[object Promise]", Rr = "[object Proxy]", Ye = "[object RegExp]", pe = "[object Set]", ze = "[object String]", wr = "[object Symbol]", Be = "[object Undefined]", we = "[object WeakMap]", Ge = "[object ArrayBuffer]", oe = "[object DataView]", z = "[object Float32Array]", k = "[object Float64Array]", se = "[object Int8Array]", qe = "[object Int16Array]", He = "[object Int32Array]", Ke = "[object Uint8Array]", ke = "[object Uint8ClampedArray]", Ve = "[object Uint16Array]", Je = "[object Uint32Array]", Xe = /[\\^$.*+?()[\]{}|]/g, Ze = /^\[object .+?Constructor\]$/, Cr = /^(?:0|[1-9]\d*)$/, g = {};
g[z] = g[k] = g[se] = g[qe] = g[He] = g[Ke] = g[ke] = g[Ve] = g[Je] = !0, g[j] = g[_] = g[Ge] = g[w] = g[oe] = g[F] = g[H] = g[ie] = g[de] = g[Ne] = g[E] = g[Ye] = g[pe] = g[ze] = g[we] = !1;
var x = 200, A = "__lodash_hash_undefined__", j = 1, I = 2, U = 9007199254740991, w = "[object Arguments]", _ = "[object Array]", Y = "[object AsyncFunction]", C = "[object Boolean]", F = "[object Date]", H = "[object Error]", ie = "[object Function]", Ue = "[object GeneratorFunction]", de = "[object Map]", Ne = "[object Number]", X = "[object Null]", E = "[object Object]", We = "[object Promise]", Rr = "[object Proxy]", Ye = "[object RegExp]", pe = "[object Set]", ze = "[object String]", wr = "[object Symbol]", Be = "[object Undefined]", we = "[object WeakMap]", Ge = "[object ArrayBuffer]", oe = "[object DataView]", z = "[object Float32Array]", k = "[object Float64Array]", se = "[object Int8Array]", qe = "[object Int16Array]", He = "[object Int32Array]", Ke = "[object Uint8Array]", ke = "[object Uint8ClampedArray]", Ve = "[object Uint16Array]", Je = "[object Uint32Array]", Xe = /[\\^$.*+?()[\]{}|]/g, Ze = /^\[object .+?Constructor\]$/, Cr = /^(?:0|[1-9]\d*)$/, g = {};
g[z] = g[k] = g[se] = g[qe] = g[He] = g[Ke] = g[ke] = g[Ve] = g[Je] = !0, g[w] = g[_] = g[Ge] = g[C] = g[oe] = g[F] = g[H] = g[ie] = g[de] = g[Ne] = g[E] = g[Ye] = g[pe] = g[ze] = g[we] = !1;
var ve = typeof Er == "object" && Er && Er.Object === Object && Er, Ce = typeof self == "object" && self && self.Object === Object && self, L = ve || Ce || Function("return this")(), ge = v && !v.nodeType && v, ue = ge && !0 && d && !d.nodeType && d, Qe = ue && ue.exports === ge, _e = Qe && ve.process, er = function() {

@@ -727,3 +727,3 @@ try {

var n = t[e];
return n === x ? void 0 : n;
return n === A ? void 0 : n;
}

@@ -738,3 +738,3 @@ return M.call(t, e) ? t[e] : void 0;

var n = this.__data__;
return this.size += this.has(e) ? 0 : 1, n[e] = ee && t === void 0 ? x : t, this;
return this.size += this.has(e) ? 0 : 1, n[e] = ee && t === void 0 ? A : t, this;
}

@@ -759,3 +759,3 @@ V.prototype.clear = r, V.prototype.delete = a, V.prototype.get = i, V.prototype.has = s, V.prototype.set = p;

}
function S(e) {
function O(e) {
var t = this.__data__, n = gr(t, e);

@@ -771,3 +771,3 @@ return n < 0 ? void 0 : t[n][1];

}
l.prototype.clear = c, l.prototype.delete = f, l.prototype.get = S, l.prototype.has = y, l.prototype.set = m;
l.prototype.clear = c, l.prototype.delete = f, l.prototype.get = O, l.prototype.has = y, l.prototype.set = m;
function R(e) {

@@ -808,3 +808,3 @@ var t = -1, n = e == null ? 0 : e.length;

function tt(e) {
return this.__data__.set(e, x), this;
return this.__data__.set(e, A), this;
}

@@ -836,3 +836,3 @@ function nt(e) {

var o = n.__data__;
if (!Q || o.length < P - 1)
if (!Q || o.length < x - 1)
return o.push([e, t]), this.size = ++n.size, this;

@@ -845,3 +845,3 @@ n = this.__data__ = new R(o);

function ft(e, t) {
var n = hr(e), o = !n && wt(e), h = !n && !o && Lr(e), u = !n && !o && !h && kr(e), T = n || o || h || u, C = T ? nr(e.length, String) : [], O = C.length;
var n = hr(e), o = !n && wt(e), h = !n && !o && Lr(e), u = !n && !o && !h && kr(e), T = n || o || h || u, S = T ? nr(e.length, String) : [], P = S.length;
for (var b in e)

@@ -852,4 +852,4 @@ (t || M.call(e, b)) && !(T && // Safari 9 has enumerable `arguments.length` in strict mode.

u && (b == "buffer" || b == "byteLength" || b == "byteOffset") || // Skip index properties.
bt(b, O))) && C.push(b);
return C;
bt(b, P))) && S.push(b);
return S;
}

@@ -870,3 +870,3 @@ function gr(e, t) {

function Wr(e) {
return Le(e) && Fe(e) == j;
return Le(e) && Fe(e) == w;
}

@@ -877,5 +877,5 @@ function Yr(e, t, n, o, h) {

function ct(e, t, n, o, h, u) {
var T = hr(e), C = hr(t), O = T ? _ : ne(e), b = C ? _ : ne(t);
O = O == j ? E : O, b = b == j ? E : b;
var $ = O == E, q = b == E, D = O == b;
var T = hr(e), S = hr(t), P = T ? _ : ne(e), b = S ? _ : ne(t);
P = P == w ? E : P, b = b == w ? E : b;
var $ = P == E, q = b == E, D = P == b;
if (D && Lr(e)) {

@@ -887,4 +887,4 @@ if (!Lr(t))

if (D && !$)
return u || (u = new te()), T || kr(e) ? zr(e, t, n, o, h, u) : gt(e, t, O, n, o, h, u);
if (!(n & A)) {
return u || (u = new te()), T || kr(e) ? zr(e, t, n, o, h, u) : gt(e, t, P, n, o, h, u);
if (!(n & j)) {
var N = $ && M.call(e, "__wrapped__"), W = q && M.call(t, "__wrapped__");

@@ -916,4 +916,4 @@ if (N || W) {

function zr(e, t, n, o, h, u) {
var T = n & A, C = e.length, O = t.length;
if (C != O && !(T && O > C))
var T = n & j, S = e.length, P = t.length;
if (S != P && !(T && P > S))
return !1;

@@ -924,3 +924,3 @@ var b = u.get(e);

var $ = -1, q = !0, D = n & I ? new vr() : void 0;
for (u.set(e, t), u.set(t, e); ++$ < C; ) {
for (u.set(e, t), u.set(t, e); ++$ < S; ) {
var N = e[$], W = t[$];

@@ -958,3 +958,3 @@ if (o)

return !(e.byteLength != t.byteLength || !u(new ur(e), new ur(t)));
case w:
case C:
case F:

@@ -969,6 +969,6 @@ case Ne:

case de:
var C = Se;
var S = Se;
case pe:
var O = o & A;
if (C || (C = xr), e.size != t.size && !O)
var P = o & j;
if (S || (S = xr), e.size != t.size && !P)
return !1;

@@ -979,3 +979,3 @@ var b = T.get(e);

o |= I, T.set(e, t);
var $ = zr(C(e), C(t), o, h, u, T);
var $ = zr(S(e), S(t), o, h, u, T);
return T.delete(e), $;

@@ -989,7 +989,7 @@ case wr:

function _t(e, t, n, o, h, u) {
var T = n & A, C = Br(e), O = C.length, b = Br(t), $ = b.length;
if (O != $ && !T)
var T = n & j, S = Br(e), P = S.length, b = Br(t), $ = b.length;
if (P != $ && !T)
return !1;
for (var q = O; q--; ) {
var D = C[q];
for (var q = P; q--; ) {
var D = S[q];
if (!(T ? D in t : M.call(t, D)))

@@ -1003,4 +1003,4 @@ return !1;

u.set(e, t), u.set(t, e);
for (var ae = T; ++q < O; ) {
D = C[q];
for (var ae = T; ++q < P; ) {
D = S[q];
var J = e[D], ce = t[D];

@@ -1140,4 +1140,4 @@ if (o)

function Yt(d) {
const v = mr(d), P = mr(0);
return Wt(d, v.current) || (v.current = d, P.current += 1), $r(() => v.current, [P.current]);
const v = mr(d), x = mr(0);
return Wt(d, v.current) || (v.current = d, x.current += 1), $r(() => v.current, [x.current]);
}

@@ -1151,6 +1151,7 @@ function zt(d, v) {

locale: v,
debugMode: P = !1,
enableInspectorMode: x = !0,
enableLiveUpdates: A = !0,
targetOrigin: I
debugMode: x = !1,
enableInspectorMode: A = !0,
enableLiveUpdates: j = !0,
targetOrigin: I,
experimental: U
}) {

@@ -1163,17 +1164,18 @@ if (!v)

locale: v,
debugMode: P,
enableInspectorMode: x,
enableLiveUpdates: A,
targetOrigin: I
debugMode: x,
enableInspectorMode: A,
enableLiveUpdates: j,
targetOrigin: I,
experimental: U
});
const U = $r(
() => ({ locale: v, debugMode: P, enableInspectorMode: x, enableLiveUpdates: A, targetOrigin: I }),
[v, P, x, A, I]
const w = $r(
() => ({ locale: v, debugMode: x, enableInspectorMode: A, enableLiveUpdates: j, targetOrigin: I }),
[v, x, A, j, I]
);
return /* @__PURE__ */ Ut.jsx(Nr.Provider, { value: U, children: d });
return /* @__PURE__ */ Ut.jsx(Nr.Provider, { value: w, children: d });
}
function Ht(d, v, P = !1) {
const [x, A] = Dt({ data: d, version: 1 }), I = mr(d), U = mr(Lt(A)), j = Qr(Nr), _ = typeof v == "object" ? v : { locale: v, skip: P }, Y = $r(() => j && !j.enableLiveUpdates || _.skip ? !1 : !!(Array.isArray(d) && d.length || d && typeof d == "object" && Object.keys(d).length), [j, _.skip, d]);
function Ht(d, v, x = !1) {
const [A, j] = Dt({ data: d, version: 1 }), I = mr(d), U = mr(Lt(j)), w = Qr(Nr), _ = typeof v == "object" ? v : { locale: v, skip: x }, Y = $r(() => w && !w.enableLiveUpdates || _.skip ? !1 : !!(Array.isArray(d) && d.length || d && typeof d == "object" && Object.keys(d).length), [w, _.skip, d]);
return zt(() => {
if (I.current !== d && (A({ data: d, version: 1 }), I.current = d), !!Y)
if (I.current !== d && (j({ data: d, version: 1 }), I.current = d), !!Y)
return Ur.subscribe("edit", {

@@ -1183,7 +1185,7 @@ data: d,

query: _.query,
callback: (w) => {
U.current((F) => ({ data: w, version: F.version + 1 }));
callback: (C) => {
U.current((F) => ({ data: C, version: F.version + 1 }));
}
});
}, [d, Y, _.locale, _.query]), x.data;
}, [d, Y, _.locale, _.query]), A.data;
}

@@ -1193,3 +1195,3 @@ function Kt(d) {

return It(
(P) => v != null && v.enableInspectorMode ? Ur.getProps({ ...d, ...P }) : null,
(x) => v != null && v.enableInspectorMode ? Ur.getProps({ ...d, ...x }) : null,
[v == null ? void 0 : v.enableInspectorMode, d]

@@ -1196,0 +1198,0 @@ );

{
"name": "@contentful/live-preview",
"version": "2.15.2",
"version": "2.17.1",
"author": "Contentful GmbH",

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

},
"gitHead": "c0de2ce063d3e9831ecff393a61c9961de1a86f1"
"gitHead": "751e56c30eb8117eb85c5e48997ac2712a1737b1"
}

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