@uniformdev/canvas-next-rsc-client 20.49.3 → 20.49.4-alpha.2
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.esm.js +16 -1
- package/dist/index.js +16 -1
- package/dist/index.mjs +16 -1
- package/package.json +5 -5
package/dist/index.esm.js
CHANGED
|
@@ -689,10 +689,20 @@ calculateScores_fn = function(newData) {
|
|
|
689
689
|
return newScores;
|
|
690
690
|
};
|
|
691
691
|
var isBrowser = typeof top !== "undefined";
|
|
692
|
+
function isInCrossOriginIframe() {
|
|
693
|
+
if (!isBrowser) {
|
|
694
|
+
return false;
|
|
695
|
+
}
|
|
696
|
+
try {
|
|
697
|
+
return top !== window && !(top == null ? void 0 : top.location.href);
|
|
698
|
+
} catch (e) {
|
|
699
|
+
return true;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
692
702
|
function enableContextDevTools(options) {
|
|
693
703
|
return {
|
|
694
704
|
logDrain: (message) => {
|
|
695
|
-
if (!isBrowser) {
|
|
705
|
+
if (!isBrowser || isInCrossOriginIframe()) {
|
|
696
706
|
return;
|
|
697
707
|
}
|
|
698
708
|
top == null ? void 0 : top.postMessage(
|
|
@@ -704,6 +714,11 @@ function enableContextDevTools(options) {
|
|
|
704
714
|
);
|
|
705
715
|
},
|
|
706
716
|
init: (context) => {
|
|
717
|
+
if (isInCrossOriginIframe()) {
|
|
718
|
+
console.info("Uniform Context DevTools disabled in cross-origin iframe");
|
|
719
|
+
return () => {
|
|
720
|
+
};
|
|
721
|
+
}
|
|
707
722
|
const personalizations = [];
|
|
708
723
|
const tests = [];
|
|
709
724
|
const onContextDataUpdated = () => {
|
package/dist/index.js
CHANGED
|
@@ -715,10 +715,20 @@ calculateScores_fn = function(newData) {
|
|
|
715
715
|
return newScores;
|
|
716
716
|
};
|
|
717
717
|
var isBrowser = typeof top !== "undefined";
|
|
718
|
+
function isInCrossOriginIframe() {
|
|
719
|
+
if (!isBrowser) {
|
|
720
|
+
return false;
|
|
721
|
+
}
|
|
722
|
+
try {
|
|
723
|
+
return top !== window && !(top == null ? void 0 : top.location.href);
|
|
724
|
+
} catch (e) {
|
|
725
|
+
return true;
|
|
726
|
+
}
|
|
727
|
+
}
|
|
718
728
|
function enableContextDevTools(options) {
|
|
719
729
|
return {
|
|
720
730
|
logDrain: (message) => {
|
|
721
|
-
if (!isBrowser) {
|
|
731
|
+
if (!isBrowser || isInCrossOriginIframe()) {
|
|
722
732
|
return;
|
|
723
733
|
}
|
|
724
734
|
top == null ? void 0 : top.postMessage(
|
|
@@ -730,6 +740,11 @@ function enableContextDevTools(options) {
|
|
|
730
740
|
);
|
|
731
741
|
},
|
|
732
742
|
init: (context) => {
|
|
743
|
+
if (isInCrossOriginIframe()) {
|
|
744
|
+
console.info("Uniform Context DevTools disabled in cross-origin iframe");
|
|
745
|
+
return () => {
|
|
746
|
+
};
|
|
747
|
+
}
|
|
733
748
|
const personalizations = [];
|
|
734
749
|
const tests = [];
|
|
735
750
|
const onContextDataUpdated = () => {
|
package/dist/index.mjs
CHANGED
|
@@ -689,10 +689,20 @@ calculateScores_fn = function(newData) {
|
|
|
689
689
|
return newScores;
|
|
690
690
|
};
|
|
691
691
|
var isBrowser = typeof top !== "undefined";
|
|
692
|
+
function isInCrossOriginIframe() {
|
|
693
|
+
if (!isBrowser) {
|
|
694
|
+
return false;
|
|
695
|
+
}
|
|
696
|
+
try {
|
|
697
|
+
return top !== window && !(top == null ? void 0 : top.location.href);
|
|
698
|
+
} catch (e) {
|
|
699
|
+
return true;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
692
702
|
function enableContextDevTools(options) {
|
|
693
703
|
return {
|
|
694
704
|
logDrain: (message) => {
|
|
695
|
-
if (!isBrowser) {
|
|
705
|
+
if (!isBrowser || isInCrossOriginIframe()) {
|
|
696
706
|
return;
|
|
697
707
|
}
|
|
698
708
|
top == null ? void 0 : top.postMessage(
|
|
@@ -704,6 +714,11 @@ function enableContextDevTools(options) {
|
|
|
704
714
|
);
|
|
705
715
|
},
|
|
706
716
|
init: (context) => {
|
|
717
|
+
if (isInCrossOriginIframe()) {
|
|
718
|
+
console.info("Uniform Context DevTools disabled in cross-origin iframe");
|
|
719
|
+
return () => {
|
|
720
|
+
};
|
|
721
|
+
}
|
|
707
722
|
const personalizations = [];
|
|
708
723
|
const tests = [];
|
|
709
724
|
const onContextDataUpdated = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-next-rsc-client",
|
|
3
|
-
"version": "20.49.
|
|
3
|
+
"version": "20.49.4-alpha.2+0201693aca",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsup",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"typescript": "5.9.2"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@uniformdev/canvas": "20.49.
|
|
37
|
-
"@uniformdev/canvas-next-rsc-shared": "20.49.
|
|
38
|
-
"@uniformdev/canvas-react": "20.49.
|
|
36
|
+
"@uniformdev/canvas": "20.49.4-alpha.2+0201693aca",
|
|
37
|
+
"@uniformdev/canvas-next-rsc-shared": "20.49.4-alpha.2+0201693aca",
|
|
38
|
+
"@uniformdev/canvas-react": "20.49.4-alpha.2+0201693aca",
|
|
39
39
|
"js-cookie": "3.0.5"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "0201693aca0f20b06ffaaef22decc086ec730035"
|
|
53
53
|
}
|