@zaplier/sdk 1.0.8 → 1.0.9
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.cjs +33 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +33 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/sdk.js +33 -2
- package/dist/sdk.js.map +1 -1
- package/dist/sdk.min.js +1 -1
- package/dist/src/modules/fingerprint.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5650,7 +5650,9 @@ async function collectFingerprint(options = {}) {
|
|
|
5650
5650
|
platform: (browser?.platform || "unknown").toLowerCase(),
|
|
5651
5651
|
// PRIORITY 5: Device type (critical for differentiation, ultra-stable)
|
|
5652
5652
|
deviceType,
|
|
5653
|
-
// PRIORITY 6: Enhanced screen resolution
|
|
5653
|
+
// PRIORITY 6: Enhanced screen resolution with exact dimensions for mobile differentiation
|
|
5654
|
+
// For mobile devices, we NEED exact dimensions to differentiate between similar models (S22 vs A54)
|
|
5655
|
+
// For desktop, bucketing is sufficient as hardware varies more
|
|
5654
5656
|
screen: screen
|
|
5655
5657
|
? (() => {
|
|
5656
5658
|
// Use enhanced screen buckets for modern display landscape
|
|
@@ -5745,6 +5747,19 @@ async function collectFingerprint(options = {}) {
|
|
|
5745
5747
|
return "enhanced"; // Slightly enhanced DPI
|
|
5746
5748
|
return "standard"; // Standard 1x displays
|
|
5747
5749
|
};
|
|
5750
|
+
// CRITICAL: Do NOT include exact dimensions in stableCoreVector for mobile!
|
|
5751
|
+
// Reason: Screen dimensions change when:
|
|
5752
|
+
// - Chrome address bar appears/disappears (scroll behavior)
|
|
5753
|
+
// - Virtual keyboard opens/closes
|
|
5754
|
+
// - Screen rotates (portrait ↔ landscape)
|
|
5755
|
+
// - Browser zoom changes
|
|
5756
|
+
// These changes would cause stableCoreHash to change, breaking visitor identification
|
|
5757
|
+
//
|
|
5758
|
+
// INSTEAD: Use ONLY stable screen characteristics (bucket, aspect, density)
|
|
5759
|
+
// For device differentiation (S22 vs A54), use:
|
|
5760
|
+
// - screenFrame (bezel measurements)
|
|
5761
|
+
// - Combination of bucket + hardware + display
|
|
5762
|
+
// - Vector similarity in IdentityResolver
|
|
5748
5763
|
return {
|
|
5749
5764
|
bucket: getScreenBucket(width),
|
|
5750
5765
|
aspectClass: getAspectRatioClass(width, height),
|
|
@@ -5761,6 +5776,11 @@ async function collectFingerprint(options = {}) {
|
|
|
5761
5776
|
: width >= 768
|
|
5762
5777
|
? "tablet"
|
|
5763
5778
|
: "mobile",
|
|
5779
|
+
// ❌ REMOVED: exact dimensions (causes instability on mobile)
|
|
5780
|
+
// Device differentiation is now handled by:
|
|
5781
|
+
// 1. screenFrame (bezel measurements - stable)
|
|
5782
|
+
// 2. hardware + display combination
|
|
5783
|
+
// 3. Vector similarity in IdentityResolver
|
|
5764
5784
|
};
|
|
5765
5785
|
})()
|
|
5766
5786
|
: {
|
|
@@ -5889,7 +5909,18 @@ async function collectFingerprint(options = {}) {
|
|
|
5889
5909
|
: "none",
|
|
5890
5910
|
};
|
|
5891
5911
|
})(),
|
|
5892
|
-
// PRIORITY 8:
|
|
5912
|
+
// PRIORITY 8: Screen frame (bezel measurements) for mobile device differentiation
|
|
5913
|
+
// CRITICAL: This is STABLE across page loads and provides device-specific fingerprint
|
|
5914
|
+
// Samsung S22 vs A54 have different screen frames despite similar resolutions
|
|
5915
|
+
screenFrame: deviceSignals$1?.screenFrame
|
|
5916
|
+
? {
|
|
5917
|
+
top: deviceSignals$1.screenFrame.top || 0,
|
|
5918
|
+
right: deviceSignals$1.screenFrame.right || 0,
|
|
5919
|
+
bottom: deviceSignals$1.screenFrame.bottom || 0,
|
|
5920
|
+
left: deviceSignals$1.screenFrame.left || 0,
|
|
5921
|
+
}
|
|
5922
|
+
: undefined,
|
|
5923
|
+
// PRIORITY 9: Enhanced color and display capabilities bucketing
|
|
5893
5924
|
display: (() => {
|
|
5894
5925
|
const depth = deviceSignals$1.colorDepth;
|
|
5895
5926
|
const gamut = deviceSignals$1.colorGamut;
|