@pond-ts/react 0.55.0 → 0.56.2
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 +140 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,10 @@ The `@pond-ts` packages — `pond-ts`, `@pond-ts/react`, `@pond-ts/charts`,
|
|
|
8
8
|
under a single `v*` tag, so this file covers them all. Pre-1.0: minor bumps may
|
|
9
9
|
include new features and type-level changes; patch bumps are strictly additive.
|
|
10
10
|
|
|
11
|
-
[Unreleased]: https://github.com/pond-ts/pond/compare/v0.
|
|
11
|
+
[Unreleased]: https://github.com/pond-ts/pond/compare/v0.56.2...HEAD
|
|
12
|
+
[0.56.2]: https://github.com/pond-ts/pond/compare/v0.56.1...v0.56.2
|
|
13
|
+
[0.56.1]: https://github.com/pond-ts/pond/compare/v0.56.0...v0.56.1
|
|
14
|
+
[0.56.0]: https://github.com/pond-ts/pond/compare/v0.55.0...v0.56.0
|
|
12
15
|
[0.55.0]: https://github.com/pond-ts/pond/compare/v0.54.0...v0.55.0
|
|
13
16
|
[0.54.0]: https://github.com/pond-ts/pond/compare/v0.53.1...v0.54.0
|
|
14
17
|
[0.53.1]: https://github.com/pond-ts/pond/compare/v0.53.0...v0.53.1
|
|
@@ -56,6 +59,142 @@ include new features and type-level changes; patch bumps are strictly additive.
|
|
|
56
59
|
|
|
57
60
|
## [Unreleased]
|
|
58
61
|
|
|
62
|
+
## [0.56.2] — 2026-08-05
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
|
|
66
|
+
- **charts (tests only, no shipped change):** the log-axis rendered-label test
|
|
67
|
+
is no longer an exact-set assertion over every digit-bearing node in the
|
|
68
|
+
render tree. It passed on Node 22 and failed on CI's Node 18 with one extra
|
|
69
|
+
element, blocking the publish twice. The discrepancy is **unreproduced and
|
|
70
|
+
still open** — recorded as `[PND-LOGTICK-N18]` in `PND_CHARTS_PLAN.md` with
|
|
71
|
+
everything measured about it. The assertion now checks that every chosen tick
|
|
72
|
+
renders in order, which is the wiring this test exists to cover; the tick
|
|
73
|
+
_selection_ it was really about is pinned deterministically by the
|
|
74
|
+
`yTickValues` unit tests.
|
|
75
|
+
|
|
76
|
+
## [0.56.1] — 2026-08-05
|
|
77
|
+
|
|
78
|
+
### Fixed
|
|
79
|
+
|
|
80
|
+
- **charts (tests only, no shipped change):** a log-axis test asserted on
|
|
81
|
+
rendered label _text_, parsing numbers back out of the DOM to infer scale
|
|
82
|
+
behaviour. It passed locally and failed in CI on a value it could not have
|
|
83
|
+
produced there, which blocked the v0.56.0 publish. The root cause was never
|
|
84
|
+
reproduced; rather than guess at it, the assertion now compares the rendered
|
|
85
|
+
labels against the ticks the axis is specified to draw, formatted through the
|
|
86
|
+
same formatter — deterministic regardless of locale, formatting or DOM
|
|
87
|
+
differences, and the numeric guarantee itself was already pinned directly by
|
|
88
|
+
the `yTickValues` unit tests. The published artifact is identical to what
|
|
89
|
+
v0.56.0 would have been.
|
|
90
|
+
|
|
91
|
+
## [0.56.0] — 2026-08-05
|
|
92
|
+
|
|
93
|
+
### Added
|
|
94
|
+
|
|
95
|
+
- **charts:** **`<YAxis scale="log">` — a base-10 logarithmic y axis.** Every y
|
|
96
|
+
scale was `scaleLinear`, so data spanning orders of magnitude was
|
|
97
|
+
undrawable: on a linear axis everything below the top decade collapses onto
|
|
98
|
+
the baseline. Set `scale="log"` and the axis maps by ratio, ticking the
|
|
99
|
+
decades. `format` still formats the **value**, so a readout says `1.2 PB`
|
|
100
|
+
rather than its logarithm — the transform is in the scale, not in the data,
|
|
101
|
+
which is what keeps it transparent to every draw layer, annotation and
|
|
102
|
+
cursor readout.
|
|
103
|
+
|
|
104
|
+
A log domain cannot contain zero, and d3 maps a non-positive value to
|
|
105
|
+
**`NaN`** — a coordinate the canvas silently _drops_, which is why every
|
|
106
|
+
consequence below is about something failing invisibly rather than throwing.
|
|
107
|
+
So the axis is deliberate about it:
|
|
108
|
+
- **Domain policy matches the linear axis exactly.** Auto-fit takes the
|
|
109
|
+
smallest **positive** extent (one zero sample can't collapse the axis, and
|
|
110
|
+
a `BarChart` — whose extent always widens to include zero — can still share
|
|
111
|
+
it); a positive explicit `min`/`max` is honoured verbatim and never
|
|
112
|
+
discarded, with the _auto-fit_ side moving if the domain would otherwise
|
|
113
|
+
invert; a fully auto-fit domain is `.nice()`d out to whole powers of ten, so
|
|
114
|
+
the extremes get headroom instead of sitting clipped on the plot edge. A
|
|
115
|
+
non-positive bound has no position and is refused in favour of the data.
|
|
116
|
+
`pad` is applied multiplicatively, adding the same fraction of a decade at
|
|
117
|
+
both ends.
|
|
118
|
+
- **A value with no position on the axis renders as a gap.** Previously the
|
|
119
|
+
gap test was `Number.isFinite(value)`, and `0` is finite — so the coordinate
|
|
120
|
+
became `NaN`, the canvas dropped the path op without breaking the path, and
|
|
121
|
+
the two neighbours were joined by a straight line _over_ the missing data.
|
|
122
|
+
Lines, area fills and outlines, and band envelopes now all break there.
|
|
123
|
+
- **Layers that reach for a baseline rest on the axis floor.** `AreaChart`
|
|
124
|
+
resolves an out-of-domain `baseline` there (writing `baseline={0}` is
|
|
125
|
+
natural and correct on a linear axis), and a **stacked** bar layer starts
|
|
126
|
+
its first segment there — starting at zero made the bottom segment of every
|
|
127
|
+
stack both invisible and unhittable. Unchanged on a linear axis, where zero
|
|
128
|
+
clamped into the domain _is_ zero.
|
|
129
|
+
- **The dev-mode warning names only unambiguous mistakes**: a refused
|
|
130
|
+
`min`/`max`, negative data, or an axis with no positive data at all. It
|
|
131
|
+
deliberately says nothing about an extent of exactly `[0, hi]`, which a
|
|
132
|
+
line touching zero and a bar layer on strictly positive data both report
|
|
133
|
+
identically — warning there fired on _every_ bar chart on a log axis. It
|
|
134
|
+
warns once per distinct complaint rather than on every repaint.
|
|
135
|
+
|
|
136
|
+
- **charts:** **pan and zoom now yield whole-millisecond view ranges.** A
|
|
137
|
+
wheel-zoom derives its range from pixel positions through `xScale.invert()`,
|
|
138
|
+
so the result was fractional by construction — an ordinary scroll produced
|
|
139
|
+
`1.7e12 + 0.37`. The epoch millisecond is this model's atomic unit and
|
|
140
|
+
consumers are entitled to assume it; one did, and a calendar `cursorSequence`
|
|
141
|
+
threw on a plain scroll. `zoomRange` / `panRange` round both ends, and never
|
|
142
|
+
collapse a positive span to zero width in doing so. (Core's fractional-instant
|
|
143
|
+
fix covers the same crash from the other side; this closes the class.)
|
|
144
|
+
|
|
145
|
+
- **charts:** **`AreaStyle.flatFill` — stacked areas that read as slabs.** An
|
|
146
|
+
area's fill has always graded to transparent at the baseline, which is right
|
|
147
|
+
for the elevation form and wrong for a stack: every band showed the one
|
|
148
|
+
beneath it through the fade, so a stacked area was not really drawable. Set
|
|
149
|
+
`flatFill` and the fill is flat; omitted, the gradient is unchanged, so no
|
|
150
|
+
existing theme shifts. The docs theme's `seq1…seq8` area roles set it, since
|
|
151
|
+
stacking is what they exist for.
|
|
152
|
+
|
|
153
|
+
- **docs theme:** **a sequential ramp — `seq1…seq8` — for charts with more
|
|
154
|
+
series than the categorical set has hues.** `--pond-viz-1…5` were, and
|
|
155
|
+
remain, the categorical set; a chart needing more slots (an eight-source
|
|
156
|
+
stack, a wall of climate stripes) now steps **tonally** through the brand
|
|
157
|
+
teal instead of introducing competing hues. Eight steps, evenly spaced
|
|
158
|
+
(~ΔL\* 9 in CIELAB), defined for light and dark, each mode's ramp containing
|
|
159
|
+
that mode's `--pond-viz-1` exactly. Exposed as `line` / `area` / `bar` theme
|
|
160
|
+
roles on `docsTheme` (Storybook) and the docs site's `useSiteChartTheme`,
|
|
161
|
+
and as an array from the site's `useSequentialRamp()`. Dev-only: the ramp
|
|
162
|
+
lives in the `docs-theme.fixture.ts` Storybook fixture and the website's
|
|
163
|
+
CSS, both excluded from the published `@pond-ts/charts` build — the library
|
|
164
|
+
still ships no palette.
|
|
165
|
+
|
|
166
|
+
### Fixed
|
|
167
|
+
|
|
168
|
+
- **core:** **a fractional epoch millisecond no longer crashes calendar
|
|
169
|
+
math.** `Temporal.Instant` refuses a non-integer epoch ms outright
|
|
170
|
+
(`epoch milliseconds must be an integer`), and `toPlainDateStart` passed
|
|
171
|
+
whatever it was given straight through — so realizing a `Sequence.calendar`
|
|
172
|
+
over a fractional range threw, and in a React app the exception unmounted the
|
|
173
|
+
page. A fraction is not a caller error: a chart's wheel-zoom derives its view
|
|
174
|
+
range from pixel positions via `xScale.invert()`, so an ordinary scroll
|
|
175
|
+
produces `1.7e12 + 0.37`. The instant is now floored to the millisecond
|
|
176
|
+
containing it — the epoch millisecond is this model's atomic unit and
|
|
177
|
+
calendar boundaries are themselves whole milliseconds, so the bucket
|
|
178
|
+
containing `t` and the one containing `t + 0.37` are necessarily the same,
|
|
179
|
+
and integer inputs are untouched. (`Math.floor`, not `Math.trunc`: pre-1970
|
|
180
|
+
they disagree, and `-5.5` lies inside the millisecond spanning `[-6, -5)`.)
|
|
181
|
+
|
|
182
|
+
- **charts:** toggling **`<ChartContainer grid>`** now repaints immediately.
|
|
183
|
+
`Layers`' draw callback read `container.grid` but didn't depend on it, so
|
|
184
|
+
switching gridlines off changed nothing until an unrelated dependency moved —
|
|
185
|
+
in practice you had to pan or zoom a little to force the update. The same
|
|
186
|
+
omission covered `sessionDividers` and `xKind`.
|
|
187
|
+
|
|
188
|
+
- **charts:** the log axis's dev-mode warning no longer requires **node's
|
|
189
|
+
ambient types**. It was guarded by a bare `process.env.NODE_ENV`, which
|
|
190
|
+
typechecks only when a tool happens to resolve `@types/node` from a parent
|
|
191
|
+
`node_modules` — so `tsc` inside the package passed while running the _same_
|
|
192
|
+
tsconfig from a consumer's directory failed with `TS2591: Cannot find name
|
|
193
|
+
'process'`. That took out the docs site's TypeDoc step, and would equally hit
|
|
194
|
+
any consumer typechecking the package's sources. The guard now lives in
|
|
195
|
+
`src/dev.ts` behind a local declaration and a `typeof` check, so a browser
|
|
196
|
+
bundle with no `process` global doesn't throw at import either.
|
|
197
|
+
|
|
59
198
|
## [0.55.0] — 2026-08-04
|
|
60
199
|
|
|
61
200
|
### Added
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pond-ts/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.2",
|
|
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.56.2",
|
|
37
37
|
"react": "^18.0.0 || ^19.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|