@checkflow/sdk 1.0.6 → 1.0.7

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.
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Session Recording Module with RRWeb Integration
3
+ * Records user interactions exactly like Mixpanel does
4
+ */
5
+ import type { eventWithTime } from '@rrweb/types';
6
+ export interface SessionRecordingConfig {
7
+ enabled: boolean;
8
+ maskAllInputs: boolean;
9
+ maskInputOptions: {
10
+ color: string;
11
+ textClass: string;
12
+ colorClass: string;
13
+ };
14
+ maskInputFn?: (text: string, element?: HTMLElement) => string;
15
+ maskTextFn?: (text: string, element?: HTMLElement) => string;
16
+ blockClass?: string;
17
+ blockSelector?: string;
18
+ ignoreClass?: string;
19
+ maskTextClass?: string;
20
+ maskTextSelector?: string;
21
+ maskAllText?: boolean;
22
+ slimDOMOptions?: {
23
+ script?: boolean;
24
+ comment?: boolean;
25
+ headFavicon?: boolean;
26
+ headWhitespace?: boolean;
27
+ headMetaDescKeywords?: boolean;
28
+ headMetaSocial?: boolean;
29
+ headMetaRobots?: boolean;
30
+ headMetaHttpEquiv?: boolean;
31
+ headMetaAuthorship?: boolean;
32
+ headMetaVerification?: boolean;
33
+ };
34
+ recordCanvas?: boolean;
35
+ collectFonts?: boolean;
36
+ plugins?: any[];
37
+ sampling?: {
38
+ mousemove?: boolean | number;
39
+ mouseInteraction?: boolean | number;
40
+ scroll?: boolean | number;
41
+ media?: number;
42
+ input?: 'all' | 'last';
43
+ };
44
+ }
45
+ export declare class SessionRecordingRRWeb {
46
+ private config;
47
+ private events;
48
+ private sessionId;
49
+ private startTime;
50
+ private isRecording;
51
+ private stopFn;
52
+ private recordingOptions;
53
+ constructor(config?: Partial<SessionRecordingConfig>);
54
+ private generateSessionId;
55
+ private setupRecordingOptions;
56
+ /**
57
+ * Start recording using RRWeb
58
+ */
59
+ start(): void;
60
+ /**
61
+ * Stop recording
62
+ */
63
+ stop(): void;
64
+ /**
65
+ * Get session ID
66
+ */
67
+ getSessionId(): string;
68
+ /**
69
+ * Get recorded events (RRWeb format)
70
+ */
71
+ getEvents(): eventWithTime[];
72
+ /**
73
+ * Get recording duration in milliseconds
74
+ */
75
+ getDurationMs(): number;
76
+ /**
77
+ * Get recording duration in seconds
78
+ */
79
+ getDuration(): number;
80
+ /**
81
+ * Clear events (for chunked uploads)
82
+ */
83
+ clearEvents(): void;
84
+ /**
85
+ * Get events since last clear (for incremental uploads)
86
+ */
87
+ getEventsSinceLast(count?: number): eventWithTime[];
88
+ /**
89
+ * Get recording data for submission (compatible with backend)
90
+ */
91
+ getRecordingData(): {
92
+ events: eventWithTime[];
93
+ sessionId: string;
94
+ duration: number;
95
+ } | null;
96
+ /**
97
+ * Check if currently recording
98
+ */
99
+ isCurrentlyRecording(): boolean;
100
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkflow/sdk",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "type": "module",
5
5
  "description": "CheckFlow SDK for capturing user feedback with context",
6
6
  "main": "dist/index.js",
@@ -52,7 +52,8 @@
52
52
  "vue": "^3.5.25"
53
53
  },
54
54
  "dependencies": {
55
- "html2canvas": "^1.4.1"
55
+ "html2canvas": "^1.4.1",
56
+ "rrweb": "^2.0.0-alpha.4"
56
57
  },
57
58
  "peerDependencies": {
58
59
  "react": ">=16.8.0",