@pond-ts/react 0.40.0 → 0.42.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +103 -6
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -3,12 +3,14 @@
3
3
  All notable changes to this project are documented here.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
- The `@pond-ts` packages — `pond-ts`, `@pond-ts/react`, `@pond-ts/charts`, and
7
- `@pond-ts/fit` — release together under a single `v*` tag, so this file covers
8
- them all. Pre-1.0: minor bumps may include new features and type-level changes;
9
- patch bumps are strictly additive.
10
-
11
- [Unreleased]: https://github.com/pjm17971/pond-ts/compare/v0.40.0...HEAD
6
+ The `@pond-ts` packages — `pond-ts`, `@pond-ts/react`, `@pond-ts/charts`,
7
+ `@pond-ts/fit`, and `@pond-ts/financial` — release together under a single `v*`
8
+ tag, so this file covers them all. Pre-1.0: minor bumps may include new features
9
+ and type-level changes; patch bumps are strictly additive.
10
+
11
+ [Unreleased]: https://github.com/pjm17971/pond-ts/compare/v0.42.0...HEAD
12
+ [0.42.0]: https://github.com/pjm17971/pond-ts/compare/v0.41.0...v0.42.0
13
+ [0.41.0]: https://github.com/pjm17971/pond-ts/compare/v0.40.0...v0.41.0
12
14
  [0.40.0]: https://github.com/pjm17971/pond-ts/compare/v0.39.0...v0.40.0
13
15
  [0.39.0]: https://github.com/pjm17971/pond-ts/compare/v0.38.0...v0.39.0
14
16
  [0.38.0]: https://github.com/pjm17971/pond-ts/compare/v0.37.0...v0.38.0
@@ -38,6 +40,101 @@ patch bumps are strictly additive.
38
40
 
39
41
  ## [Unreleased]
40
42
 
43
+ ## [0.42.0] — 2026-07-10
44
+
45
+ The **trading-calendar** release: a new `@pond-ts/financial` package (its first
46
+ publish) and a discontinuous **trading-time x axis** in `@pond-ts/charts` that
47
+ collapses closed-market time (weekends, holidays, overnight, lunch breaks).
48
+
49
+ ### Added
50
+
51
+ - **`@pond-ts/financial` — new package (first release).** A calendar/analytics
52
+ layer on `pond-ts` (peer dep; ESM, no React; `@js-temporal/polyfill` for
53
+ DST-correct session generation):
54
+ - **`TradingCalendar`** — `fromSessions` (explicit schedule) and `fromRules`
55
+ (weekmask / holidays / early-closes / breaks, DST-correct via Temporal);
56
+ query surface (`sessionOn`, `sessionContaining`, `isOpen`, `sessionsInRange`,
57
+ `nextSession`, `previousSession`).
58
+ - **Bucketing seam** — `sessionSequence()` / `barSequence(period)` return a
59
+ `BoundedSequence` that flows straight through `aggregate` / `materialize`,
60
+ so every bucket is a real trading session/bar (no weekend/holiday buckets,
61
+ no bucket spanning a closure). Zero core edits.
62
+ - **`tagSessions(series, { column?, stamped? })`** — appends a session-id
63
+ column (`number | undefined`) for `partitionBy` so stateful ops don't bridge
64
+ a session boundary. `stamped: 'close'` bins a bar stamped at its close into
65
+ the closing session (`(open, close]`) for OHLC feeds.
66
+ - **`DiscontinuityProvider`** — the d3fc-style 5-method provider
67
+ (`clampUp`/`clampDown`/`distance`/`offset`/`copy` + optional `boundaries`);
68
+ `identityDiscontinuity`, `weekendSkip` (bundled reference), and
69
+ `segmentDiscontinuity(segments, { spacing })`.
70
+ - **`TradingCalendar.discontinuities({ range?, spacing?, period? })`** — the
71
+ chart-ready provider; `spacing: 'proportional'` (default, true-time) or
72
+ `'uniform'` (equal-width per session/bar, the TradingView ordinal look).
73
+ - **`@pond-ts/charts`: trading-time x axis.** Pass a `@pond-ts/financial`
74
+ provider (structurally — charts never imports that package) to collapse
75
+ closed-market gaps:
76
+ - **`ChartContainer` `discontinuities` prop** (low-level) and **`calendar` +
77
+ `spacing` props** (high-level sugar; `calendar` is a structural
78
+ `TradingCalendarLike`, `spacing` defaults to proportional).
79
+ - **`scaleTradingTime`** — a d3-scale-shaped discontinuous time scale; ticks
80
+ coarsen to a **calendar grain** (week/month/quarter/year starts) with
81
+ date/year labels, and **session dividers** draw at the collapse points
82
+ (`theme.axis.sessionDivider`), aligned with the labels.
83
+ - `Charts/TradingTimeAxis` stories (weekend/holiday/half-day/intraday,
84
+ continuous-vs-trading, daily-months, proportional-vs-uniform).
85
+ - **`@pond-ts/charts`:** selection now has a stable series identity. `SelectInfo`
86
+ carries an `id`, and `BarChart` / `ScatterChart` take an optional `id` prop —
87
+ the series identity used for selection + hover. An `id` **gates interactivity**:
88
+ a layer is selectable/hoverable only when given one (a layer with no `id`
89
+ renders and reads out but can't be selected). A dev-warning fires when
90
+ `selected`/`onSelect` is wired but no layer carries an `id`. First slice of the
91
+ selection RFC (`docs/rfcs/selection.md`, Amendments 2–3).
92
+ - **`pond-ts`: `bin(W, 'minMaxFirstLast')`** — the four-channel M4 downsampling
93
+ reducer (per-bin min/max/first/last, validity-aware, chunked-delegating); the
94
+ foundation for the charts decimator wave.
95
+ - **`pond-ts`: `binBy`** — key-domain bucketed reduction (the M4 gappy-data
96
+ decimation path).
97
+
98
+ ### Changed
99
+
100
+ - **BREAKING (`@pond-ts/charts`):** `SelectInfo` gained a required `id` field
101
+ (`{ id, key, value, color, label }`) — `id` is the selection identity, `key` /
102
+ `value` are now click provenance. Code that constructs a `SelectInfo` by hand
103
+ must add `id`, and selection equality/dedup now keys on `id`, not the sample
104
+ `begin`.
105
+ - **BREAKING (`@pond-ts/charts`):** `BarChart` / `ScatterChart` selection now
106
+ requires an explicit `id` prop — the previous implicit `as ?? column` selection
107
+ identity is gone. A selectable bar/scatter layer must add `id` (e.g.
108
+ `<BarChart series={s} column="v" id="v" />`); without it the layer is
109
+ display-only.
110
+
111
+ ## [0.41.0] — 2026-07-06
112
+
113
+ ### Added
114
+
115
+ - **`@pond-ts/charts`: `<Candlestick>` — a first-class OHLC mark** (Phase 1 of
116
+ the financial-charts RFC, Tidal-driven). `open`/`high`/`low`/`close` props
117
+ default to the conventional names (`<Candlestick series={s} />` for a standard
118
+ OHLCV series); draws-only (body extents derived per-mark); **point- or
119
+ interval-keyed** so raw daily OHLCV feeds straight in (no `aggregate`), while a
120
+ weekly/monthly rollup is the identical call. `variant: 'candle' | 'bar' |
121
+ 'hollow'`, `colorBy: 'direction' | 'series'`, `gap`, and `showOHLC` (four-pill
122
+ O/H/L/C hover readout; default is a single `close` pill keyed on `as`).
123
+ Participates in the crosshair x-snap (unlike `BoxPlot`). Supersedes `BoxPlot
124
+ shape='solid'` for OHLC data.
125
+ - **`@pond-ts/charts`: `ohlcFromTimeSeries`** + the `OhlcSeries` / `OhlcColumns`
126
+ types — read four price columns into a chart-ready columnar view (exported
127
+ alongside the existing `*FromTimeSeries` builders).
128
+
129
+ ### Changed
130
+
131
+ - **`@pond-ts/charts`: `ChartTheme` gains a required `candle` slot** (a
132
+ `CandleStyle`: `rising`/`falling`/`neutral` body+wick pairs, `bodyWidth`,
133
+ `wickWidth`). `defaultTheme` and `estelaTheme` ship neutral, **unbranded**
134
+ up/down pairs — market green/red is a `cssVarTheme` overlay, not a library
135
+ default. **Breaking (type-level):** a hand-built `ChartTheme` that doesn't
136
+ derive from a shipped theme must add a `candle` slot to compile.
137
+
41
138
  ## [0.40.0] — 2026-07-05
42
139
 
43
140
  A **core + charts** release from the estela `DataChart`-port friction wave.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pond-ts/react",
3
- "version": "0.40.0",
3
+ "version": "0.42.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.40.0",
36
+ "pond-ts": "^0.42.0",
37
37
  "react": "^18.0.0 || ^19.0.0"
38
38
  },
39
39
  "devDependencies": {