sitepong 0.0.7 → 0.0.10

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.
@@ -1,5 +1,6 @@
1
- import { S as SitePongConfig, C as CaptureContext, L as LogLevel } from '../breadcrumbs-DwXK5gNn.mjs';
2
- export { E as ErrorEvent, a as addBreadcrumb, c as clearBreadcrumbs, g as getBreadcrumbs } from '../breadcrumbs-DwXK5gNn.mjs';
1
+ import { S as SitePongConfig, C as CaptureContext, L as LogLevel } from '../breadcrumbs-Cydh62b1.mjs';
2
+ export { E as ErrorEvent, a as addBreadcrumb, c as clearBreadcrumbs, g as getBreadcrumbs } from '../breadcrumbs-Cydh62b1.mjs';
3
+ import '../types-CLEYbaV8.mjs';
3
4
 
4
5
  /**
5
6
  * Server-side exports for @sitepong/react
@@ -1,5 +1,6 @@
1
- import { S as SitePongConfig, C as CaptureContext, L as LogLevel } from '../breadcrumbs-DwXK5gNn.js';
2
- export { E as ErrorEvent, a as addBreadcrumb, c as clearBreadcrumbs, g as getBreadcrumbs } from '../breadcrumbs-DwXK5gNn.js';
1
+ import { S as SitePongConfig, C as CaptureContext, L as LogLevel } from '../breadcrumbs-DRlJ9h_B.js';
2
+ export { E as ErrorEvent, a as addBreadcrumb, c as clearBreadcrumbs, g as getBreadcrumbs } from '../breadcrumbs-DRlJ9h_B.js';
3
+ import '../types-CLEYbaV8.js';
3
4
 
4
5
  /**
5
6
  * Server-side exports for @sitepong/react
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Analytics Types
3
+ * Types for events, traits, and analytics configuration
4
+ */
5
+ interface AutocaptureOptions {
6
+ /** Enable autocapture of click events (default: true) */
7
+ clicks?: boolean;
8
+ /** Enable autocapture of form submissions (default: true) */
9
+ forms?: boolean;
10
+ /** Enable autocapture of page views (default: true) */
11
+ pageviews?: boolean;
12
+ /** CSS selectors for elements to exclude from autocapture */
13
+ blockSelectors?: string[];
14
+ /** Only capture events on elements matching these selectors */
15
+ allowSelectors?: string[];
16
+ }
17
+ interface AnalyticsConfig {
18
+ apiKey: string;
19
+ endpoint?: string;
20
+ enabled?: boolean;
21
+ autocapturePageviews?: boolean;
22
+ autocaptureClicks?: boolean;
23
+ autocaptureForms?: boolean;
24
+ autocapture?: AutocaptureOptions | boolean;
25
+ maxBatchSize?: number;
26
+ flushInterval?: number;
27
+ eventsEndpoint?: string;
28
+ debug?: boolean;
29
+ }
30
+ interface TrackProperties {
31
+ [key: string]: unknown;
32
+ }
33
+ interface UserTraits {
34
+ email?: string;
35
+ name?: string;
36
+ firstName?: string;
37
+ lastName?: string;
38
+ phone?: string;
39
+ avatar?: string;
40
+ createdAt?: string;
41
+ [key: string]: unknown;
42
+ }
43
+ interface GroupTraits {
44
+ name?: string;
45
+ industry?: string;
46
+ employees?: number;
47
+ plan?: string;
48
+ [key: string]: unknown;
49
+ }
50
+
51
+ interface ReplayConfig {
52
+ apiKey: string;
53
+ endpoint?: string;
54
+ enabled?: boolean;
55
+ /** Mask all text input values (default: true) */
56
+ maskInputs?: boolean;
57
+ /** CSS selector for elements to block from recording */
58
+ blockSelector?: string;
59
+ /** CSS selector for elements to mask content */
60
+ maskSelector?: string;
61
+ /** Maximum session duration in ms (default: 60 minutes) */
62
+ maxSessionDuration?: number;
63
+ /** Flush interval in ms (default: 5000) */
64
+ flushInterval?: number;
65
+ /** Maximum events per batch (default: 100) */
66
+ maxBatchSize?: number;
67
+ /** Sample rate 0-1 (default: 1.0 = record all sessions) */
68
+ sampleRate?: number;
69
+ /** Custom endpoint for replay data */
70
+ replayEndpoint?: string;
71
+ /** Record network requests (XHR/fetch) */
72
+ recordNetwork?: boolean;
73
+ /** Capture request/response headers in network recording */
74
+ captureNetworkHeaders?: boolean;
75
+ /** Record console logs */
76
+ recordConsole?: boolean;
77
+ /** Console levels to record (default: all) */
78
+ consoleLevels?: Array<'log' | 'info' | 'warn' | 'error' | 'debug'>;
79
+ debug?: boolean;
80
+ }
81
+ type ReplayEventType = 'snapshot' | 'mutation' | 'mouse_move' | 'mouse_click' | 'mouse_leave' | 'touch' | 'scroll' | 'input' | 'resize' | 'focus' | 'blur' | 'network' | 'console' | 'custom';
82
+ interface ReplayEvent {
83
+ type: ReplayEventType;
84
+ timestamp: number;
85
+ data: unknown;
86
+ }
87
+
88
+ export type { AnalyticsConfig as A, GroupTraits as G, ReplayConfig as R, TrackProperties as T, UserTraits as U, ReplayEvent as a };
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Analytics Types
3
+ * Types for events, traits, and analytics configuration
4
+ */
5
+ interface AutocaptureOptions {
6
+ /** Enable autocapture of click events (default: true) */
7
+ clicks?: boolean;
8
+ /** Enable autocapture of form submissions (default: true) */
9
+ forms?: boolean;
10
+ /** Enable autocapture of page views (default: true) */
11
+ pageviews?: boolean;
12
+ /** CSS selectors for elements to exclude from autocapture */
13
+ blockSelectors?: string[];
14
+ /** Only capture events on elements matching these selectors */
15
+ allowSelectors?: string[];
16
+ }
17
+ interface AnalyticsConfig {
18
+ apiKey: string;
19
+ endpoint?: string;
20
+ enabled?: boolean;
21
+ autocapturePageviews?: boolean;
22
+ autocaptureClicks?: boolean;
23
+ autocaptureForms?: boolean;
24
+ autocapture?: AutocaptureOptions | boolean;
25
+ maxBatchSize?: number;
26
+ flushInterval?: number;
27
+ eventsEndpoint?: string;
28
+ debug?: boolean;
29
+ }
30
+ interface TrackProperties {
31
+ [key: string]: unknown;
32
+ }
33
+ interface UserTraits {
34
+ email?: string;
35
+ name?: string;
36
+ firstName?: string;
37
+ lastName?: string;
38
+ phone?: string;
39
+ avatar?: string;
40
+ createdAt?: string;
41
+ [key: string]: unknown;
42
+ }
43
+ interface GroupTraits {
44
+ name?: string;
45
+ industry?: string;
46
+ employees?: number;
47
+ plan?: string;
48
+ [key: string]: unknown;
49
+ }
50
+
51
+ interface ReplayConfig {
52
+ apiKey: string;
53
+ endpoint?: string;
54
+ enabled?: boolean;
55
+ /** Mask all text input values (default: true) */
56
+ maskInputs?: boolean;
57
+ /** CSS selector for elements to block from recording */
58
+ blockSelector?: string;
59
+ /** CSS selector for elements to mask content */
60
+ maskSelector?: string;
61
+ /** Maximum session duration in ms (default: 60 minutes) */
62
+ maxSessionDuration?: number;
63
+ /** Flush interval in ms (default: 5000) */
64
+ flushInterval?: number;
65
+ /** Maximum events per batch (default: 100) */
66
+ maxBatchSize?: number;
67
+ /** Sample rate 0-1 (default: 1.0 = record all sessions) */
68
+ sampleRate?: number;
69
+ /** Custom endpoint for replay data */
70
+ replayEndpoint?: string;
71
+ /** Record network requests (XHR/fetch) */
72
+ recordNetwork?: boolean;
73
+ /** Capture request/response headers in network recording */
74
+ captureNetworkHeaders?: boolean;
75
+ /** Record console logs */
76
+ recordConsole?: boolean;
77
+ /** Console levels to record (default: all) */
78
+ consoleLevels?: Array<'log' | 'info' | 'warn' | 'error' | 'debug'>;
79
+ debug?: boolean;
80
+ }
81
+ type ReplayEventType = 'snapshot' | 'mutation' | 'mouse_move' | 'mouse_click' | 'mouse_leave' | 'touch' | 'scroll' | 'input' | 'resize' | 'focus' | 'blur' | 'network' | 'console' | 'custom';
82
+ interface ReplayEvent {
83
+ type: ReplayEventType;
84
+ timestamp: number;
85
+ data: unknown;
86
+ }
87
+
88
+ export type { AnalyticsConfig as A, GroupTraits as G, ReplayConfig as R, TrackProperties as T, UserTraits as U, ReplayEvent as a };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sitepong",
3
- "version": "0.0.7",
3
+ "version": "0.0.10",
4
4
  "description": "Official SitePong SDK for error tracking and monitoring",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",