blocfeed 0.17.3 → 0.19.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/CHANGELOG.md +31 -0
- package/dist/chunk-XVMFV46F.js +884 -0
- package/dist/chunk-ZQDABCPT.cjs +884 -0
- package/dist/{controller-09cYt2qm.d.cts → controller-C5mxpGk4.d.cts} +2 -0
- package/dist/{controller-09cYt2qm.d.ts → controller-C5mxpGk4.d.ts} +2 -0
- package/dist/engine.cjs +1 -1
- package/dist/engine.d.cts +2 -2
- package/dist/engine.d.ts +2 -2
- package/dist/engine.js +1 -1
- package/dist/main.cjs +1 -884
- package/dist/main.d.cts +68 -3
- package/dist/main.d.ts +68 -3
- package/dist/main.js +1 -884
- package/package.json +1 -1
- package/dist/chunk-4VWH5ZG6.cjs +0 -2
- package/dist/chunk-CS63UWFR.js +0 -2
package/dist/main.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BlocFeedConfig, a as BlocFeedHandle, b as BlocFeedState, c as BlocFeedController, C as CaptureConfig, F as FeedbackCategory, S as SubmitResult, d as BehavioralEvent, e as BehavioralConfig } from './controller-
|
|
2
|
-
export { f as BehavioralEventType, g as BlocFeedError, h as BlocFeedStrings, i as BlocFeedUser, j as CaptureDiagnostics, k as CaptureResult, l as ConsoleEntry, D as DiagnosticsConfig, E as ElementDescriptor, m as FeedbackApiResponse, n as FeedbackPayload, I as ImageAsset, M as MaybePromise, o as MetadataConfig, p as MetadataContext, N as NetworkEntry, P as PickerConfig, R as RecordingConfig, q as Rect, r as ScreenshotAdapter, s as ScreenshotAdapterOptions, t as ScreenshotIntent, u as ScreenshotMime, v as SecurityConfig, w as SecurityFinding, x as SecuritySnapshot, y as SessionPhase, T as ThemeConfig, z as TransportConfig, A as TransportResult, G as TriggerStyle, V as VideoAsset, H as VideoIntent, J as VideoMime, K as VoiceConfig, W as WidgetPosition } from './controller-
|
|
1
|
+
import { B as BlocFeedConfig, a as BlocFeedHandle, b as BlocFeedState, c as BlocFeedController, C as CaptureConfig, F as FeedbackCategory, S as SubmitResult, d as BehavioralEvent, e as BehavioralConfig } from './controller-C5mxpGk4.cjs';
|
|
2
|
+
export { f as BehavioralEventType, g as BlocFeedError, h as BlocFeedStrings, i as BlocFeedUser, j as CaptureDiagnostics, k as CaptureResult, l as ConsoleEntry, D as DiagnosticsConfig, E as ElementDescriptor, m as FeedbackApiResponse, n as FeedbackPayload, I as ImageAsset, M as MaybePromise, o as MetadataConfig, p as MetadataContext, N as NetworkEntry, P as PickerConfig, R as RecordingConfig, q as Rect, r as ScreenshotAdapter, s as ScreenshotAdapterOptions, t as ScreenshotIntent, u as ScreenshotMime, v as SecurityConfig, w as SecurityFinding, x as SecuritySnapshot, y as SessionPhase, T as ThemeConfig, z as TransportConfig, A as TransportResult, G as TriggerStyle, V as VideoAsset, H as VideoIntent, J as VideoMime, K as VoiceConfig, W as WidgetPosition } from './controller-C5mxpGk4.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';
|
|
@@ -17,6 +17,24 @@ type BlocFeedWidgetProps = {
|
|
|
17
17
|
};
|
|
18
18
|
declare const BlocFeedWidget: react.ForwardRefExoticComponent<BlocFeedWidgetProps & react.RefAttributes<BlocFeedHandle>>;
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Public-API types for the `track()` custom-event surface.
|
|
22
|
+
*
|
|
23
|
+
* `track(name, properties?, options?)` enqueues an event into a process-wide
|
|
24
|
+
* buffer that flushes to `POST /api/events/track`. See ./customEvents.ts.
|
|
25
|
+
*/
|
|
26
|
+
interface TrackOptions {
|
|
27
|
+
/** Override the auto-attached session_id (defaults to current rrweb session). */
|
|
28
|
+
sessionId?: string;
|
|
29
|
+
/** Override the auto-attached user_id (defaults to last `identify()` call). */
|
|
30
|
+
userId?: string;
|
|
31
|
+
/** Override the auto-attached page_url (defaults to window.location.href). */
|
|
32
|
+
pageUrl?: string;
|
|
33
|
+
/** Override the auto-attached occurred_at (defaults to now()). */
|
|
34
|
+
occurredAt?: Date | string;
|
|
35
|
+
}
|
|
36
|
+
type TrackProperties = Record<string, string | number | boolean | null>;
|
|
37
|
+
|
|
20
38
|
type BlocFeedApi = {
|
|
21
39
|
state: BlocFeedState;
|
|
22
40
|
controller: BlocFeedController;
|
|
@@ -30,6 +48,14 @@ type BlocFeedApi = {
|
|
|
30
48
|
startRecording: () => Promise<void>;
|
|
31
49
|
stopRecording: () => void;
|
|
32
50
|
removeVideo: () => void;
|
|
51
|
+
/**
|
|
52
|
+
* Send a custom event to BlocFeed for funnels, conversion tracking, and
|
|
53
|
+
* segment filters. Buffered + flushed periodically — non-blocking.
|
|
54
|
+
*
|
|
55
|
+
* `name` must match `/^[a-z][a-z0-9_]{0,127}$/`.
|
|
56
|
+
* `properties` is a flat object of string|number|boolean|null values.
|
|
57
|
+
*/
|
|
58
|
+
track: (name: string, properties?: TrackProperties, options?: TrackOptions) => void;
|
|
33
59
|
};
|
|
34
60
|
declare function useBlocFeed(): BlocFeedApi;
|
|
35
61
|
|
|
@@ -60,4 +86,43 @@ declare class BehavioralTracker {
|
|
|
60
86
|
uninstall(): void;
|
|
61
87
|
}
|
|
62
88
|
|
|
63
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Buffered custom-event tracker.
|
|
91
|
+
*
|
|
92
|
+
* Public API: `track(name, properties?, options?)`. Mirrors the offline-queue
|
|
93
|
+
* + flush patterns used by `runtime/replay/capture.ts` and the behavioral
|
|
94
|
+
* submitter — keepalive only on the pagehide beacon path, in-session flushes
|
|
95
|
+
* use plain fetch (lesson from v0.17.1).
|
|
96
|
+
*
|
|
97
|
+
* Singleton: one buffer per page load, lazily created on first track() call.
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
declare function track(name: string, properties?: TrackProperties, options?: TrackOptions): void;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Pinned at publish time. Sent with the heartbeat so the dashboard can
|
|
104
|
+
* surface SDK version drift to customers.
|
|
105
|
+
*/
|
|
106
|
+
declare const SDK_VERSION = "0.19.0";
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Non-React entry point. Mirrors the shape of the rest of the SDK exports;
|
|
110
|
+
* use this from Vue, Svelte, or vanilla apps where there is no
|
|
111
|
+
* `useBlocFeed()` hook available.
|
|
112
|
+
*
|
|
113
|
+
* ```ts
|
|
114
|
+
* import { BlocFeed } from "blocfeed";
|
|
115
|
+
* BlocFeed.identify("user_42");
|
|
116
|
+
* BlocFeed.track("checkout_completed", { plan: "team" });
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
declare const BlocFeed: {
|
|
120
|
+
/** Register the blocfeed_id (only needed on Vue / vanilla; React provider does this for you). */
|
|
121
|
+
init(blocfeedId: string): void;
|
|
122
|
+
/** Attach a user_id to subsequent track() calls. Pass `undefined` to clear. */
|
|
123
|
+
identify(userId: string | undefined): void;
|
|
124
|
+
/** Send a custom event. See `track()` for validation rules. */
|
|
125
|
+
track: typeof track;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export { BehavioralConfig, BehavioralEvent, BehavioralTracker, BlocFeed, type BlocFeedApi, BlocFeedConfig, BlocFeedHandle, BlocFeedProvider, BlocFeedState, BlocFeedWidget, CaptureConfig, FeedbackCategory, SDK_VERSION, SubmitResult, type TrackOptions, type TrackProperties, track, useBlocFeed };
|
package/dist/main.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BlocFeedConfig, a as BlocFeedHandle, b as BlocFeedState, c as BlocFeedController, C as CaptureConfig, F as FeedbackCategory, S as SubmitResult, d as BehavioralEvent, e as BehavioralConfig } from './controller-
|
|
2
|
-
export { f as BehavioralEventType, g as BlocFeedError, h as BlocFeedStrings, i as BlocFeedUser, j as CaptureDiagnostics, k as CaptureResult, l as ConsoleEntry, D as DiagnosticsConfig, E as ElementDescriptor, m as FeedbackApiResponse, n as FeedbackPayload, I as ImageAsset, M as MaybePromise, o as MetadataConfig, p as MetadataContext, N as NetworkEntry, P as PickerConfig, R as RecordingConfig, q as Rect, r as ScreenshotAdapter, s as ScreenshotAdapterOptions, t as ScreenshotIntent, u as ScreenshotMime, v as SecurityConfig, w as SecurityFinding, x as SecuritySnapshot, y as SessionPhase, T as ThemeConfig, z as TransportConfig, A as TransportResult, G as TriggerStyle, V as VideoAsset, H as VideoIntent, J as VideoMime, K as VoiceConfig, W as WidgetPosition } from './controller-
|
|
1
|
+
import { B as BlocFeedConfig, a as BlocFeedHandle, b as BlocFeedState, c as BlocFeedController, C as CaptureConfig, F as FeedbackCategory, S as SubmitResult, d as BehavioralEvent, e as BehavioralConfig } from './controller-C5mxpGk4.js';
|
|
2
|
+
export { f as BehavioralEventType, g as BlocFeedError, h as BlocFeedStrings, i as BlocFeedUser, j as CaptureDiagnostics, k as CaptureResult, l as ConsoleEntry, D as DiagnosticsConfig, E as ElementDescriptor, m as FeedbackApiResponse, n as FeedbackPayload, I as ImageAsset, M as MaybePromise, o as MetadataConfig, p as MetadataContext, N as NetworkEntry, P as PickerConfig, R as RecordingConfig, q as Rect, r as ScreenshotAdapter, s as ScreenshotAdapterOptions, t as ScreenshotIntent, u as ScreenshotMime, v as SecurityConfig, w as SecurityFinding, x as SecuritySnapshot, y as SessionPhase, T as ThemeConfig, z as TransportConfig, A as TransportResult, G as TriggerStyle, V as VideoAsset, H as VideoIntent, J as VideoMime, K as VoiceConfig, W as WidgetPosition } from './controller-C5mxpGk4.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';
|
|
@@ -17,6 +17,24 @@ type BlocFeedWidgetProps = {
|
|
|
17
17
|
};
|
|
18
18
|
declare const BlocFeedWidget: react.ForwardRefExoticComponent<BlocFeedWidgetProps & react.RefAttributes<BlocFeedHandle>>;
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Public-API types for the `track()` custom-event surface.
|
|
22
|
+
*
|
|
23
|
+
* `track(name, properties?, options?)` enqueues an event into a process-wide
|
|
24
|
+
* buffer that flushes to `POST /api/events/track`. See ./customEvents.ts.
|
|
25
|
+
*/
|
|
26
|
+
interface TrackOptions {
|
|
27
|
+
/** Override the auto-attached session_id (defaults to current rrweb session). */
|
|
28
|
+
sessionId?: string;
|
|
29
|
+
/** Override the auto-attached user_id (defaults to last `identify()` call). */
|
|
30
|
+
userId?: string;
|
|
31
|
+
/** Override the auto-attached page_url (defaults to window.location.href). */
|
|
32
|
+
pageUrl?: string;
|
|
33
|
+
/** Override the auto-attached occurred_at (defaults to now()). */
|
|
34
|
+
occurredAt?: Date | string;
|
|
35
|
+
}
|
|
36
|
+
type TrackProperties = Record<string, string | number | boolean | null>;
|
|
37
|
+
|
|
20
38
|
type BlocFeedApi = {
|
|
21
39
|
state: BlocFeedState;
|
|
22
40
|
controller: BlocFeedController;
|
|
@@ -30,6 +48,14 @@ type BlocFeedApi = {
|
|
|
30
48
|
startRecording: () => Promise<void>;
|
|
31
49
|
stopRecording: () => void;
|
|
32
50
|
removeVideo: () => void;
|
|
51
|
+
/**
|
|
52
|
+
* Send a custom event to BlocFeed for funnels, conversion tracking, and
|
|
53
|
+
* segment filters. Buffered + flushed periodically — non-blocking.
|
|
54
|
+
*
|
|
55
|
+
* `name` must match `/^[a-z][a-z0-9_]{0,127}$/`.
|
|
56
|
+
* `properties` is a flat object of string|number|boolean|null values.
|
|
57
|
+
*/
|
|
58
|
+
track: (name: string, properties?: TrackProperties, options?: TrackOptions) => void;
|
|
33
59
|
};
|
|
34
60
|
declare function useBlocFeed(): BlocFeedApi;
|
|
35
61
|
|
|
@@ -60,4 +86,43 @@ declare class BehavioralTracker {
|
|
|
60
86
|
uninstall(): void;
|
|
61
87
|
}
|
|
62
88
|
|
|
63
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Buffered custom-event tracker.
|
|
91
|
+
*
|
|
92
|
+
* Public API: `track(name, properties?, options?)`. Mirrors the offline-queue
|
|
93
|
+
* + flush patterns used by `runtime/replay/capture.ts` and the behavioral
|
|
94
|
+
* submitter — keepalive only on the pagehide beacon path, in-session flushes
|
|
95
|
+
* use plain fetch (lesson from v0.17.1).
|
|
96
|
+
*
|
|
97
|
+
* Singleton: one buffer per page load, lazily created on first track() call.
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
declare function track(name: string, properties?: TrackProperties, options?: TrackOptions): void;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Pinned at publish time. Sent with the heartbeat so the dashboard can
|
|
104
|
+
* surface SDK version drift to customers.
|
|
105
|
+
*/
|
|
106
|
+
declare const SDK_VERSION = "0.19.0";
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Non-React entry point. Mirrors the shape of the rest of the SDK exports;
|
|
110
|
+
* use this from Vue, Svelte, or vanilla apps where there is no
|
|
111
|
+
* `useBlocFeed()` hook available.
|
|
112
|
+
*
|
|
113
|
+
* ```ts
|
|
114
|
+
* import { BlocFeed } from "blocfeed";
|
|
115
|
+
* BlocFeed.identify("user_42");
|
|
116
|
+
* BlocFeed.track("checkout_completed", { plan: "team" });
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
declare const BlocFeed: {
|
|
120
|
+
/** Register the blocfeed_id (only needed on Vue / vanilla; React provider does this for you). */
|
|
121
|
+
init(blocfeedId: string): void;
|
|
122
|
+
/** Attach a user_id to subsequent track() calls. Pass `undefined` to clear. */
|
|
123
|
+
identify(userId: string | undefined): void;
|
|
124
|
+
/** Send a custom event. See `track()` for validation rules. */
|
|
125
|
+
track: typeof track;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export { BehavioralConfig, BehavioralEvent, BehavioralTracker, BlocFeed, type BlocFeedApi, BlocFeedConfig, BlocFeedHandle, BlocFeedProvider, BlocFeedState, BlocFeedWidget, CaptureConfig, FeedbackCategory, SDK_VERSION, SubmitResult, type TrackOptions, type TrackProperties, track, useBlocFeed };
|