@pond-ts/react 0.11.7 → 0.11.8

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +53 -1
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,10 +7,62 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
7
7
  file covers both packages. Pre-1.0: minor bumps may include new features and
8
8
  type-level changes; patch bumps are strictly additive.
9
9
 
10
- [Unreleased]: https://github.com/pjm17971/pond-ts/compare/v0.11.7...HEAD
10
+ [Unreleased]: https://github.com/pjm17971/pond-ts/compare/v0.11.8...HEAD
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [0.11.8] — 2026-04-30
15
+
16
+ ### Added
17
+
18
+ - **`rolling.sample(sequence)`** on `LiveRollingAggregation` — taps a
19
+ rolling aggregation and emits one snapshot of the rolling state each
20
+ time a source event crosses an epoch-aligned boundary of `sequence`.
21
+ Closes the frontend-telemetry gap: collect high-frequency timing
22
+ events, sample p95 latency to a backend every 30 s, while the same
23
+ rolling drives an in-app live display (no duplicated deque).
24
+
25
+ ```ts
26
+ const rolling = timings.rolling('1m', { latency: 'p95' });
27
+
28
+ // One sampler → backend report every 30 s of event time
29
+ const reported = rolling.sample(Sequence.every('30s'));
30
+ reported.on('event', (e) =>
31
+ fetch('/api/telemetry', { method: 'POST', body: JSON.stringify(e.data()) }),
32
+ );
33
+
34
+ // Same rolling drives the UI live display
35
+ useLiveQuery(timings, () => rolling.value());
36
+ ```
37
+
38
+ `sequence` must be a fixed-step `Sequence`; calendar sequences
39
+ (`Sequence.daily()` etc.) are rejected upfront — boundary indexing
40
+ needs a constant step.
41
+
42
+ Emission is **data-driven**: no `setInterval`. If the source goes
43
+ quiet, no events fire. A single source event spanning multiple
44
+ boundaries fires exactly one event at the new bucket. Snapshot is
45
+ taken after the boundary-crossing event is ingested by the rolling,
46
+ so the emitted value includes that event's contribution.
47
+
48
+ **Independent lifetimes.** `sample.dispose()` only detaches the
49
+ sampler from the rolling; the rolling's lifecycle stays the user's
50
+ responsibility. One rolling can power multiple `.sample()` cadences
51
+ plus direct `rolling.value()` reads without coupling.
52
+
53
+ - **`LiveSequenceRollingAggregation` exported** from package root with
54
+ full `LiveSource<Out>` surface and the same view-transform set as
55
+ `LiveRollingAggregation` (`filter`, `map`, `select`, `window`,
56
+ `diff`, `rate`, `pctChange`, `fill`, `cumulative`, `rolling`,
57
+ `aggregate`).
58
+
59
+ - **Telemetry-reporting recipe** at
60
+ `website/docs/recipes/telemetry-reporting.mdx` — end-to-end
61
+ frontend-collection → backend-summary pattern using `.sample()`,
62
+ plus the React in-app display via `useLiveQuery`.
63
+
64
+ [0.11.8]: https://github.com/pjm17971/pond-ts/compare/v0.11.7...v0.11.8
65
+
14
66
  ## [0.11.7] — 2026-04-29
15
67
 
16
68
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pond-ts/react",
3
- "version": "0.11.7",
3
+ "version": "0.11.8",
4
4
  "description": "React hooks for pond-ts live time series",
5
5
  "license": "MIT",
6
6
  "repository": {