ggaction 0.0.15 → 0.0.16
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 +68 -0
- package/README.md +22 -2
- package/knowledge/action-cards.json +1 -1
- package/knowledge/intent-taxonomy.json +1 -1
- package/knowledge/mcp-resources.json +1 -1
- package/knowledge/task-packet.schema.json +1 -1
- package/knowledge/task-resolver.js +1 -1
- package/package.json +33 -6
- package/src/BasicChartProgram.js +3 -1
- package/src/ChartProgram.js +2 -0
- package/src/accessibility.js +157 -0
- package/src/actions/boxPlots/components.js +6 -8
- package/src/actions/boxPlots/create.js +4 -5
- package/src/actions/boxPlots/edit.js +3 -4
- package/src/actions/boxPlots/materialize.js +1 -1
- package/src/actions/canvas/actions.js +3 -3
- package/src/actions/canvas/fitting.js +1 -1
- package/src/actions/categoryOrder/index.js +6 -8
- package/src/actions/charts/area.js +1 -1
- package/src/actions/charts/bar.js +1 -1
- package/src/actions/charts/beeswarm.js +1 -1
- package/src/actions/charts/density.js +1 -1
- package/src/actions/charts/ecdf.js +2 -2
- package/src/actions/charts/endpoints.js +4 -4
- package/src/actions/charts/heatmap.js +1 -1
- package/src/actions/charts/histogram.js +1 -1
- package/src/actions/charts/horizon.js +1 -1
- package/src/actions/charts/interval-regression.js +2 -2
- package/src/actions/charts/line.js +1 -1
- package/src/actions/charts/parallel.js +1 -1
- package/src/actions/charts/pie.js +1 -1
- package/src/actions/charts/polar.js +2 -2
- package/src/actions/charts/radar.js +1 -1
- package/src/actions/charts/radial.js +2 -2
- package/src/actions/charts/raincloud.js +2 -2
- package/src/actions/charts/rug-strip.js +2 -2
- package/src/actions/charts/scatter.js +1 -1
- package/src/actions/composition/actions.js +20 -24
- package/src/actions/coordinates/actions.js +1 -1
- package/src/actions/coordinates/edit.js +1 -1
- package/src/actions/data/basicBin2d.js +4 -5
- package/src/actions/data/bin.js +2 -2
- package/src/actions/data/bin2d.js +6 -8
- package/src/actions/data/bin2dMaterialize.js +4 -5
- package/src/actions/data/box.js +4 -4
- package/src/actions/data/complete.js +2 -2
- package/src/actions/data/computed.js +2 -2
- package/src/actions/data/create.js +5 -12
- package/src/actions/data/density.js +3 -3
- package/src/actions/data/derived.js +10 -14
- package/src/actions/data/ecdf.js +2 -2
- package/src/actions/data/edit.js +35 -23
- package/src/actions/data/filter.js +14 -20
- package/src/actions/data/fold.js +2 -2
- package/src/actions/data/gradientProfile.js +2 -2
- package/src/actions/data/horizon.js +2 -2
- package/src/actions/data/impute.js +2 -2
- package/src/actions/data/index.js +55 -54
- package/src/actions/data/interval.js +2 -2
- package/src/actions/data/intervalEdit.js +26 -18
- package/src/actions/data/normalize.js +2 -2
- package/src/actions/data/regression.js +5 -6
- package/src/actions/data/revise.js +48 -0
- package/src/actions/data/revisionBindings.js +13 -33
- package/src/actions/data/stack.js +2 -2
- package/src/actions/data/summary.js +2 -2
- package/src/actions/data/timeUnit.js +2 -2
- package/src/actions/data/window.js +2 -2
- package/src/actions/encodings/angle.js +1 -1
- package/src/actions/encodings/appearance.js +4 -4
- package/src/actions/encodings/barWidth.js +1 -1
- package/src/actions/encodings/channels.js +2 -2
- package/src/actions/encodings/color/index.js +1 -1
- package/src/actions/encodings/density.js +2 -2
- package/src/actions/encodings/histogram.js +1 -1
- package/src/actions/encodings/horizon.js +6 -8
- package/src/actions/encodings/offset.js +2 -2
- package/src/actions/encodings/parallel.js +4 -5
- package/src/actions/encodings/pathOrder.js +6 -11
- package/src/actions/encodings/position/index.js +4 -4
- package/src/actions/encodings/ranged.js +5 -5
- package/src/actions/encodings/remove.js +4 -5
- package/src/actions/encodings/ruleAppearance.js +1 -1
- package/src/actions/encodings/seriesLayout.js +1 -1
- package/src/actions/encodings/stroke.js +1 -1
- package/src/actions/encodings/strokeDash.js +2 -2
- package/src/actions/encodings/text.js +1 -1
- package/src/actions/errorBands/create.js +11 -17
- package/src/actions/errorBands/edit.js +13 -131
- package/src/actions/errorBars/create.js +8 -13
- package/src/actions/errorBars/edit.js +10 -121
- package/src/actions/facets/actions.js +30 -16
- package/src/actions/facets/derive.js +8 -2
- package/src/actions/facets/guides.js +4 -5
- package/src/actions/facets/replay.js +4 -5
- package/src/actions/gradientPlots/components.js +5 -6
- package/src/actions/gradientPlots/create.js +4 -5
- package/src/actions/gradientPlots/edit.js +4 -5
- package/src/actions/gradientPlots/materialize.js +2 -2
- package/src/actions/gradientPlots/rebind.js +4 -5
- package/src/actions/guides/axes/axes.js +23 -4
- package/src/actions/guides/axes/axis.js +2 -2
- package/src/actions/guides/axes/edit.js +2 -2
- package/src/actions/guides/axes/labels.js +9 -9
- package/src/actions/guides/axes/lines.js +9 -7
- package/src/actions/guides/axes/parallel/lifecycle.js +13 -13
- package/src/actions/guides/axes/parallel.js +5 -5
- package/src/actions/guides/axes/remove.js +4 -4
- package/src/actions/guides/axes/tickGroups.js +4 -4
- package/src/actions/guides/axes/ticks.js +13 -4
- package/src/actions/guides/axes/titles.js +10 -10
- package/src/actions/guides/grids/grid.js +18 -29
- package/src/actions/guides/guides.js +1 -1
- package/src/actions/guides/legends/blocks.js +1 -1
- package/src/actions/guides/legends/categorical/actions.js +4 -4
- package/src/actions/guides/legends/categorical/components.js +38 -33
- package/src/actions/guides/legends/categorical/layout.js +1 -1
- package/src/actions/guides/legends/categorical/symbols.js +27 -30
- package/src/actions/guides/legends/continuous/common.js +46 -8
- package/src/actions/guides/legends/continuous/gradient.js +89 -155
- package/src/actions/guides/legends/continuous/interval.js +13 -13
- package/src/actions/guides/legends/continuous/opacity.js +30 -79
- package/src/actions/guides/legends/continuous/stroke.js +22 -322
- package/src/actions/guides/legends/edit.js +1 -1
- package/src/actions/guides/legends/focused.js +5 -5
- package/src/actions/guides/legends/lane.js +6 -6
- package/src/actions/guides/legends/remove.js +4 -5
- package/src/actions/guides/legends/size.js +21 -82
- package/src/actions/guides/legends/strokeWidth.js +17 -77
- package/src/actions/guides/polar/axes/facade.js +4 -4
- package/src/actions/guides/polar/axes/labels.js +5 -5
- package/src/actions/guides/polar/axes/lines.js +9 -15
- package/src/actions/guides/polar/axes/ticks.js +9 -15
- package/src/actions/guides/polar/axes/titles.js +5 -5
- package/src/actions/guides/polar/grids.js +11 -13
- package/src/actions/index.js +2 -0
- package/src/actions/intervals/revision.js +126 -0
- package/src/actions/marks/arc/actions.js +3 -3
- package/src/actions/marks/area/actions.js +4 -4
- package/src/actions/marks/bar/create.js +1 -1
- package/src/actions/marks/bar/edit.js +1 -1
- package/src/actions/marks/bar/materialize.js +12 -38
- package/src/actions/marks/line/actions.js +3 -3
- package/src/actions/marks/point/create.js +1 -1
- package/src/actions/marks/point/edit.js +1 -1
- package/src/actions/marks/point/jitter.js +6 -8
- package/src/actions/marks/point/materialize.js +16 -24
- package/src/actions/marks/point/packing.js +6 -8
- package/src/actions/marks/rect/actions.js +3 -3
- package/src/actions/marks/references.js +8 -10
- package/src/actions/marks/remove.js +5 -49
- package/src/actions/marks/rule/actions.js +4 -4
- package/src/actions/marks/text/actions.js +5 -5
- package/src/actions/marks/text/layout.js +12 -20
- package/src/actions/marks/text/removal.js +1 -1
- package/src/actions/marks/text/selection.js +4 -5
- package/src/actions/marks/tick/actions.js +3 -3
- package/src/actions/primitives/createGraphics.js +5 -4
- package/src/actions/primitives/editGraphics.js +5 -4
- package/src/actions/primitives/graphicProperties.js +6 -0
- package/src/actions/primitives/semantic.js +10 -3
- package/src/actions/primitives/semanticAction.js +7 -4
- package/src/actions/primitives/semanticValidation/dataset.js +2 -4
- package/src/actions/regression/components.js +10 -14
- package/src/actions/regression/create.js +3 -4
- package/src/actions/regression/edit.js +3 -4
- package/src/actions/resources/remove.js +12 -11
- package/src/actions/scales/create.js +1 -1
- package/src/actions/scales/edit.js +1 -1
- package/src/actions/scales/materialize.js +1 -1
- package/src/actions/scales/offset.js +2 -2
- package/src/actions/scales/parallel.js +1 -1
- package/src/actions/scales/quantitativeColor.js +4 -5
- package/src/actions/selection/actions.js +25 -36
- package/src/actions/textMetrics/index.js +56 -0
- package/src/actions/theme/actions.js +2 -2
- package/src/actions/theme/reconcile.js +65 -121
- package/src/actions/titles/actions.js +8 -8
- package/src/actions/titles/resolve.js +3 -3
- package/src/actions/violinPlots/create.js +1 -1
- package/src/actions/violinPlots/edit.js +1 -1
- package/src/core/action.js +107 -35
- package/src/core/diagnostics.js +16 -0
- package/src/core/extensionRegistry.js +27 -0
- package/src/core/font.js +18 -0
- package/src/core/identifiers.js +5 -4
- package/src/core/immutable.js +10 -3
- package/src/core/optionRequirements.js +8 -0
- package/src/core/programState.js +1 -1
- package/src/core/resourceReferences.js +15 -6
- package/src/core/textMetricProfile.js +28 -0
- package/src/core/textMetrics.js +24 -3
- package/src/core/validation.js +22 -10
- package/src/diagnostics.js +1 -0
- package/src/grammar/impute.js +3 -2
- package/src/grammar/scales/types.js +8 -0
- package/src/grammar/schemas/graphicBounds.js +11 -11
- package/src/layout/labels.js +11 -10
- package/src/layout/legend.js +4 -4
- package/src/layout/legendItems.js +6 -6
- package/src/layout/text.js +10 -9
- package/src/layout/title.js +9 -9
- package/src/materialization/facetGuides/placement.js +1 -1
- package/src/materialization/facetGuides/preparation.js +1 -1
- package/src/materialization/facetHeaders.js +11 -10
- package/src/materialization/guides/layout.js +3 -3
- package/src/materialization/scaleGuideDependencies.js +10 -0
- package/src/materialization/selection/items/common.js +1 -1
- package/src/materialization/text.js +2 -2
- package/src/materialization/typography.js +31 -0
- package/src/mcp/cli.js +5 -3
- package/src/persistence/codec.js +65 -0
- package/src/persistence/validation.js +185 -0
- package/src/persistence.js +74 -0
- package/src/renderers/canvas/index.js +5 -4
- package/src/renderers/nativeBackend.js +10 -0
- package/src/renderers/options.js +13 -0
- package/src/renderers/pdf.js +25 -54
- package/src/renderers/png.js +22 -17
- package/src/renderers/svg.js +10 -14
- package/src/renderers/text.js +1 -11
- package/src/selectors/coordinates.js +3 -1
- package/src/selectors/datasets.js +8 -6
- package/src/selectors/layers.js +6 -4
- package/src/selectors/markOwners.js +46 -0
- package/src/selectors/scales.js +6 -4
- package/src/theme/defaults.js +2 -1
- package/src/version.js +2 -0
- package/types/accessibility.d.ts +37 -0
- package/types/basic.d.ts +4 -2
- package/types/diagnostics.d.ts +15 -0
- package/types/index.d.ts +5 -0
- package/types/pdf.d.ts +9 -0
- package/types/persistence.d.ts +7 -0
- package/types/png.d.ts +9 -0
- package/types/program.d.ts +34 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,74 @@ All notable changes to `ggaction` are recorded in this file.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## [0.0.16] - 2026-09-14
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Added `reviseData` for immutable original-data revisions that update dependent
|
|
12
|
+
transforms, chart owners, scales, guides, labels, selections, and retained facets.
|
|
13
|
+
- Added `applyTextMetrics` and `removeTextMetrics` for host-measured text layout
|
|
14
|
+
with immutable exact-font profiles, deterministic fallback, composition
|
|
15
|
+
propagation, and wrapped typography rematerialization.
|
|
16
|
+
- Added browser-safe `ggaction/persistence` with versioned editable-program and
|
|
17
|
+
graphic-only snapshots, tagged value preservation, and strict restoration.
|
|
18
|
+
- Added browser-safe `ggaction/accessibility` with immutable final visual data,
|
|
19
|
+
component roles, aggregate/bin/interval values, series, and composition hierarchy.
|
|
20
|
+
- Added `ggaction/diagnostics` to read structured error codes and resource details
|
|
21
|
+
while preserving the original Error, TypeError, or RangeError identity.
|
|
22
|
+
- Added `renderToPNGBuffer` and `renderToPDFBuffer` for Node memory output.
|
|
23
|
+
PNG encoding is asynchronous; Canvas drawing remains synchronous.
|
|
24
|
+
- Added `release:prepare` for reviewable version, changelog, release-contract,
|
|
25
|
+
provenance, and generated-documentation updates without publishing side effects.
|
|
26
|
+
- Added reproducible runtime benchmarks, exhaustive direct-action negative-input
|
|
27
|
+
contracts, semantic authoring evaluations, and cross-platform/browser checks.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- **Installation:** Node rendering and MCP dependencies are now optional peers.
|
|
32
|
+
Canvas/SVG users can install only `ggaction`. Node PNG/PDF users must also install
|
|
33
|
+
`@napi-rs/canvas`; MCP users must also install `@modelcontextprotocol/sdk`.
|
|
34
|
+
Missing backends report the required install command and never auto-install.
|
|
35
|
+
- MCP task packets now use schema version 5. Required options are separate from
|
|
36
|
+
example/configured options, exact calls preserve explicit user choices, and
|
|
37
|
+
unresolved request fragments remain visible. Consumers must check packet versions.
|
|
38
|
+
- Reused owned immutable subtrees, avoided unrelated theme traversal, shared
|
|
39
|
+
persistent trace tails, and cached immutable SVG resource hashes. Mutable
|
|
40
|
+
renderer inputs still recompute their hashes.
|
|
41
|
+
- Reduced Basic browser bundle size through built-in factory tree shaking and
|
|
42
|
+
shared validation/materialization code. Existing browser gzip limits remain.
|
|
43
|
+
- Release verification now distributes one canonical candidate artifact across
|
|
44
|
+
independent source, coverage, package, documentation, platform, browser, and
|
|
45
|
+
weighted realistic-test jobs, then requires a strict successful aggregate.
|
|
46
|
+
- Added a strict realistic-test aggregate check and bounded failure evidence for
|
|
47
|
+
test logs, render differences, and browser screenshots. Verification errors
|
|
48
|
+
retain their original failing status.
|
|
49
|
+
- Consolidated architecture prose around ownership and state flow, with exact
|
|
50
|
+
action behavior linked to current contracts and shared metadata owners.
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
|
|
54
|
+
- Rejected callable, mutable class-instance, cyclic, and sparse source inputs
|
|
55
|
+
before they could escape immutable ownership or fail during materialization.
|
|
56
|
+
TypeScript source-row declarations now match the runtime data boundary.
|
|
57
|
+
- Rejected unknown options consistently in extension primitives and renderers,
|
|
58
|
+
including PNG, and validated axis coordinate/channel assertions before changes.
|
|
59
|
+
- Corrected padding units for focused scale editors using one canonical registry.
|
|
60
|
+
- Corrected MCP required-option inference, explicit style/scale choices, derived
|
|
61
|
+
owner references, and false-completion reporting for partially understood tasks.
|
|
62
|
+
- Preserved nested facet trace closure and prototype-named keys during snapshot
|
|
63
|
+
round trips, and distinguished live dependencies from reserved optional IDs.
|
|
64
|
+
- Distinguished data and mark identity when revising statistical-reference inputs.
|
|
65
|
+
Inferred grids now follow explicit tick changes without disrupting orientation
|
|
66
|
+
changes that must rematerialize guides in dependency order.
|
|
67
|
+
- Applied the same interval-statistics merge during simultaneous role edits,
|
|
68
|
+
clearing inherited confidence-interval parameters when changing extent.
|
|
69
|
+
- Reused the exact release artifact in installed-package consumers instead of
|
|
70
|
+
silently repacking it, and made development npm/TypeScript invocation portable
|
|
71
|
+
across supported operating systems.
|
|
72
|
+
- Bounded long CSV description memory in realistic test fixtures and synchronized
|
|
73
|
+
their direct action coverage and coordinate options with current contracts.
|
|
74
|
+
|
|
7
75
|
## [0.0.15] - 2026-09-14
|
|
8
76
|
|
|
9
77
|
### Added
|
package/README.md
CHANGED
|
@@ -89,6 +89,10 @@ Install the current public release:
|
|
|
89
89
|
npm install ggaction
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
+
For Node PNG/PDF output, also install `@napi-rs/canvas`. For the MCP server,
|
|
93
|
+
also install `@modelcontextprotocol/sdk`. These are optional peer dependencies;
|
|
94
|
+
browser Canvas/SVG users do not need either package.
|
|
95
|
+
|
|
92
96
|
Add the Canvas element that the rendering code targets. Its accessible name and
|
|
93
97
|
fallback text summarize the chart for contexts where Canvas pixels are not
|
|
94
98
|
available:
|
|
@@ -211,11 +215,14 @@ The package is ESM-only and requires Node.js 20 or later.
|
|
|
211
215
|
| `ggaction/extension` | Author and register wrapped actions with public low-level primitives |
|
|
212
216
|
| `ggaction/png` | Render a completed program to a PNG file in Node.js |
|
|
213
217
|
| `ggaction/pdf` | Render a completed program to a single-page vector PDF file in Node.js |
|
|
218
|
+
| `ggaction/persistence` | Save and restore editable programs or graphic snapshots in Browser or Node |
|
|
219
|
+
| `ggaction/accessibility` | Export final visual data for host-provided accessible tables and descriptions |
|
|
220
|
+
| `ggaction/diagnostics` | Read structured error codes and resource details in Browser or Node |
|
|
214
221
|
| `ggaction/svg` | Serialize a completed program to browser-safe SVG |
|
|
215
222
|
| `ggaction-mcp` | Run the local read-only MCP authoring server over stdio in Node.js |
|
|
216
223
|
|
|
217
224
|
All module entries include TypeScript declarations. The default, basic,
|
|
218
|
-
extension, and SVG entries are browser-safe; the PNG and PDF adapters are
|
|
225
|
+
extension, diagnostics, accessibility, and SVG entries are browser-safe; the PNG and PDF adapters are
|
|
219
226
|
Node-only.
|
|
220
227
|
|
|
221
228
|
The installed package also includes the Node-only `ggaction-mcp` executable. It
|
|
@@ -240,7 +247,7 @@ the extra discussion required before public API or architecture changes.
|
|
|
240
247
|
|
|
241
248
|
## Status and development
|
|
242
249
|
|
|
243
|
-
> **Status:** `0.0.
|
|
250
|
+
> **Status:** `0.0.16` is the current experimental public release. APIs may change before `1.0.0`; changes are recorded in the [changelog](./CHANGELOG.md).
|
|
244
251
|
|
|
245
252
|
```bash
|
|
246
253
|
npm install
|
|
@@ -253,3 +260,16 @@ npm run test:docs
|
|
|
253
260
|
## Related Links
|
|
254
261
|
|
|
255
262
|
- Action-trace demo: [Link](https://ggactionbot.github.io/action-trace-demo/)
|
|
263
|
+
|
|
264
|
+
### Prepare a release
|
|
265
|
+
|
|
266
|
+
Record changes under `Unreleased` in `CHANGELOG.md` and commit the reviewed work.
|
|
267
|
+
Run `npm run release:prepare -- 0.0.16 --dry-run` to preview version updates.
|
|
268
|
+
Omit `--dry-run` to update versions, promote notes, and generate the release
|
|
269
|
+
contract, documentation, and local notes. Review the Git diff. After committing
|
|
270
|
+
runtime changes, rerun the command to refresh source provenance; existing notes
|
|
271
|
+
and their date are preserved.
|
|
272
|
+
|
|
273
|
+
Preparation does not commit, push, tag, publish, or deploy. Integration and required
|
|
274
|
+
PR checks precede an annotated tag. The protected workflow verifies and publishes
|
|
275
|
+
one candidate from that tag. Generation failures leave an unfinished diff to review.
|