What's Changed
chartgpu-react 0.3.0 — React bindings for @chartgpu/chartgpu ^0.3.6, with TypeScript 7 tooling, broader 0.3.x API coverage, CI, and expanded unit tests.
Breaking / install notes
• Peer dependency: @chartgpu/chartgpu ^0.3.6 (was ^0.2.8)
• Package publish name restored to chartgpu-react for npmjs.org (GitHub Packages may still use a scoped name at publish)
• Engines: Node ≥ 20
• React peer remains ≥ 18 (dev/tested on React 19.2)
ChartGPU 0.3.x API
• ChartGPUHandle.appendData accepts optional { maxPoints } for FIFO / fixed-capacity streaming
• ChartGPUHandle.setZoomRange forwards optional source for multi-chart zoom sync
• CartesianSeriesData allows null gaps (matches core)
• Expanded type re-exports (heatmap, band, errorBar, impulse, OHLC, 3D series, ZoomChangeSourceKind, and more)
• New export: ChartGPUAppendDataOptions
Reliability
• Fix create / first-setOption race on async init (options/theme mid-flight) — closes #16 (#16)
• useGPUContext StrictMode: shared in-flight init promise so remount reuses one adapter/device (no permanent stuck isReady)
Tooling — TypeScript 7
• TypeScript 7.0 (typescript ^7.0.2; was ^5.3.3)
• Vite 7, Vitest 4, @types/react 19
• Declarations via tsc -p tsconfig.build.json after the Vite ESM build
• vite-plugin-dts removed (incompatible with TypeScript 7’s slim package API)
Tests & CI
• Vitest + Testing Library unit suite (jsdom); mocks for @chartgpu/chartgpu / WebGPU stubs
• Coverage for handle forwarding (appendData / maxPoints, setZoomRange source, external render), useConnectCharts, useGPUContext, gpuContext create path, event props, export smoke
• GitHub Actions: typecheck + test + build on PR and push to main
Examples
• Redesigned demos to be aligned with ChartGPU’s visual system
• Streaming multi-chart demos use appendData(..., { maxPoints })
• Additional modern demos (including 3D)
- Update package dependencies, enhance ChartGPU functionality, and impr… by @hunterg325 in
- Release chartgpu-react 0.3.0 (ChartGPU 0.3.6 + TypeScript 7) by @hunterg325 in #18
Full Changelog: v0.1.4...v0.3.0