blocfeed 0.19.0 → 0.21.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 CHANGED
@@ -1,5 +1,60 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.21.0 — 2026-05-07
4
+
5
+ ### New: tracking-only modes for non-React stacks
6
+
7
+ Two new ways to install BlocFeed when you only want session replay,
8
+ behavioral signals, and custom events — no feedback panel UI:
9
+
10
+ - **`blocfeed/passive` subpath export.** Import `<BlocFeedPassive />` (a
11
+ React component that renders nothing and installs the tracker on mount)
12
+ or `BlocFeed.init({...})` (vanilla JS, no React required). Tree-shakes
13
+ cleanly so the feedback panel and `framer-motion` don't reach the
14
+ customer's bundle.
15
+
16
+ - **IIFE script-tag bundle (`dist/script.js`, 65 KB gzipped).** Drop into
17
+ PHP, WordPress, Webflow, or any vanilla HTML page with one tag. All
18
+ configuration via `data-*` attributes; exposes `window.BlocFeed` for
19
+ runtime `track()` / `identify()` calls. Distributed via jsDelivr at
20
+ `https://cdn.jsdelivr.net/npm/blocfeed@0/dist/script.js`.
21
+
22
+ ```html
23
+ <script async
24
+ src="https://cdn.jsdelivr.net/npm/blocfeed@0/dist/script.js"
25
+ data-blocfeed-id="bf_xxx"
26
+ data-user-id="123"></script>
27
+ ```
28
+
29
+ Available data attributes: `data-blocfeed-id` (required),
30
+ `data-user-id`, `data-user-email`, `data-user-name`, `data-replay`,
31
+ `data-signals`, `data-mask` (`inputs` / `text` / `none`), `data-sample`
32
+ (0..1), `data-track-clicks`.
33
+
34
+ - Heartbeats from script-tag installs include `"script-tag"` in
35
+ `sdk_features` so the dashboard can distinguish them from React imports.
36
+
37
+ ### Internal
38
+
39
+ - `BehavioralTracker` accepts a new `extraSdkFeatures: string[]` option
40
+ used internally to tag the deployment surface in heartbeats.
41
+
42
+ ---
43
+
44
+ ## 0.20.0 — 2026-05-07
45
+
46
+ ### Signal accuracy
47
+
48
+ - **rage-click now emits exactly one event per burst.** The previous behaviour fired an immediate `final: false` event at threshold-crossing and a follow-up `final: true` after the streak idled out, so a single rage produced two server-side rows the dashboard had to reconcile. The detector now emits a single event with `final: true` and the full `click_count` once the streak ends (`streakIdleMs`, default 1500). On `pagehide`, in-progress bursts that crossed the threshold are flushed via the same code path so we don't lose data when the user closes the tab mid-rage.
49
+
50
+ ### New: stable element keys
51
+
52
+ - New `stable_key: string | null` field on every `BehavioralEvent`. Built by walking up to four ancestors and emitting the first of `data-blocfeed-component` (→ `bf:component:<value>`), a `data-testid` family attribute (→ `bf:testid:<value>`), or `id` (→ `bf:id:<value>`). Lets the backend dedupe and aggregate events for the "same logical element" across re-renders even when the CSS selector path shifts.
53
+ - The `rage_click` and `dead_click` detectors now key their internal grouping maps on `stable_key ?? selector`, so bursts and rate-limit budgets follow the logical element, not its current selector path.
54
+ - New exported helper `buildStableElementKey(el, maxDepth?)` from `blocfeed/shared/dom`.
55
+
56
+ ---
57
+
3
58
  ## 0.19.0 — 2026-05-07
4
59
 
5
60
  ### Signal accuracy fixes