blocfeed 0.24.0 → 0.26.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.
@@ -80,6 +80,42 @@ interface DeadClickConfig {
80
80
  observationWindowMs?: number;
81
81
  rateLimitPerSelector?: number;
82
82
  }
83
+ interface SessionTimeoutConfig {
84
+ /** Master switch for session-duration capping. Default true. */
85
+ enabled?: boolean;
86
+ /**
87
+ * Rotate the session_id when there's no recorded activity for this
88
+ * many milliseconds. Default 30 * 60 * 1000 (30 minutes).
89
+ */
90
+ idleMs?: number;
91
+ /**
92
+ * Rotate the session_id once it has lived this long, regardless of
93
+ * activity. Default 4 * 60 * 60 * 1000 (4 hours). Prevents pinned
94
+ * admin dashboards from accumulating multi-day "sessions".
95
+ */
96
+ maxMs?: number;
97
+ }
98
+ interface JsErrorConfig {
99
+ enabled?: boolean;
100
+ /**
101
+ * Per-detector sampling override. Independent of the parent
102
+ * `BehavioralConfig.sampling` — JS errors are usually high-signal,
103
+ * so default is 1.0.
104
+ */
105
+ sampling?: number;
106
+ /**
107
+ * Additional ignore patterns merged with the built-in defaults
108
+ * (cross-origin "Script error.", ResizeObserver loop warnings,
109
+ * Sentry-style "Non-Error promise rejection captured"). Strings
110
+ * are compiled with `new RegExp(...)`; invalid regex is dropped
111
+ * silently.
112
+ */
113
+ ignorePatterns?: string[];
114
+ /** Max events per fingerprint per `rateLimitWindowMs`. Default 5. */
115
+ rateLimitPerFingerprint?: number;
116
+ /** Rate-limit window in milliseconds. Default 60_000. */
117
+ rateLimitWindowMs?: number;
118
+ }
83
119
  interface BehavioralConfig {
84
120
  enabled?: boolean;
85
121
  sampling?: number;
@@ -89,6 +125,13 @@ interface BehavioralConfig {
89
125
  redirectLoop?: RedirectLoopConfig;
90
126
  formDataLoss?: FormDataLossConfig;
91
127
  deadClick?: DeadClickConfig;
128
+ jsError?: JsErrorConfig;
129
+ /**
130
+ * Session-duration capping. Without this, the widget's session_id
131
+ * never rotates inside a single tab, producing absurd multi-day
132
+ * sessions on long-lived admin dashboards.
133
+ */
134
+ sessionTimeout?: SessionTimeoutConfig;
92
135
  sessionReplay?: SessionReplayConfig;
93
136
  /**
94
137
  * PII scrubbing applied to `element_text` and `event_data` (and
@@ -80,6 +80,42 @@ interface DeadClickConfig {
80
80
  observationWindowMs?: number;
81
81
  rateLimitPerSelector?: number;
82
82
  }
83
+ interface SessionTimeoutConfig {
84
+ /** Master switch for session-duration capping. Default true. */
85
+ enabled?: boolean;
86
+ /**
87
+ * Rotate the session_id when there's no recorded activity for this
88
+ * many milliseconds. Default 30 * 60 * 1000 (30 minutes).
89
+ */
90
+ idleMs?: number;
91
+ /**
92
+ * Rotate the session_id once it has lived this long, regardless of
93
+ * activity. Default 4 * 60 * 60 * 1000 (4 hours). Prevents pinned
94
+ * admin dashboards from accumulating multi-day "sessions".
95
+ */
96
+ maxMs?: number;
97
+ }
98
+ interface JsErrorConfig {
99
+ enabled?: boolean;
100
+ /**
101
+ * Per-detector sampling override. Independent of the parent
102
+ * `BehavioralConfig.sampling` — JS errors are usually high-signal,
103
+ * so default is 1.0.
104
+ */
105
+ sampling?: number;
106
+ /**
107
+ * Additional ignore patterns merged with the built-in defaults
108
+ * (cross-origin "Script error.", ResizeObserver loop warnings,
109
+ * Sentry-style "Non-Error promise rejection captured"). Strings
110
+ * are compiled with `new RegExp(...)`; invalid regex is dropped
111
+ * silently.
112
+ */
113
+ ignorePatterns?: string[];
114
+ /** Max events per fingerprint per `rateLimitWindowMs`. Default 5. */
115
+ rateLimitPerFingerprint?: number;
116
+ /** Rate-limit window in milliseconds. Default 60_000. */
117
+ rateLimitWindowMs?: number;
118
+ }
83
119
  interface BehavioralConfig {
84
120
  enabled?: boolean;
85
121
  sampling?: number;
@@ -89,6 +125,13 @@ interface BehavioralConfig {
89
125
  redirectLoop?: RedirectLoopConfig;
90
126
  formDataLoss?: FormDataLossConfig;
91
127
  deadClick?: DeadClickConfig;
128
+ jsError?: JsErrorConfig;
129
+ /**
130
+ * Session-duration capping. Without this, the widget's session_id
131
+ * never rotates inside a single tab, producing absurd multi-day
132
+ * sessions on long-lived admin dashboards.
133
+ */
134
+ sessionTimeout?: SessionTimeoutConfig;
92
135
  sessionReplay?: SessionReplayConfig;
93
136
  /**
94
137
  * PII scrubbing applied to `element_text` and `event_data` (and
package/dist/engine.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunk6JMBSCRM_cjs=require('./chunk-6JMBSCRM.cjs');function s(o){if(o?.aborted)throw new Error("Aborted")}async function v(o){return await new Promise((t,e)=>{let r=new Image;r.onload=()=>t({width:r.naturalWidth,height:r.naturalHeight}),r.onerror=()=>e(new Error("Failed to load generated screenshot")),r.src=o;})}async function l(o,t){let{width:e,height:r}=await v(o);return {dataUrl:o,mime:t,width:e,height:r}}function U(o){return {async captureElement(t,e){if(!chunk6JMBSCRM_cjs.a())throw new Error("captureElement can only run in the browser");s(e.signal);let r={scale:e.pixelRatio},n=e.mime==="image/jpeg"?await o.domToJpeg(t,{...r,quality:e.quality??.92}):await o.domToPng(t,r);return s(e.signal),await l(n,e.mime)},async captureFullPage(t){if(!chunk6JMBSCRM_cjs.a())throw new Error("captureFullPage can only run in the browser");s(t.signal);let e=document.documentElement,r=Math.max(e.scrollWidth,e.clientWidth),n=Math.max(e.scrollHeight,e.clientHeight),i=Math.min(1,t.maxDimension/Math.max(r,n)),c={width:Math.max(1,Math.round(r*i)),height:Math.max(1,Math.round(n*i)),scale:t.pixelRatio},a=t.mime==="image/jpeg"?await o.domToJpeg(e,{...c,quality:t.quality??.92}):await o.domToPng(e,c);return s(t.signal),await l(a,t.mime)}}}function O(o){let[t,e]=o.split(",",2);if(!t||!e)throw new Error("Invalid data URL");let n=/data:(.*?);base64/.exec(t)?.[1]||"application/octet-stream",i=atob(e),c=new Uint8Array(i.length);for(let a=0;a<i.length;a+=1)c[a]=i.charCodeAt(a);return new Blob([c],{type:n})}Object.defineProperty(exports,"clearClickEvents",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.j}});Object.defineProperty(exports,"clearDiagnostics",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.z}});Object.defineProperty(exports,"clearQueue",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.g}});Object.defineProperty(exports,"clearSecurityFindings",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.C}});Object.defineProperty(exports,"collectMetadata",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.d}});Object.defineProperty(exports,"createBlocFeedController",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.u}});Object.defineProperty(exports,"createHtmlToImageAdapter",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.b}});Object.defineProperty(exports,"dequeueAll",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.f}});Object.defineProperty(exports,"drainClickEvents",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.i}});Object.defineProperty(exports,"drainDiagnostics",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.y}});Object.defineProperty(exports,"enqueue",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.e}});Object.defineProperty(exports,"getMyFeedbackUrl",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.p}});Object.defineProperty(exports,"getQueueSize",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.h}});Object.defineProperty(exports,"getSecurityFindings",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.B}});Object.defineProperty(exports,"getViewerToken",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.o}});Object.defineProperty(exports,"installDiagnostics",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.w}});Object.defineProperty(exports,"isRecordingSupported",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.k}});Object.defineProperty(exports,"isVoiceSupported",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.m}});Object.defineProperty(exports,"runCapture",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.c}});Object.defineProperty(exports,"runSecretScan",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.A}});Object.defineProperty(exports,"startRecording",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.l}});Object.defineProperty(exports,"startVoiceRecording",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.n}});Object.defineProperty(exports,"transcribeAudio",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.q}});Object.defineProperty(exports,"uninstallDiagnostics",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.x}});exports.createModernScreenshotAdapter=U;exports.dataUrlToBlob=O;
1
+ 'use strict';var chunk5FILYSWV_cjs=require('./chunk-5FILYSWV.cjs');function s(o){if(o?.aborted)throw new Error("Aborted")}async function v(o){return await new Promise((t,e)=>{let r=new Image;r.onload=()=>t({width:r.naturalWidth,height:r.naturalHeight}),r.onerror=()=>e(new Error("Failed to load generated screenshot")),r.src=o;})}async function l(o,t){let{width:e,height:r}=await v(o);return {dataUrl:o,mime:t,width:e,height:r}}function U(o){return {async captureElement(t,e){if(!chunk5FILYSWV_cjs.a())throw new Error("captureElement can only run in the browser");s(e.signal);let r={scale:e.pixelRatio},n=e.mime==="image/jpeg"?await o.domToJpeg(t,{...r,quality:e.quality??.92}):await o.domToPng(t,r);return s(e.signal),await l(n,e.mime)},async captureFullPage(t){if(!chunk5FILYSWV_cjs.a())throw new Error("captureFullPage can only run in the browser");s(t.signal);let e=document.documentElement,r=Math.max(e.scrollWidth,e.clientWidth),n=Math.max(e.scrollHeight,e.clientHeight),i=Math.min(1,t.maxDimension/Math.max(r,n)),c={width:Math.max(1,Math.round(r*i)),height:Math.max(1,Math.round(n*i)),scale:t.pixelRatio},a=t.mime==="image/jpeg"?await o.domToJpeg(e,{...c,quality:t.quality??.92}):await o.domToPng(e,c);return s(t.signal),await l(a,t.mime)}}}function O(o){let[t,e]=o.split(",",2);if(!t||!e)throw new Error("Invalid data URL");let n=/data:(.*?);base64/.exec(t)?.[1]||"application/octet-stream",i=atob(e),c=new Uint8Array(i.length);for(let a=0;a<i.length;a+=1)c[a]=i.charCodeAt(a);return new Blob([c],{type:n})}Object.defineProperty(exports,"clearClickEvents",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.j}});Object.defineProperty(exports,"clearDiagnostics",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.z}});Object.defineProperty(exports,"clearQueue",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.g}});Object.defineProperty(exports,"clearSecurityFindings",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.C}});Object.defineProperty(exports,"collectMetadata",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.d}});Object.defineProperty(exports,"createBlocFeedController",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.u}});Object.defineProperty(exports,"createHtmlToImageAdapter",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.b}});Object.defineProperty(exports,"dequeueAll",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.f}});Object.defineProperty(exports,"drainClickEvents",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.i}});Object.defineProperty(exports,"drainDiagnostics",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.y}});Object.defineProperty(exports,"enqueue",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.e}});Object.defineProperty(exports,"getMyFeedbackUrl",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.p}});Object.defineProperty(exports,"getQueueSize",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.h}});Object.defineProperty(exports,"getSecurityFindings",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.B}});Object.defineProperty(exports,"getViewerToken",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.o}});Object.defineProperty(exports,"installDiagnostics",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.w}});Object.defineProperty(exports,"isRecordingSupported",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.k}});Object.defineProperty(exports,"isVoiceSupported",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.m}});Object.defineProperty(exports,"runCapture",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.c}});Object.defineProperty(exports,"runSecretScan",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.A}});Object.defineProperty(exports,"startRecording",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.l}});Object.defineProperty(exports,"startVoiceRecording",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.n}});Object.defineProperty(exports,"transcribeAudio",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.q}});Object.defineProperty(exports,"uninstallDiagnostics",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.x}});exports.createModernScreenshotAdapter=U;exports.dataUrlToBlob=O;
package/dist/engine.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as ScreenshotAdapter, C as CaptureConfig, a as CaptureResult, V as VideoAsset, R as RecordingConfig, b as ClickEvent, c as VoiceConfig, M as MetadataConfig, d as MetadataContext, B as BlocFeedUser, F as FeedbackPayload, e as SecuritySnapshot, f as SecurityConfig } from './controller-D7yFqYcL.cjs';
2
- export { g as BlocFeedConfig, h as BlocFeedController, i as BlocFeedError, j as BlocFeedHandle, k as BlocFeedState, l as BlocFeedStrings, m as ConsoleEntry, D as DiagnosticsConfig, E as ElementDescriptor, n as FeedbackApiResponse, o as FeedbackCategory, H as HoverListener, I as ImageAsset, N as NetworkEntry, p as Rect, q as ScreenshotAdapterOptions, r as ScreenshotIntent, s as ScreenshotMime, t as SecurityFinding, u as SessionPhase, v as StateListener, w as SubmitResult, T as ThemeConfig, x as TransportConfig, y as TriggerStyle, z as VideoIntent, A as VideoMime, W as WidgetPosition, G as createBlocFeedController } from './controller-D7yFqYcL.cjs';
1
+ import { S as ScreenshotAdapter, C as CaptureConfig, a as CaptureResult, V as VideoAsset, R as RecordingConfig, b as ClickEvent, c as VoiceConfig, M as MetadataConfig, d as MetadataContext, B as BlocFeedUser, F as FeedbackPayload, e as SecuritySnapshot, f as SecurityConfig } from './controller-aBTXOLBM.cjs';
2
+ export { g as BlocFeedConfig, h as BlocFeedController, i as BlocFeedError, j as BlocFeedHandle, k as BlocFeedState, l as BlocFeedStrings, m as ConsoleEntry, D as DiagnosticsConfig, E as ElementDescriptor, n as FeedbackApiResponse, o as FeedbackCategory, H as HoverListener, I as ImageAsset, N as NetworkEntry, p as Rect, q as ScreenshotAdapterOptions, r as ScreenshotIntent, s as ScreenshotMime, t as SecurityFinding, u as SessionPhase, v as StateListener, w as SubmitResult, T as ThemeConfig, x as TransportConfig, y as TriggerStyle, z as VideoIntent, A as VideoMime, W as WidgetPosition, G as createBlocFeedController } from './controller-aBTXOLBM.cjs';
3
3
 
4
4
  declare function createHtmlToImageAdapter(): ScreenshotAdapter;
5
5
 
package/dist/engine.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as ScreenshotAdapter, C as CaptureConfig, a as CaptureResult, V as VideoAsset, R as RecordingConfig, b as ClickEvent, c as VoiceConfig, M as MetadataConfig, d as MetadataContext, B as BlocFeedUser, F as FeedbackPayload, e as SecuritySnapshot, f as SecurityConfig } from './controller-D7yFqYcL.js';
2
- export { g as BlocFeedConfig, h as BlocFeedController, i as BlocFeedError, j as BlocFeedHandle, k as BlocFeedState, l as BlocFeedStrings, m as ConsoleEntry, D as DiagnosticsConfig, E as ElementDescriptor, n as FeedbackApiResponse, o as FeedbackCategory, H as HoverListener, I as ImageAsset, N as NetworkEntry, p as Rect, q as ScreenshotAdapterOptions, r as ScreenshotIntent, s as ScreenshotMime, t as SecurityFinding, u as SessionPhase, v as StateListener, w as SubmitResult, T as ThemeConfig, x as TransportConfig, y as TriggerStyle, z as VideoIntent, A as VideoMime, W as WidgetPosition, G as createBlocFeedController } from './controller-D7yFqYcL.js';
1
+ import { S as ScreenshotAdapter, C as CaptureConfig, a as CaptureResult, V as VideoAsset, R as RecordingConfig, b as ClickEvent, c as VoiceConfig, M as MetadataConfig, d as MetadataContext, B as BlocFeedUser, F as FeedbackPayload, e as SecuritySnapshot, f as SecurityConfig } from './controller-aBTXOLBM.js';
2
+ export { g as BlocFeedConfig, h as BlocFeedController, i as BlocFeedError, j as BlocFeedHandle, k as BlocFeedState, l as BlocFeedStrings, m as ConsoleEntry, D as DiagnosticsConfig, E as ElementDescriptor, n as FeedbackApiResponse, o as FeedbackCategory, H as HoverListener, I as ImageAsset, N as NetworkEntry, p as Rect, q as ScreenshotAdapterOptions, r as ScreenshotIntent, s as ScreenshotMime, t as SecurityFinding, u as SessionPhase, v as StateListener, w as SubmitResult, T as ThemeConfig, x as TransportConfig, y as TriggerStyle, z as VideoIntent, A as VideoMime, W as WidgetPosition, G as createBlocFeedController } from './controller-aBTXOLBM.js';
3
3
 
4
4
  declare function createHtmlToImageAdapter(): ScreenshotAdapter;
5
5
 
package/dist/engine.js CHANGED
@@ -1 +1 @@
1
- import {a}from'./chunk-FYGPX2PH.js';export{j as clearClickEvents,z as clearDiagnostics,g as clearQueue,C as clearSecurityFindings,d as collectMetadata,u as createBlocFeedController,b as createHtmlToImageAdapter,f as dequeueAll,i as drainClickEvents,y as drainDiagnostics,e as enqueue,p as getMyFeedbackUrl,h as getQueueSize,B as getSecurityFindings,o as getViewerToken,w as installDiagnostics,k as isRecordingSupported,m as isVoiceSupported,c as runCapture,A as runSecretScan,l as startRecording,n as startVoiceRecording,q as transcribeAudio,x as uninstallDiagnostics}from'./chunk-FYGPX2PH.js';function s(o){if(o?.aborted)throw new Error("Aborted")}async function v(o){return await new Promise((t,e)=>{let r=new Image;r.onload=()=>t({width:r.naturalWidth,height:r.naturalHeight}),r.onerror=()=>e(new Error("Failed to load generated screenshot")),r.src=o;})}async function l(o,t){let{width:e,height:r}=await v(o);return {dataUrl:o,mime:t,width:e,height:r}}function U(o){return {async captureElement(t,e){if(!a())throw new Error("captureElement can only run in the browser");s(e.signal);let r={scale:e.pixelRatio},n=e.mime==="image/jpeg"?await o.domToJpeg(t,{...r,quality:e.quality??.92}):await o.domToPng(t,r);return s(e.signal),await l(n,e.mime)},async captureFullPage(t){if(!a())throw new Error("captureFullPage can only run in the browser");s(t.signal);let e=document.documentElement,r=Math.max(e.scrollWidth,e.clientWidth),n=Math.max(e.scrollHeight,e.clientHeight),i=Math.min(1,t.maxDimension/Math.max(r,n)),c={width:Math.max(1,Math.round(r*i)),height:Math.max(1,Math.round(n*i)),scale:t.pixelRatio},a$1=t.mime==="image/jpeg"?await o.domToJpeg(e,{...c,quality:t.quality??.92}):await o.domToPng(e,c);return s(t.signal),await l(a$1,t.mime)}}}function O(o){let[t,e]=o.split(",",2);if(!t||!e)throw new Error("Invalid data URL");let n=/data:(.*?);base64/.exec(t)?.[1]||"application/octet-stream",i=atob(e),c=new Uint8Array(i.length);for(let a=0;a<i.length;a+=1)c[a]=i.charCodeAt(a);return new Blob([c],{type:n})}export{U as createModernScreenshotAdapter,O as dataUrlToBlob};
1
+ import {a}from'./chunk-D2C34VKO.js';export{j as clearClickEvents,z as clearDiagnostics,g as clearQueue,C as clearSecurityFindings,d as collectMetadata,u as createBlocFeedController,b as createHtmlToImageAdapter,f as dequeueAll,i as drainClickEvents,y as drainDiagnostics,e as enqueue,p as getMyFeedbackUrl,h as getQueueSize,B as getSecurityFindings,o as getViewerToken,w as installDiagnostics,k as isRecordingSupported,m as isVoiceSupported,c as runCapture,A as runSecretScan,l as startRecording,n as startVoiceRecording,q as transcribeAudio,x as uninstallDiagnostics}from'./chunk-D2C34VKO.js';function s(o){if(o?.aborted)throw new Error("Aborted")}async function v(o){return await new Promise((t,e)=>{let r=new Image;r.onload=()=>t({width:r.naturalWidth,height:r.naturalHeight}),r.onerror=()=>e(new Error("Failed to load generated screenshot")),r.src=o;})}async function l(o,t){let{width:e,height:r}=await v(o);return {dataUrl:o,mime:t,width:e,height:r}}function U(o){return {async captureElement(t,e){if(!a())throw new Error("captureElement can only run in the browser");s(e.signal);let r={scale:e.pixelRatio},n=e.mime==="image/jpeg"?await o.domToJpeg(t,{...r,quality:e.quality??.92}):await o.domToPng(t,r);return s(e.signal),await l(n,e.mime)},async captureFullPage(t){if(!a())throw new Error("captureFullPage can only run in the browser");s(t.signal);let e=document.documentElement,r=Math.max(e.scrollWidth,e.clientWidth),n=Math.max(e.scrollHeight,e.clientHeight),i=Math.min(1,t.maxDimension/Math.max(r,n)),c={width:Math.max(1,Math.round(r*i)),height:Math.max(1,Math.round(n*i)),scale:t.pixelRatio},a$1=t.mime==="image/jpeg"?await o.domToJpeg(e,{...c,quality:t.quality??.92}):await o.domToPng(e,c);return s(t.signal),await l(a$1,t.mime)}}}function O(o){let[t,e]=o.split(",",2);if(!t||!e)throw new Error("Invalid data URL");let n=/data:(.*?);base64/.exec(t)?.[1]||"application/octet-stream",i=atob(e),c=new Uint8Array(i.length);for(let a=0;a<i.length;a+=1)c[a]=i.charCodeAt(a);return new Blob([c],{type:n})}export{U as createModernScreenshotAdapter,O as dataUrlToBlob};
package/dist/main.cjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunk6JMBSCRM_cjs=require('./chunk-6JMBSCRM.cjs');Object.defineProperty(exports,"BehavioralTracker",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.t}});Object.defineProperty(exports,"BlocFeed",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.G}});Object.defineProperty(exports,"BlocFeedProvider",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.v}});Object.defineProperty(exports,"BlocFeedWidget",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.E}});Object.defineProperty(exports,"SDK_VERSION",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.F}});Object.defineProperty(exports,"track",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.s}});Object.defineProperty(exports,"useBlocFeed",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.D}});
2
+ 'use strict';var chunk5FILYSWV_cjs=require('./chunk-5FILYSWV.cjs');Object.defineProperty(exports,"BehavioralTracker",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.t}});Object.defineProperty(exports,"BlocFeed",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.G}});Object.defineProperty(exports,"BlocFeedProvider",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.v}});Object.defineProperty(exports,"BlocFeedWidget",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.E}});Object.defineProperty(exports,"SDK_VERSION",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.F}});Object.defineProperty(exports,"track",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.s}});Object.defineProperty(exports,"useBlocFeed",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.D}});
package/dist/main.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { g as BlocFeedConfig, j as BlocFeedHandle, k as BlocFeedState, h as BlocFeedController, C as CaptureConfig, o as FeedbackCategory, w as SubmitResult, K as BehavioralEvent, J as BehavioralConfig } from './controller-D7yFqYcL.cjs';
2
- export { L as BehavioralEventType, i as BlocFeedError, l as BlocFeedStrings, B as BlocFeedUser, O as CaptureDiagnostics, a as CaptureResult, m as ConsoleEntry, D as DiagnosticsConfig, E as ElementDescriptor, n as FeedbackApiResponse, F as FeedbackPayload, I as ImageAsset, P as MaybePromise, M as MetadataConfig, d as MetadataContext, N as NetworkEntry, Q as PickerConfig, U as PiiScrubMode, R as RecordingConfig, p as Rect, S as ScreenshotAdapter, q as ScreenshotAdapterOptions, r as ScreenshotIntent, s as ScreenshotMime, f as SecurityConfig, t as SecurityFinding, e as SecuritySnapshot, u as SessionPhase, T as ThemeConfig, x as TransportConfig, X as TransportResult, y as TriggerStyle, V as VideoAsset, z as VideoIntent, A as VideoMime, c as VoiceConfig, W as WidgetPosition } from './controller-D7yFqYcL.cjs';
1
+ import { g as BlocFeedConfig, j as BlocFeedHandle, k as BlocFeedState, h as BlocFeedController, C as CaptureConfig, o as FeedbackCategory, w as SubmitResult, K as BehavioralEvent, J as BehavioralConfig } from './controller-aBTXOLBM.cjs';
2
+ export { L as BehavioralEventType, i as BlocFeedError, l as BlocFeedStrings, B as BlocFeedUser, O as CaptureDiagnostics, a as CaptureResult, m as ConsoleEntry, D as DiagnosticsConfig, E as ElementDescriptor, n as FeedbackApiResponse, F as FeedbackPayload, I as ImageAsset, P as MaybePromise, M as MetadataConfig, d as MetadataContext, N as NetworkEntry, Q as PickerConfig, U as PiiScrubMode, R as RecordingConfig, p as Rect, S as ScreenshotAdapter, q as ScreenshotAdapterOptions, r as ScreenshotIntent, s as ScreenshotMime, f as SecurityConfig, t as SecurityFinding, e as SecuritySnapshot, u as SessionPhase, T as ThemeConfig, x as TransportConfig, X as TransportResult, y as TriggerStyle, V as VideoAsset, z as VideoIntent, A as VideoMime, c as VoiceConfig, W as WidgetPosition } from './controller-aBTXOLBM.cjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode } from 'react';
@@ -110,7 +110,7 @@ declare function track(name: string, properties?: TrackProperties, options?: Tra
110
110
  * Pinned at publish time. Sent with the heartbeat so the dashboard can
111
111
  * surface SDK version drift to customers.
112
112
  */
113
- declare const SDK_VERSION = "0.24.0";
113
+ declare const SDK_VERSION = "0.26.0";
114
114
 
115
115
  /**
116
116
  * Non-React entry point. Mirrors the shape of the rest of the SDK exports;
package/dist/main.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { g as BlocFeedConfig, j as BlocFeedHandle, k as BlocFeedState, h as BlocFeedController, C as CaptureConfig, o as FeedbackCategory, w as SubmitResult, K as BehavioralEvent, J as BehavioralConfig } from './controller-D7yFqYcL.js';
2
- export { L as BehavioralEventType, i as BlocFeedError, l as BlocFeedStrings, B as BlocFeedUser, O as CaptureDiagnostics, a as CaptureResult, m as ConsoleEntry, D as DiagnosticsConfig, E as ElementDescriptor, n as FeedbackApiResponse, F as FeedbackPayload, I as ImageAsset, P as MaybePromise, M as MetadataConfig, d as MetadataContext, N as NetworkEntry, Q as PickerConfig, U as PiiScrubMode, R as RecordingConfig, p as Rect, S as ScreenshotAdapter, q as ScreenshotAdapterOptions, r as ScreenshotIntent, s as ScreenshotMime, f as SecurityConfig, t as SecurityFinding, e as SecuritySnapshot, u as SessionPhase, T as ThemeConfig, x as TransportConfig, X as TransportResult, y as TriggerStyle, V as VideoAsset, z as VideoIntent, A as VideoMime, c as VoiceConfig, W as WidgetPosition } from './controller-D7yFqYcL.js';
1
+ import { g as BlocFeedConfig, j as BlocFeedHandle, k as BlocFeedState, h as BlocFeedController, C as CaptureConfig, o as FeedbackCategory, w as SubmitResult, K as BehavioralEvent, J as BehavioralConfig } from './controller-aBTXOLBM.js';
2
+ export { L as BehavioralEventType, i as BlocFeedError, l as BlocFeedStrings, B as BlocFeedUser, O as CaptureDiagnostics, a as CaptureResult, m as ConsoleEntry, D as DiagnosticsConfig, E as ElementDescriptor, n as FeedbackApiResponse, F as FeedbackPayload, I as ImageAsset, P as MaybePromise, M as MetadataConfig, d as MetadataContext, N as NetworkEntry, Q as PickerConfig, U as PiiScrubMode, R as RecordingConfig, p as Rect, S as ScreenshotAdapter, q as ScreenshotAdapterOptions, r as ScreenshotIntent, s as ScreenshotMime, f as SecurityConfig, t as SecurityFinding, e as SecuritySnapshot, u as SessionPhase, T as ThemeConfig, x as TransportConfig, X as TransportResult, y as TriggerStyle, V as VideoAsset, z as VideoIntent, A as VideoMime, c as VoiceConfig, W as WidgetPosition } from './controller-aBTXOLBM.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode } from 'react';
@@ -110,7 +110,7 @@ declare function track(name: string, properties?: TrackProperties, options?: Tra
110
110
  * Pinned at publish time. Sent with the heartbeat so the dashboard can
111
111
  * surface SDK version drift to customers.
112
112
  */
113
- declare const SDK_VERSION = "0.24.0";
113
+ declare const SDK_VERSION = "0.26.0";
114
114
 
115
115
  /**
116
116
  * Non-React entry point. Mirrors the shape of the rest of the SDK exports;
package/dist/main.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{t as BehavioralTracker,G as BlocFeed,v as BlocFeedProvider,E as BlocFeedWidget,F as SDK_VERSION,s as track,D as useBlocFeed}from'./chunk-FYGPX2PH.js';
2
+ export{t as BehavioralTracker,G as BlocFeed,v as BlocFeedProvider,E as BlocFeedWidget,F as SDK_VERSION,s as track,D as useBlocFeed}from'./chunk-D2C34VKO.js';
package/dist/passive.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunk6JMBSCRM_cjs=require('./chunk-6JMBSCRM.cjs'),react=require('react');function a(e){e.user?.id&&chunk6JMBSCRM_cjs.r(e.user.id);let i=new chunk6JMBSCRM_cjs.t({blocfeedId:e.blocfeed_id,...e.config!==void 0?{config:e.config}:{},...e.extraSdkFeatures!==void 0?{extraSdkFeatures:e.extraSdkFeatures}:{}});return i.install(),i}function u(e){return react.useEffect(()=>{let i=a({blocfeed_id:e.blocfeed_id,...e.user!==void 0?{user:e.user}:{},...e.config!==void 0?{config:e.config}:{}});return ()=>{i.uninstall();}},[e.blocfeed_id]),null}var r=null,g={init(e){r||(r=a(e));},identify(e,i){chunk6JMBSCRM_cjs.r(e);},track(e,i){chunk6JMBSCRM_cjs.s(e,i);},uninstall(){r&&(r.uninstall(),r=null);}};function v(){return r}function k(){r&&(r.uninstall(),r=null);}Object.defineProperty(exports,"SDK_VERSION",{enumerable:true,get:function(){return chunk6JMBSCRM_cjs.F}});exports.BlocFeed=g;exports.BlocFeedPassive=u;exports.__getStandaloneTrackerForTesting=v;exports.__resetStandaloneTrackerForTesting=k;
1
+ 'use strict';var chunk5FILYSWV_cjs=require('./chunk-5FILYSWV.cjs'),react=require('react');function a(e){e.user?.id&&chunk5FILYSWV_cjs.r(e.user.id);let i=new chunk5FILYSWV_cjs.t({blocfeedId:e.blocfeed_id,...e.config!==void 0?{config:e.config}:{},...e.extraSdkFeatures!==void 0?{extraSdkFeatures:e.extraSdkFeatures}:{}});return i.install(),i}function u(e){return react.useEffect(()=>{let i=a({blocfeed_id:e.blocfeed_id,...e.user!==void 0?{user:e.user}:{},...e.config!==void 0?{config:e.config}:{}});return ()=>{i.uninstall();}},[e.blocfeed_id]),null}var r=null,g={init(e){r||(r=a(e));},identify(e,i){chunk5FILYSWV_cjs.r(e);},track(e,i){chunk5FILYSWV_cjs.s(e,i);},uninstall(){r&&(r.uninstall(),r=null);}};function v(){return r}function k(){r&&(r.uninstall(),r=null);}Object.defineProperty(exports,"SDK_VERSION",{enumerable:true,get:function(){return chunk5FILYSWV_cjs.F}});exports.BlocFeed=g;exports.BlocFeedPassive=u;exports.__getStandaloneTrackerForTesting=v;exports.__resetStandaloneTrackerForTesting=k;
@@ -1,7 +1,7 @@
1
1
  import { TrackProperties, BehavioralTracker } from './main.cjs';
2
2
  export { SDK_VERSION } from './main.cjs';
3
- import { B as BlocFeedUser, J as BehavioralConfig } from './controller-D7yFqYcL.cjs';
4
- export { K as BehavioralEvent } from './controller-D7yFqYcL.cjs';
3
+ import { B as BlocFeedUser, J as BehavioralConfig } from './controller-aBTXOLBM.cjs';
4
+ export { K as BehavioralEvent } from './controller-aBTXOLBM.cjs';
5
5
  import 'react/jsx-runtime';
6
6
  import 'react';
7
7
 
package/dist/passive.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { TrackProperties, BehavioralTracker } from './main.js';
2
2
  export { SDK_VERSION } from './main.js';
3
- import { B as BlocFeedUser, J as BehavioralConfig } from './controller-D7yFqYcL.js';
4
- export { K as BehavioralEvent } from './controller-D7yFqYcL.js';
3
+ import { B as BlocFeedUser, J as BehavioralConfig } from './controller-aBTXOLBM.js';
4
+ export { K as BehavioralEvent } from './controller-aBTXOLBM.js';
5
5
  import 'react/jsx-runtime';
6
6
  import 'react';
7
7
 
package/dist/passive.js CHANGED
@@ -1 +1 @@
1
- import {s,r as r$1,t}from'./chunk-FYGPX2PH.js';export{F as SDK_VERSION}from'./chunk-FYGPX2PH.js';import {useEffect}from'react';function a(e){e.user?.id&&r$1(e.user.id);let i=new t({blocfeedId:e.blocfeed_id,...e.config!==void 0?{config:e.config}:{},...e.extraSdkFeatures!==void 0?{extraSdkFeatures:e.extraSdkFeatures}:{}});return i.install(),i}function u(e){return useEffect(()=>{let i=a({blocfeed_id:e.blocfeed_id,...e.user!==void 0?{user:e.user}:{},...e.config!==void 0?{config:e.config}:{}});return ()=>{i.uninstall();}},[e.blocfeed_id]),null}var r=null,g={init(e){r||(r=a(e));},identify(e,i){r$1(e);},track(e,i){s(e,i);},uninstall(){r&&(r.uninstall(),r=null);}};function v(){return r}function k(){r&&(r.uninstall(),r=null);}export{g as BlocFeed,u as BlocFeedPassive,v as __getStandaloneTrackerForTesting,k as __resetStandaloneTrackerForTesting};
1
+ import {s,r as r$1,t}from'./chunk-D2C34VKO.js';export{F as SDK_VERSION}from'./chunk-D2C34VKO.js';import {useEffect}from'react';function a(e){e.user?.id&&r$1(e.user.id);let i=new t({blocfeedId:e.blocfeed_id,...e.config!==void 0?{config:e.config}:{},...e.extraSdkFeatures!==void 0?{extraSdkFeatures:e.extraSdkFeatures}:{}});return i.install(),i}function u(e){return useEffect(()=>{let i=a({blocfeed_id:e.blocfeed_id,...e.user!==void 0?{user:e.user}:{},...e.config!==void 0?{config:e.config}:{}});return ()=>{i.uninstall();}},[e.blocfeed_id]),null}var r=null,g={init(e){r||(r=a(e));},identify(e,i){r$1(e);},track(e,i){s(e,i);},uninstall(){r&&(r.uninstall(),r=null);}};function v(){return r}function k(){r&&(r.uninstall(),r=null);}export{g as BlocFeed,u as BlocFeedPassive,v as __getStandaloneTrackerForTesting,k as __resetStandaloneTrackerForTesting};