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