@contentful/experiences-visual-editor-react 1.34.1-dev-20250305T1755-8013879.0 → 1.35.0-dev-20250306T1427-f5acfab.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +96 -0
- package/dist/index.js.map +1 -1
- package/dist/renderApp.js +96 -0
- package/dist/renderApp.js.map +1 -1
- package/package.json +4 -4
package/dist/renderApp.js
CHANGED
|
@@ -44564,6 +44564,54 @@ const sanitizeNodeProps = (nodeProps) => {
|
|
|
44564
44564
|
return omit(nodeProps, stylesToRemove, propsToRemove);
|
|
44565
44565
|
};
|
|
44566
44566
|
|
|
44567
|
+
const CF_DEBUG_KEY$1 = 'cf_debug';
|
|
44568
|
+
let DebugLogger$1 = class DebugLogger {
|
|
44569
|
+
constructor() {
|
|
44570
|
+
// Public methods for logging
|
|
44571
|
+
this.error = this.logger('error');
|
|
44572
|
+
this.warn = this.logger('warn');
|
|
44573
|
+
this.log = this.logger('log');
|
|
44574
|
+
this.debug = this.logger('debug');
|
|
44575
|
+
if (typeof localStorage === 'undefined') {
|
|
44576
|
+
this.enabled = false;
|
|
44577
|
+
return;
|
|
44578
|
+
}
|
|
44579
|
+
// Default to checking localStorage for the debug mode on initialization if in browser
|
|
44580
|
+
this.enabled = localStorage.getItem(CF_DEBUG_KEY$1) === 'true';
|
|
44581
|
+
}
|
|
44582
|
+
static getInstance() {
|
|
44583
|
+
if (this.instance === null) {
|
|
44584
|
+
this.instance = new DebugLogger();
|
|
44585
|
+
}
|
|
44586
|
+
return this.instance;
|
|
44587
|
+
}
|
|
44588
|
+
getEnabled() {
|
|
44589
|
+
return this.enabled;
|
|
44590
|
+
}
|
|
44591
|
+
setEnabled(enabled) {
|
|
44592
|
+
this.enabled = enabled;
|
|
44593
|
+
if (typeof localStorage === 'undefined') {
|
|
44594
|
+
return;
|
|
44595
|
+
}
|
|
44596
|
+
if (enabled) {
|
|
44597
|
+
localStorage.setItem(CF_DEBUG_KEY$1, 'true');
|
|
44598
|
+
}
|
|
44599
|
+
else {
|
|
44600
|
+
localStorage.removeItem(CF_DEBUG_KEY$1);
|
|
44601
|
+
}
|
|
44602
|
+
}
|
|
44603
|
+
// Log method for different levels (error, warn, log)
|
|
44604
|
+
logger(level) {
|
|
44605
|
+
return (...args) => {
|
|
44606
|
+
if (this.enabled) {
|
|
44607
|
+
console[level]('[cf-experiences-sdk]', ...args);
|
|
44608
|
+
}
|
|
44609
|
+
};
|
|
44610
|
+
}
|
|
44611
|
+
};
|
|
44612
|
+
DebugLogger$1.instance = null;
|
|
44613
|
+
DebugLogger$1.getInstance();
|
|
44614
|
+
|
|
44567
44615
|
const sendMessage = (eventType, data) => {
|
|
44568
44616
|
if (typeof window === 'undefined') {
|
|
44569
44617
|
return;
|
|
@@ -58625,6 +58673,54 @@ var CodeNames;
|
|
|
58625
58673
|
CodeNames["Custom"] = "custom";
|
|
58626
58674
|
})(CodeNames || (CodeNames = {}));
|
|
58627
58675
|
|
|
58676
|
+
const CF_DEBUG_KEY = 'cf_debug';
|
|
58677
|
+
class DebugLogger {
|
|
58678
|
+
constructor() {
|
|
58679
|
+
// Public methods for logging
|
|
58680
|
+
this.error = this.logger('error');
|
|
58681
|
+
this.warn = this.logger('warn');
|
|
58682
|
+
this.log = this.logger('log');
|
|
58683
|
+
this.debug = this.logger('debug');
|
|
58684
|
+
if (typeof localStorage === 'undefined') {
|
|
58685
|
+
this.enabled = false;
|
|
58686
|
+
return;
|
|
58687
|
+
}
|
|
58688
|
+
// Default to checking localStorage for the debug mode on initialization if in browser
|
|
58689
|
+
this.enabled = localStorage.getItem(CF_DEBUG_KEY) === 'true';
|
|
58690
|
+
}
|
|
58691
|
+
static getInstance() {
|
|
58692
|
+
if (this.instance === null) {
|
|
58693
|
+
this.instance = new DebugLogger();
|
|
58694
|
+
}
|
|
58695
|
+
return this.instance;
|
|
58696
|
+
}
|
|
58697
|
+
getEnabled() {
|
|
58698
|
+
return this.enabled;
|
|
58699
|
+
}
|
|
58700
|
+
setEnabled(enabled) {
|
|
58701
|
+
this.enabled = enabled;
|
|
58702
|
+
if (typeof localStorage === 'undefined') {
|
|
58703
|
+
return;
|
|
58704
|
+
}
|
|
58705
|
+
if (enabled) {
|
|
58706
|
+
localStorage.setItem(CF_DEBUG_KEY, 'true');
|
|
58707
|
+
}
|
|
58708
|
+
else {
|
|
58709
|
+
localStorage.removeItem(CF_DEBUG_KEY);
|
|
58710
|
+
}
|
|
58711
|
+
}
|
|
58712
|
+
// Log method for different levels (error, warn, log)
|
|
58713
|
+
logger(level) {
|
|
58714
|
+
return (...args) => {
|
|
58715
|
+
if (this.enabled) {
|
|
58716
|
+
console[level]('[cf-experiences-sdk]', ...args);
|
|
58717
|
+
}
|
|
58718
|
+
};
|
|
58719
|
+
}
|
|
58720
|
+
}
|
|
58721
|
+
DebugLogger.instance = null;
|
|
58722
|
+
DebugLogger.getInstance();
|
|
58723
|
+
|
|
58628
58724
|
var VisualEditorMode;
|
|
58629
58725
|
(function (VisualEditorMode) {
|
|
58630
58726
|
VisualEditorMode["LazyLoad"] = "lazyLoad";
|