@pond-ts/react 0.60.0 → 0.61.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/API.md +1 -0
- package/CHANGELOG.md +43 -1
- package/package.json +2 -2
package/API.md
CHANGED
|
@@ -421,6 +421,7 @@ Series shapes (same file): `ChartSeries`, `BandSeries`, `BoxSeries`,
|
|
|
421
421
|
| `CandleVariant` / `ColorBy` | OHLC mark shape / colouring strategy | `packages/charts/src/ohlc.ts` |
|
|
422
422
|
| `AxisFormat` / `CursorFormat` | Tick and cursor-readout formatting (d3 specifier or fn) | `packages/charts/src/format.ts` |
|
|
423
423
|
| `AxisTransform` | Monotonic `to`/`from` pair for derived-unit x-axis relabeling | `packages/charts/src/derivedTicks.ts` |
|
|
424
|
+
| `AxisMouseEvent` / `AxisMouseHandler` | Axis `onMouseEvent` payload — the mouse event, the axis's `id`, and the value/label under the pointer | `packages/charts/src/axis-events.ts` |
|
|
424
425
|
| `Orientation` | Bar growth direction | `packages/charts/src/bars.ts` |
|
|
425
426
|
|
|
426
427
|
---
|
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,8 @@ 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.61.0...HEAD
|
|
12
|
+
[0.61.0]: https://github.com/pond-ts/pond/compare/v0.60.0...v0.61.0
|
|
12
13
|
[0.60.0]: https://github.com/pond-ts/pond/compare/v0.59.0...v0.60.0
|
|
13
14
|
[0.59.0]: https://github.com/pond-ts/pond/compare/v0.58.0...v0.59.0
|
|
14
15
|
[0.58.0]: https://github.com/pond-ts/pond/compare/v0.57.0...v0.58.0
|
|
@@ -63,6 +64,47 @@ include new features and type-level changes; patch bumps are strictly additive.
|
|
|
63
64
|
|
|
64
65
|
## [Unreleased]
|
|
65
66
|
|
|
67
|
+
## [0.61.0] — 2026-08-16
|
|
68
|
+
|
|
69
|
+
### Added
|
|
70
|
+
|
|
71
|
+
- `@pond-ts/charts`: **`onMouseEvent` on `<XAxis>` and `<YAxis>`** — mouse
|
|
72
|
+
events on an axis strip, carrying the **axis value under the pointer** (the
|
|
73
|
+
part a consumer can't compute, since the scale lives inside the container).
|
|
74
|
+
One handler takes every mouse event on the strip (`click`, `dblclick`,
|
|
75
|
+
`contextmenu`, `mousedown`/`mouseup`, `mousemove`, `mouseenter`/`mouseleave`)
|
|
76
|
+
— switch on `event.type`. The payload (`AxisMouseEvent`, exported) carries
|
|
77
|
+
the raw React event, `axis: 'x' | 'y'`, the axis's `id` (a `<YAxis>` has one;
|
|
78
|
+
an `<XAxis>` does not), the inverted `value`, and the `label` that axis would
|
|
79
|
+
print there — the **category name** on a category axis, whose scale inverts
|
|
80
|
+
to the nearest band centre. Nothing is attached when the prop is omitted, so
|
|
81
|
+
an axis that doesn't opt in pays nothing for the move events. Axis strips now
|
|
82
|
+
also carry `data-axis="x"` / `data-axis="y"` + `data-axis-id` hooks, so a
|
|
83
|
+
consumer can style one (`[data-axis='x'] { cursor: pointer }`) despite the
|
|
84
|
+
axes taking no `className`.
|
|
85
|
+
|
|
86
|
+
### Fixed
|
|
87
|
+
|
|
88
|
+
- `@pond-ts/charts`: the category x-axis label fit now **measures** rendered
|
|
89
|
+
label widths (offscreen-canvas `measureText` in the axis font, with a
|
|
90
|
+
per-glyph estimate fallback for SSR/test DOMs) instead of estimating by
|
|
91
|
+
character count — labels wider than their band (e.g. `SYMBOL-VENUE-TYPE`
|
|
92
|
+
keys) no longer overprint into a smear. The fit measures against the scale's
|
|
93
|
+
real band pitch (so a `maxBandWidth`-packed axis thins correctly), keeps a
|
|
94
|
+
minimum clear gap between drawn labels, truncates from the **middle**
|
|
95
|
+
(`EDGE01…EQT`) so a shared prefix or a shared tail stays distinguishable,
|
|
96
|
+
and draws **no** labels at a degenerate (collapsed / pre-layout) width
|
|
97
|
+
rather than overprinting every label at x ≈ 0. Filed from the SPARC
|
|
98
|
+
migration ([PND-CATFIT]).
|
|
99
|
+
|
|
100
|
+
**Heads-up on a deliberate visual change:** an axis whose labels previously
|
|
101
|
+
packed edge-to-edge at a borderline pitch (label within a couple of px of
|
|
102
|
+
its band) now **thins to every 2nd label** instead — clear separation
|
|
103
|
+
outranks per-band labelling at the margin. On a dense dashboard axis this
|
|
104
|
+
can read as "half the labels disappeared"; it is the fit working as
|
|
105
|
+
intended, not data loss — every band still draws its mark, and the cursor
|
|
106
|
+
readout still names every category.
|
|
107
|
+
|
|
66
108
|
## [0.60.0] — 2026-08-13
|
|
67
109
|
|
|
68
110
|
### Added
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pond-ts/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.61.0",
|
|
4
4
|
"description": "React hooks for pond-ts live time series",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"test:runtime": "vitest run"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"pond-ts": "^0.
|
|
37
|
+
"pond-ts": "^0.61.0",
|
|
38
38
|
"react": "^18.0.0 || ^19.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|