@pond-ts/react 0.26.0 → 0.28.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 +42 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,9 @@ 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.
|
|
10
|
+
[Unreleased]: https://github.com/pjm17971/pond-ts/compare/v0.28.0...HEAD
|
|
11
|
+
[0.28.0]: https://github.com/pjm17971/pond-ts/compare/v0.27.0...v0.28.0
|
|
12
|
+
[0.27.0]: https://github.com/pjm17971/pond-ts/compare/v0.26.0...v0.27.0
|
|
11
13
|
[0.26.0]: https://github.com/pjm17971/pond-ts/compare/v0.25.0...v0.26.0
|
|
12
14
|
[0.25.0]: https://github.com/pjm17971/pond-ts/compare/v0.24.0...v0.25.0
|
|
13
15
|
[0.24.0]: https://github.com/pjm17971/pond-ts/compare/v0.23.0...v0.24.0
|
|
@@ -20,7 +22,44 @@ type-level changes; patch bumps are strictly additive.
|
|
|
20
22
|
|
|
21
23
|
## [Unreleased]
|
|
22
24
|
|
|
23
|
-
## [0.
|
|
25
|
+
## [0.28.0] — 2026-06-17
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- **`TimeSeries.rollingByColumn(col, { radius }, mapping)` — windowed value-axis
|
|
30
|
+
aggregation.** The sliding-window sibling of `byColumn`: slides a centered
|
|
31
|
+
`±radius` window along a **non-decreasing** numeric column and reduces it at
|
|
32
|
+
every row, returning one record per row (positionally aligned with the
|
|
33
|
+
series). Where `byColumn` collapses rows into disjoint value-bins (the
|
|
34
|
+
value-axis analogue of `aggregate`), `rollingByColumn` is the value-axis
|
|
35
|
+
analogue of `rolling`. Built for windowed-percentile bands over a derived axis
|
|
36
|
+
(e.g. a spread band over cumulative distance). A missing/non-finite axis row is
|
|
37
|
+
excluded from every window and emits each reducer's empty value. O(n) two-pointer
|
|
38
|
+
sweep. See `docs/notes/rolling-by-column.md`.
|
|
39
|
+
- **`TimeSeries.withColumn(name, values)` — attach a computed numeric column.**
|
|
40
|
+
Appends a `Float64Array` / `(number | undefined)[]` as a new `number` column
|
|
41
|
+
(the schema type widens to include it), so a derived array — cumulative
|
|
42
|
+
distance, speed, gradient — can re-enter the pond pipeline as a real column
|
|
43
|
+
that `aggregate` / `byColumn` / `rollingByColumn` / `column(name)` can
|
|
44
|
+
reference. Existing key + value columns are shared by reference (zero-copy);
|
|
45
|
+
only the new column is added. `values` must match `series.length`; defined
|
|
46
|
+
cells are validated against the numeric intake contract (**non-finite is
|
|
47
|
+
rejected** — pass `undefined` for a missing cell, not `NaN`).
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
|
|
51
|
+
- **`TimeSeries.byColumn(col, { width, origin? } | { edges }, mapping)` —
|
|
52
|
+
value-axis aggregation.** Where `aggregate` buckets the temporal key,
|
|
53
|
+
`byColumn` buckets rows by the **value** of a numeric column and reduces each
|
|
54
|
+
bin, returning an ordered array of `{ start, end, ...aggregates }` records
|
|
55
|
+
(one per bin) — not a `TimeSeries`, since value-bins (distance / power ranges)
|
|
56
|
+
aren't time-indexed. `{ width }` gives even bins emitted contiguously from the
|
|
57
|
+
lowest to highest occupied bin (monotonic source → splits / profile;
|
|
58
|
+
non-monotonic → histogram); `{ edges }` gives explicit ascending bins (e.g.
|
|
59
|
+
power zones). Reuses the reducer mapping + non-finite policy. Rows whose bin
|
|
60
|
+
value is missing / non-finite (or, for `edges`, out of range) are dropped;
|
|
61
|
+
empty bins emit the reducer's empty value; a non-finite / wrong-kind reducer
|
|
62
|
+
result throws `ValidationError`. See `docs/notes/bycolumn-value-axis.md`.
|
|
24
63
|
|
|
25
64
|
### Changed
|
|
26
65
|
|
|
@@ -36,7 +75,7 @@ type-level changes; patch bumps are strictly additive.
|
|
|
36
75
|
- **Behavior note — `array` columns:** an identity-comparing reducer (`keep`,
|
|
37
76
|
or a custom reducer using `===` on the cell) on an `array`-kind source
|
|
38
77
|
column now compares the value stored in the column, not the original object
|
|
39
|
-
reference passed at construction. Two rows given the
|
|
78
|
+
reference passed at construction. Two rows given the _same_ array object
|
|
40
79
|
therefore read as distinct. Scalar columns (number / string / boolean) are
|
|
41
80
|
unaffected. A non-finite or wrong-kind reducer result is still rejected with
|
|
42
81
|
a `ValidationError`, exactly as the constructor's intake did.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pond-ts/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "React hooks for pond-ts live time series",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"test:runtime": "vitest run"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"pond-ts": "^0.
|
|
36
|
+
"pond-ts": "^0.28.0",
|
|
37
37
|
"react": "^18.0.0 || ^19.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|