@contentful/live-preview
Advanced tools
Comparing version 4.5.3 to 4.5.4
@@ -1,2 +0,2 @@ | ||
import { C as o, I as t, L as n, c as E, e as a, V as i, u as I, a as r, f as d, o as p, b as R } from "./index-Br2Z3Job.js"; | ||
import { C as o, I as t, L as n, c as E, e as a, V as i, u as I, a as r, f as d, o as p, b as R } from "./index-DTAeTYjK.js"; | ||
export { | ||
@@ -3,0 +3,0 @@ o as ContentfulLivePreview, |
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-Br2Z3Job.js"; | ||
import { i as Er, C as re, d as Rr } from "./index-DTAeTYjK.js"; | ||
var Q = { exports: {} }, W = {}; | ||
@@ -14,12 +14,12 @@ /** | ||
var Oe; | ||
function mr() { | ||
function _r() { | ||
if (Oe) return W; | ||
Oe = 1; | ||
var u = xe, s = Symbol.for("react.element"), h = Symbol.for("react.fragment"), E = Object.prototype.hasOwnProperty, m = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, _ = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
var u = xe, s = Symbol.for("react.element"), h = Symbol.for("react.fragment"), E = Object.prototype.hasOwnProperty, _ = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function C(p, l, T) { | ||
var y, P = {}, S = null, Y = null; | ||
T !== void 0 && (S = "" + T), l.key !== void 0 && (S = "" + l.key), l.ref !== void 0 && (Y = l.ref); | ||
for (y in l) E.call(l, y) && !_.hasOwnProperty(y) && (P[y] = l[y]); | ||
for (y in l) E.call(l, y) && !m.hasOwnProperty(y) && (P[y] = l[y]); | ||
if (p && p.defaultProps) for (y in l = p.defaultProps, l) P[y] === void 0 && (P[y] = l[y]); | ||
return { $$typeof: s, type: p, key: S, ref: Y, props: P, _owner: m.current }; | ||
return { $$typeof: s, type: p, key: S, ref: Y, props: P, _owner: _.current }; | ||
} | ||
@@ -39,5 +39,5 @@ return W.Fragment = h, W.jsx = C, W.jsxs = C, W; | ||
var je; | ||
function _r() { | ||
function mr() { | ||
return je || (je = 1, process.env.NODE_ENV !== "production" && function() { | ||
var u = xe, s = Symbol.for("react.element"), h = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), C = Symbol.for("react.provider"), p = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), ne = Symbol.iterator, De = "@@iterator"; | ||
var u = xe, s = Symbol.for("react.element"), h = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), C = Symbol.for("react.provider"), p = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), ne = Symbol.iterator, De = "@@iterator"; | ||
function Ae(e) { | ||
@@ -70,3 +70,3 @@ if (e === null || typeof e != "object") | ||
function Me(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === E || e === _ || Le || e === m || e === T || e === y || Ye || e === Y || Ie || We || $e || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === P || e.$$typeof === C || e.$$typeof === p || e.$$typeof === l || // This needs to include all possible module reference object | ||
return !!(typeof e == "string" || typeof e == "function" || e === E || e === m || Le || e === _ || e === T || e === y || Ye || e === Y || Ie || We || $e || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === P || e.$$typeof === C || e.$$typeof === p || e.$$typeof === l || // This needs to include all possible module reference object | ||
// types supported by any Flight configuration anywhere since | ||
@@ -99,5 +99,5 @@ // we don't know which Flight build this will end up being used | ||
return "Portal"; | ||
case m: | ||
return "Profiler"; | ||
case _: | ||
return "Profiler"; | ||
case m: | ||
return "StrictMode"; | ||
@@ -470,9 +470,9 @@ case T: | ||
} | ||
var G = x.ReactCurrentOwner, me = x.ReactDebugCurrentFrame; | ||
var G = x.ReactCurrentOwner, _e = x.ReactDebugCurrentFrame; | ||
function k(e) { | ||
if (e) { | ||
var r = e._owner, t = U(e.type, e._source, r ? r.type : null); | ||
me.setExtraStackFrame(t); | ||
_e.setExtraStackFrame(t); | ||
} else | ||
me.setExtraStackFrame(null); | ||
_e.setExtraStackFrame(null); | ||
} | ||
@@ -484,3 +484,3 @@ var X; | ||
} | ||
function _e() { | ||
function me() { | ||
{ | ||
@@ -498,11 +498,3 @@ if (G.current) { | ||
function or(e) { | ||
{ | ||
if (e !== void 0) { | ||
var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber; | ||
return ` | ||
Check your code at ` + r + ":" + t + "."; | ||
} | ||
return ""; | ||
} | ||
return ""; | ||
} | ||
@@ -512,3 +504,3 @@ var Ce = {}; | ||
{ | ||
var r = _e(); | ||
var r = me(); | ||
if (!r) { | ||
@@ -599,4 +591,4 @@ var t = typeof e == "string" ? e : e.displayName || e.name; | ||
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " 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 b = or(i); | ||
b ? a += b : a += _e(); | ||
var b = or(); | ||
b ? a += b : a += me(); | ||
var c; | ||
@@ -648,3 +640,3 @@ e === null ? c = "null" : K(e) ? c = "array" : e !== void 0 && e.$$typeof === s ? (c = "<" + (w(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : c = typeof e, d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", c, a); | ||
} | ||
process.env.NODE_ENV === "production" ? Q.exports = mr() : Q.exports = _r(); | ||
process.env.NODE_ENV === "production" ? Q.exports = _r() : Q.exports = mr(); | ||
var Cr = Q.exports; | ||
@@ -664,4 +656,4 @@ function Tr(u) { | ||
environment: E, | ||
debugMode: m = !1, | ||
enableInspectorMode: _ = !0, | ||
debugMode: _ = !1, | ||
enableInspectorMode: m = !0, | ||
enableLiveUpdates: C = !0, | ||
@@ -679,4 +671,4 @@ targetOrigin: p, | ||
environment: E, | ||
debugMode: m, | ||
enableInspectorMode: _, | ||
debugMode: _, | ||
enableInspectorMode: m, | ||
enableLiveUpdates: C, | ||
@@ -691,8 +683,8 @@ targetOrigin: p, | ||
environment: E, | ||
debugMode: m, | ||
enableInspectorMode: _, | ||
debugMode: _, | ||
enableInspectorMode: m, | ||
enableLiveUpdates: C, | ||
targetOrigin: p | ||
}), | ||
[s, h, E, m, _, C, p] | ||
[s, h, E, _, m, C, p] | ||
); | ||
@@ -702,5 +694,5 @@ return /* @__PURE__ */ Cr.jsx(te.Provider, { value: T, children: u }); | ||
function jr(u, s, h = !1) { | ||
const [E, m] = hr({ data: u, version: 1 }), _ = N(u), C = N(Rr(m)), p = ke(te), l = typeof s == "object" ? s : { locale: s, skip: h }, T = ee(() => p && !p.enableLiveUpdates || l.skip ? !1 : !!(Array.isArray(u) && u.length || u && typeof u == "object" && Object.keys(u).length), [p, l.skip, u]); | ||
const [E, _] = hr({ data: u, version: 1 }), m = N(u), C = N(Rr(_)), p = ke(te), l = typeof s == "object" ? s : { locale: s, skip: h }, T = ee(() => p && !p.enableLiveUpdates || l.skip ? !1 : !!(Array.isArray(u) && u.length || u && typeof u == "object" && Object.keys(u).length), [p, l.skip, u]); | ||
return Pr(() => { | ||
if (_.current !== u && (m({ data: u, version: 1 }), _.current = u), !!T) | ||
if (m.current !== u && (_({ data: u, version: 1 }), m.current = u), !!T) | ||
return re.subscribe("edit", { | ||
@@ -707,0 +699,0 @@ data: u, |
{ | ||
"name": "@contentful/live-preview", | ||
"version": "4.5.3", | ||
"version": "4.5.4", | ||
"author": "Contentful GmbH", | ||
@@ -66,3 +66,3 @@ "license": "MIT", | ||
"graphql": "^16.6.0", | ||
"jsdom": "^24.0.0", | ||
"jsdom": "^25.0.0", | ||
"react": "^18.2.0", | ||
@@ -76,3 +76,3 @@ "react-dom": "^18.2.0", | ||
}, | ||
"gitHead": "8c62a4f099f9728067fe63a9585722220c934e67" | ||
"gitHead": "a8538a5cfbf55d4f28ac92721ec6e71071849612" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
625717
2926