@brainfish-ai/web-tracker 0.0.29 → 0.0.30

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.
@@ -13,6 +13,9 @@ export default class Agent {
13
13
  _allowLocalhostRecording?: boolean;
14
14
  private sessionCreationPromise;
15
15
  private static _sessionManager;
16
+ private urlMonitor?;
17
+ private isRecordingStopped;
18
+ private resumeRecordingTimer?;
16
19
  get sessionManager(): SessionManager;
17
20
  constructor();
18
21
  start({ sendEvents, sendScreenViewEvent, recordingBlocklist, _allowLocalhostRecording, }: {
@@ -21,9 +24,13 @@ export default class Agent {
21
24
  recordingBlocklist: string[];
22
25
  _allowLocalhostRecording?: boolean;
23
26
  }): Promise<void>;
27
+ private handleUrlChange;
28
+ private stopRecording;
29
+ private resumeRecording;
24
30
  handleTimeout(): void;
25
31
  handleActivityDuringIdle(): void;
26
32
  takeFullSnapshot(): void;
27
33
  static handleCustomEvent(customEventType: string): void;
28
34
  private createSession;
35
+ stop(): void;
29
36
  }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Monitors URL changes in a single-page application.
3
+ * Detects navigation via pushState, replaceState, and popstate events.
4
+ */
5
+ export default class UrlMonitor {
6
+ private currentUrl;
7
+ private callback;
8
+ private originalPushState;
9
+ private originalReplaceState;
10
+ constructor(callback: () => void);
11
+ private setupListeners;
12
+ private handlePopState;
13
+ private checkUrlChange;
14
+ destroy(): void;
15
+ }