cryptique-sdk 1.2.12 → 1.2.14
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/lib/cjs/index.js +35 -2
- package/lib/esm/index.js +35 -2
- package/lib/umd/index.js +35 -2
- package/package.json +1 -1
package/lib/cjs/index.js
CHANGED
|
@@ -92,8 +92,8 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
92
92
|
|
|
93
93
|
// Geolocation API
|
|
94
94
|
GEOLOCATION: {
|
|
95
|
-
PRIMARY_URL: "https://ipinfo.io/json?token=
|
|
96
|
-
BACKUP_URL: "https://ipinfo.io/json?token=
|
|
95
|
+
PRIMARY_URL: "https://ipinfo.io/json?token=73937f74acc045",
|
|
96
|
+
BACKUP_URL: "https://ipinfo.io/json?token=73937f74acc045&http=1.1",
|
|
97
97
|
TIMEOUT_MS: 5000 // 5 second timeout
|
|
98
98
|
},
|
|
99
99
|
|
|
@@ -7926,6 +7926,39 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7926
7926
|
initializeSDK();
|
|
7927
7927
|
}
|
|
7928
7928
|
|
|
7929
|
+
// ============================================================================
|
|
7930
|
+
// HEATMAP IFRAME BRIDGE
|
|
7931
|
+
// When the SDK-instrumented page is embedded inside the Cryptique heatmap
|
|
7932
|
+
// viewer iframe, report the full document height to the parent so the canvas
|
|
7933
|
+
// overlay can be sized correctly (cross-origin pages cannot be read directly).
|
|
7934
|
+
// ============================================================================
|
|
7935
|
+
if (window.self !== window.top) {
|
|
7936
|
+
const _sendHeatmapDimensions = () => {
|
|
7937
|
+
try {
|
|
7938
|
+
const h = Math.max(
|
|
7939
|
+
document.body ? document.body.scrollHeight : 0,
|
|
7940
|
+
document.documentElement ? document.documentElement.scrollHeight : 0
|
|
7941
|
+
);
|
|
7942
|
+
if (h > 0) {
|
|
7943
|
+
window.parent.postMessage({ type: 'cryptique_heatmap_dimensions', document_height: h }, '*');
|
|
7944
|
+
}
|
|
7945
|
+
} catch (_) {}
|
|
7946
|
+
};
|
|
7947
|
+
|
|
7948
|
+
// Send once the DOM is fully painted
|
|
7949
|
+
if (document.readyState === 'complete') {
|
|
7950
|
+
_sendHeatmapDimensions();
|
|
7951
|
+
} else {
|
|
7952
|
+
window.addEventListener('load', _sendHeatmapDimensions);
|
|
7953
|
+
}
|
|
7954
|
+
|
|
7955
|
+
// Re-send whenever the page grows (lazy-loaded content, SPAs, accordions, etc.)
|
|
7956
|
+
try {
|
|
7957
|
+
const _heatmapRO = new ResizeObserver(_sendHeatmapDimensions);
|
|
7958
|
+
_heatmapRO.observe(document.documentElement);
|
|
7959
|
+
} catch (_) {}
|
|
7960
|
+
}
|
|
7961
|
+
|
|
7929
7962
|
// ============================================================================
|
|
7930
7963
|
// END OF SECTION 15
|
|
7931
7964
|
// ============================================================================
|
package/lib/esm/index.js
CHANGED
|
@@ -90,8 +90,8 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
90
90
|
|
|
91
91
|
// Geolocation API
|
|
92
92
|
GEOLOCATION: {
|
|
93
|
-
PRIMARY_URL: "https://ipinfo.io/json?token=
|
|
94
|
-
BACKUP_URL: "https://ipinfo.io/json?token=
|
|
93
|
+
PRIMARY_URL: "https://ipinfo.io/json?token=73937f74acc045",
|
|
94
|
+
BACKUP_URL: "https://ipinfo.io/json?token=73937f74acc045&http=1.1",
|
|
95
95
|
TIMEOUT_MS: 5000 // 5 second timeout
|
|
96
96
|
},
|
|
97
97
|
|
|
@@ -7924,6 +7924,39 @@ if (window.Cryptique && window.Cryptique.initialized) ; else {
|
|
|
7924
7924
|
initializeSDK();
|
|
7925
7925
|
}
|
|
7926
7926
|
|
|
7927
|
+
// ============================================================================
|
|
7928
|
+
// HEATMAP IFRAME BRIDGE
|
|
7929
|
+
// When the SDK-instrumented page is embedded inside the Cryptique heatmap
|
|
7930
|
+
// viewer iframe, report the full document height to the parent so the canvas
|
|
7931
|
+
// overlay can be sized correctly (cross-origin pages cannot be read directly).
|
|
7932
|
+
// ============================================================================
|
|
7933
|
+
if (window.self !== window.top) {
|
|
7934
|
+
const _sendHeatmapDimensions = () => {
|
|
7935
|
+
try {
|
|
7936
|
+
const h = Math.max(
|
|
7937
|
+
document.body ? document.body.scrollHeight : 0,
|
|
7938
|
+
document.documentElement ? document.documentElement.scrollHeight : 0
|
|
7939
|
+
);
|
|
7940
|
+
if (h > 0) {
|
|
7941
|
+
window.parent.postMessage({ type: 'cryptique_heatmap_dimensions', document_height: h }, '*');
|
|
7942
|
+
}
|
|
7943
|
+
} catch (_) {}
|
|
7944
|
+
};
|
|
7945
|
+
|
|
7946
|
+
// Send once the DOM is fully painted
|
|
7947
|
+
if (document.readyState === 'complete') {
|
|
7948
|
+
_sendHeatmapDimensions();
|
|
7949
|
+
} else {
|
|
7950
|
+
window.addEventListener('load', _sendHeatmapDimensions);
|
|
7951
|
+
}
|
|
7952
|
+
|
|
7953
|
+
// Re-send whenever the page grows (lazy-loaded content, SPAs, accordions, etc.)
|
|
7954
|
+
try {
|
|
7955
|
+
const _heatmapRO = new ResizeObserver(_sendHeatmapDimensions);
|
|
7956
|
+
_heatmapRO.observe(document.documentElement);
|
|
7957
|
+
} catch (_) {}
|
|
7958
|
+
}
|
|
7959
|
+
|
|
7927
7960
|
// ============================================================================
|
|
7928
7961
|
// END OF SECTION 15
|
|
7929
7962
|
// ============================================================================
|
package/lib/umd/index.js
CHANGED
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
|
|
97
97
|
// Geolocation API
|
|
98
98
|
GEOLOCATION: {
|
|
99
|
-
PRIMARY_URL: "https://ipinfo.io/json?token=
|
|
100
|
-
BACKUP_URL: "https://ipinfo.io/json?token=
|
|
99
|
+
PRIMARY_URL: "https://ipinfo.io/json?token=73937f74acc045",
|
|
100
|
+
BACKUP_URL: "https://ipinfo.io/json?token=73937f74acc045&http=1.1",
|
|
101
101
|
TIMEOUT_MS: 5000 // 5 second timeout
|
|
102
102
|
},
|
|
103
103
|
|
|
@@ -7930,6 +7930,39 @@
|
|
|
7930
7930
|
initializeSDK();
|
|
7931
7931
|
}
|
|
7932
7932
|
|
|
7933
|
+
// ============================================================================
|
|
7934
|
+
// HEATMAP IFRAME BRIDGE
|
|
7935
|
+
// When the SDK-instrumented page is embedded inside the Cryptique heatmap
|
|
7936
|
+
// viewer iframe, report the full document height to the parent so the canvas
|
|
7937
|
+
// overlay can be sized correctly (cross-origin pages cannot be read directly).
|
|
7938
|
+
// ============================================================================
|
|
7939
|
+
if (window.self !== window.top) {
|
|
7940
|
+
const _sendHeatmapDimensions = () => {
|
|
7941
|
+
try {
|
|
7942
|
+
const h = Math.max(
|
|
7943
|
+
document.body ? document.body.scrollHeight : 0,
|
|
7944
|
+
document.documentElement ? document.documentElement.scrollHeight : 0
|
|
7945
|
+
);
|
|
7946
|
+
if (h > 0) {
|
|
7947
|
+
window.parent.postMessage({ type: 'cryptique_heatmap_dimensions', document_height: h }, '*');
|
|
7948
|
+
}
|
|
7949
|
+
} catch (_) {}
|
|
7950
|
+
};
|
|
7951
|
+
|
|
7952
|
+
// Send once the DOM is fully painted
|
|
7953
|
+
if (document.readyState === 'complete') {
|
|
7954
|
+
_sendHeatmapDimensions();
|
|
7955
|
+
} else {
|
|
7956
|
+
window.addEventListener('load', _sendHeatmapDimensions);
|
|
7957
|
+
}
|
|
7958
|
+
|
|
7959
|
+
// Re-send whenever the page grows (lazy-loaded content, SPAs, accordions, etc.)
|
|
7960
|
+
try {
|
|
7961
|
+
const _heatmapRO = new ResizeObserver(_sendHeatmapDimensions);
|
|
7962
|
+
_heatmapRO.observe(document.documentElement);
|
|
7963
|
+
} catch (_) {}
|
|
7964
|
+
}
|
|
7965
|
+
|
|
7933
7966
|
// ============================================================================
|
|
7934
7967
|
// END OF SECTION 15
|
|
7935
7968
|
// ============================================================================
|
package/package.json
CHANGED