goro-charts 1.2.0 → 1.3.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 +93 -44
- package/README.md +40 -16
- package/dist/charts/chart-base.d.ts +12 -11
- package/dist/data/series-store.d.ts +25 -2
- package/dist/goro-charts.js +134 -88
- package/dist/goro-charts.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +11 -0
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -9,5 +9,5 @@ export { LineChart } from './charts/line-chart.js';
|
|
|
9
9
|
export { AreaChart } from './charts/area-chart.js';
|
|
10
10
|
export { ScatterChart } from './charts/scatter-chart.js';
|
|
11
11
|
export { DARK, LIGHT } from './presets.js';
|
|
12
|
-
export type { ChartOpts, SeriesConfig } from './types.js';
|
|
12
|
+
export type { ChartOpts, SeriesConfig, DataOwnership } from './types.js';
|
|
13
13
|
export type { SeriesHit } from './render/crosshair.js';
|
package/dist/types.d.ts
CHANGED
|
@@ -7,6 +7,17 @@
|
|
|
7
7
|
* contract the renderers depend on instead of the concrete data store — it
|
|
8
8
|
* decouples `render/` from `data/` so either can change independently.
|
|
9
9
|
*/
|
|
10
|
+
/**
|
|
11
|
+
* Data-array ownership for snapshot mode (`setData`).
|
|
12
|
+
*
|
|
13
|
+
* - `'copy'` (default): the store copies the caller's arrays into fresh buffers;
|
|
14
|
+
* the caller may mutate the originals freely without affecting the chart.
|
|
15
|
+
* - `'borrowed'`: the store keeps the caller's arrays by reference — the caller
|
|
16
|
+
* **must** treat them as immutable for as long as the chart holds them. The
|
|
17
|
+
* arrays are read-only to the chart; mutating them externally leads to
|
|
18
|
+
* undefined behaviour.
|
|
19
|
+
*/
|
|
20
|
+
export type DataOwnership = 'copy' | 'borrowed';
|
|
10
21
|
/** Per-series visual configuration. */
|
|
11
22
|
export interface SeriesConfig {
|
|
12
23
|
/** Display name for legends and the crosshair tooltip. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "goro-charts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Minimal high-performance line and area chart engine. Canvas 2D, zero dependencies, framework-agnostic.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"preview:demo": "vite preview --config vite.demo.config.ts",
|
|
56
56
|
"prepublishOnly": "npm run build",
|
|
57
57
|
"fix:all": "eslint --fix . && prettier --write .",
|
|
58
|
+
"check:readme": "node scripts/check-readme.mjs",
|
|
58
59
|
"test": "vitest run",
|
|
59
60
|
"test:watch": "vitest",
|
|
60
61
|
"test:ui": "vitest --ui",
|