saltfish 0.3.27 → 0.3.28

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.
@@ -957,13 +957,6 @@ const STORAGE_KEYS = {
957
957
  SESSION: "saltfish_session",
958
958
  ANONYMOUS_USER: "saltfish_anonymous_user_data"
959
959
  };
960
- const TIMING$1 = {
961
- // 5 seconds
962
- STEP_TIMEOUT: 12e4,
963
- // Session persistence
964
- SESSION_EXPIRY: 30 * 60 * 1e3
965
- // 30 minutes in milliseconds
966
- };
967
960
  const API = {
968
961
  BASE_URL: "https://player.saltfish.ai",
969
962
  SHARE_BASE_URL: "https://studio-api.saltfish.ai/studio/flows2/share",
@@ -6432,14 +6425,34 @@ const ANALYTICS = {
6432
6425
  FLUSH_INTERVAL_MS: 3e4
6433
6426
  };
6434
6427
  const TIMING = {
6428
+ // Polling and updates
6429
+ /** Video progress polling interval (50ms) */
6430
+ VIDEO_PROGRESS_POLL_INTERVAL: 50,
6431
+ /** Cursor position update throttle interval (100ms) */
6432
+ CURSOR_UPDATE_THROTTLE: 100,
6433
+ /** Delay for state processing operations (100ms) */
6434
+ STATE_PROCESSING_DELAY_MS: 100,
6435
+ // Analytics
6436
+ /** Analytics event flush interval (30 seconds) */
6437
+ ANALYTICS_FLUSH_INTERVAL: 3e4,
6438
+ // Timeouts
6439
+ /** User data loading timeout (5 seconds) */
6440
+ USER_DATA_TIMEOUT: 5e3,
6441
+ /** Step timeout - player will be destroyed if user stays on same step (120 seconds) */
6442
+ STEP_TIMEOUT: 12e4,
6443
+ /** Retry delay for failed operations (0.5 seconds) */
6444
+ RETRY_DELAY_MS: 500,
6445
+ // DOM and cursor operations
6435
6446
  /** Delay for DOM stabilization before cursor operations (0.5 seconds) */
6436
6447
  DOM_STABILIZATION_DELAY_MS: 500,
6437
- /** Delay for state processing operations (100 milliseconds) */
6438
- STATE_PROCESSING_DELAY_MS: 100,
6448
+ /** Default cursor animation distance in pixels */
6449
+ CURSOR_DEFAULT_DISTANCE: 100,
6450
+ // URL monitoring
6439
6451
  /** Interval for checking URL path changes (5 seconds) */
6440
6452
  URL_PATH_CHECK_INTERVAL_MS: 5e3,
6441
- /** Retry delay for failed operations (0.5 seconds) */
6442
- RETRY_DELAY_MS: 500
6453
+ // Session persistence
6454
+ /** Session expiry time (30 minutes) */
6455
+ SESSION_EXPIRY: 30 * 60 * 1e3
6443
6456
  };
6444
6457
  const THRESHOLDS = {
6445
6458
  /** Minimum scroll distance in pixels to trigger scroll events */
@@ -8569,7 +8582,7 @@ class SessionManager {
8569
8582
  const sessionData = this.storageManager.getSession();
8570
8583
  if (sessionData) {
8571
8584
  const now = Date.now();
8572
- if (now - sessionData.lastActivity < TIMING$1.SESSION_EXPIRY) {
8585
+ if (now - sessionData.lastActivity < TIMING.SESSION_EXPIRY) {
8573
8586
  log(`SessionManager: Using existing session: ${sessionData.sessionId}`);
8574
8587
  this.updateSessionActivity(sessionData.sessionId);
8575
8588
  return sessionData.sessionId;
@@ -11343,7 +11356,7 @@ const _StepTimeoutManager = class _StepTimeoutManager {
11343
11356
  this.destroyCallback = null;
11344
11357
  }
11345
11358
  };
11346
- __publicField(_StepTimeoutManager, "STEP_TIMEOUT_MS", TIMING$1.STEP_TIMEOUT);
11359
+ __publicField(_StepTimeoutManager, "STEP_TIMEOUT_MS", TIMING.STEP_TIMEOUT);
11347
11360
  let StepTimeoutManager = _StepTimeoutManager;
11348
11361
  class ManagerFactory {
11349
11362
  /**
@@ -11601,7 +11614,7 @@ const SaltfishPlayer$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
11601
11614
  __proto__: null,
11602
11615
  SaltfishPlayer
11603
11616
  }, Symbol.toStringTag, { value: "Module" }));
11604
- const version = "0.3.27";
11617
+ const version = "0.3.28";
11605
11618
  const packageJson = {
11606
11619
  version
11607
11620
  };