@syntrologie/runtime-sdk 2.10.0 → 2.11.0
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/actions/schema.js +4 -3
- package/dist/{chunk-XDYJ64IN.js → chunk-37TTQRH5.js} +2 -2
- package/dist/{chunk-OIDBMIRB.js → chunk-H3FAYTUV.js} +110 -138
- package/dist/chunk-H3FAYTUV.js.map +7 -0
- package/dist/chunk-JMHRHAEL.js +18 -0
- package/dist/chunk-JMHRHAEL.js.map +7 -0
- package/dist/{chunk-R5DNAIRI.js → chunk-NBFQGKSV.js} +3 -3
- package/dist/{chunk-BU4Z6PD7.js → chunk-Q77NT67W.js} +1 -16
- package/dist/{chunk-BU4Z6PD7.js.map → chunk-Q77NT67W.js.map} +1 -1
- package/dist/config/schema.js +3 -2
- package/dist/decisions/schema.js +2 -1
- package/dist/events/normalizers/posthog.d.ts +4 -50
- package/dist/events/types.d.ts +8 -25
- package/dist/index.js +14 -8
- package/dist/index.js.map +3 -3
- package/dist/react.js +5 -4
- package/dist/react.js.map +1 -1
- package/dist/replayMirror-QZ3GQ527.js +32 -0
- package/dist/replayMirror-QZ3GQ527.js.map +7 -0
- package/dist/smart-canvas.esm.js +51 -51
- package/dist/smart-canvas.esm.js.map +4 -4
- package/dist/smart-canvas.js +669 -148
- package/dist/smart-canvas.js.map +4 -4
- package/dist/smart-canvas.min.js +51 -51
- package/dist/smart-canvas.min.js.map +4 -4
- package/dist/telemetry/adapters/posthog.d.ts +31 -0
- package/dist/telemetry/replayMirror.d.ts +7 -0
- package/dist/version.d.ts +1 -1
- package/package.json +8 -7
- package/dist/chunk-OIDBMIRB.js.map +0 -7
- /package/dist/{chunk-XDYJ64IN.js.map → chunk-37TTQRH5.js.map} +0 -0
- /package/dist/{chunk-R5DNAIRI.js.map → chunk-NBFQGKSV.js.map} +0 -0
|
@@ -71,6 +71,24 @@ export interface PostHogAdapterOptions {
|
|
|
71
71
|
* @default false
|
|
72
72
|
*/
|
|
73
73
|
requireExplicitConsent?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Enable behavioral signal detection (hesitation, rage click, etc.)
|
|
76
|
+
* Pass `true` for defaults, or a partial DetectorConfig to customize thresholds.
|
|
77
|
+
* @default false
|
|
78
|
+
*/
|
|
79
|
+
behavioralSignals?: boolean | Record<string, number>;
|
|
80
|
+
/**
|
|
81
|
+
* Endpoint URL to mirror session recording payloads.
|
|
82
|
+
* When set, recording requests to PostHog's /s/ endpoint are also
|
|
83
|
+
* sent (fire-and-forget) to this URL.
|
|
84
|
+
*/
|
|
85
|
+
replayMirrorEndpoint?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Callback for raw rrweb events from session recording.
|
|
88
|
+
* Called with each rrweb eventWithTime before PostHog processes it.
|
|
89
|
+
* Used by the event processor for behavioral signal detection.
|
|
90
|
+
*/
|
|
91
|
+
onRRWebEvent?: (event: Record<string, unknown>) => void;
|
|
74
92
|
}
|
|
75
93
|
interface CanvasAnalyticsPayload extends Properties {
|
|
76
94
|
rectangleId?: string;
|
|
@@ -84,6 +102,7 @@ export declare class PostHogAdapter implements TelemetryClient {
|
|
|
84
102
|
private client?;
|
|
85
103
|
private featureFlagsCallback?;
|
|
86
104
|
private captureCallback?;
|
|
105
|
+
private rrwebCallback?;
|
|
87
106
|
private consentUnsub?;
|
|
88
107
|
constructor(options?: PostHogAdapterOptions);
|
|
89
108
|
/**
|
|
@@ -91,6 +110,18 @@ export declare class PostHogAdapter implements TelemetryClient {
|
|
|
91
110
|
* or deferred (when consent gate grants).
|
|
92
111
|
*/
|
|
93
112
|
private initPostHog;
|
|
113
|
+
/**
|
|
114
|
+
* Set up rrweb event interception on PostHog's session recording.
|
|
115
|
+
*
|
|
116
|
+
* PostHog lazy-loads the rrweb recorder. The SessionRecording wrapper has
|
|
117
|
+
* an `onRRwebEmit` method, but rrweb delivers events directly to the
|
|
118
|
+
* lazy-loaded recorder instance's `onRRwebEmit`, bypassing the wrapper.
|
|
119
|
+
* We must find and patch the recorder instance, not the wrapper.
|
|
120
|
+
*
|
|
121
|
+
* The recorder instance is stored on a minified property of SessionRecording.
|
|
122
|
+
* We detect it by looking for an object with both `onRRwebEmit` and `start` methods.
|
|
123
|
+
*/
|
|
124
|
+
private setupRRWebIntercept;
|
|
94
125
|
/**
|
|
95
126
|
* Get all feature flags from PostHog.
|
|
96
127
|
* Used to extract segment membership flags (in_segment_*).
|
package/dist/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syntrologie/runtime-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "Syntrologie Runtime SDK for web experimentation and analytics",
|
|
5
5
|
"license": "Proprietary",
|
|
6
6
|
"private": false,
|
|
@@ -67,12 +67,13 @@
|
|
|
67
67
|
"@floating-ui/dom": "^1.7.5",
|
|
68
68
|
"@growthbook/growthbook": "~1.6.2",
|
|
69
69
|
"@growthbook/growthbook-react": "^1.6.4",
|
|
70
|
-
"@syntrologie/adapt-chatbot": "2.
|
|
71
|
-
"@syntrologie/adapt-content": "2.
|
|
72
|
-
"@syntrologie/adapt-faq": "2.
|
|
73
|
-
"@syntrologie/adapt-gamification": "2.
|
|
74
|
-
"@syntrologie/adapt-nav": "2.
|
|
75
|
-
"@syntrologie/adapt-overlays": "2.
|
|
70
|
+
"@syntrologie/adapt-chatbot": "2.11.0",
|
|
71
|
+
"@syntrologie/adapt-content": "2.11.0",
|
|
72
|
+
"@syntrologie/adapt-faq": "2.11.0",
|
|
73
|
+
"@syntrologie/adapt-gamification": "2.11.0",
|
|
74
|
+
"@syntrologie/adapt-nav": "2.11.0",
|
|
75
|
+
"@syntrologie/adapt-overlays": "2.11.0",
|
|
76
|
+
"@syntrologie/event-processor": "*",
|
|
76
77
|
"lucide-react": "^0.576.0",
|
|
77
78
|
"posthog-js": "~1.302.2",
|
|
78
79
|
"zod": "^3.25.76"
|