ggaction 0.0.10 → 0.0.11

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.
Files changed (217) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/README.md +4 -3
  3. package/knowledge/action-card.schema.json +1 -0
  4. package/knowledge/action-cards.json +1 -10941
  5. package/knowledge/action-cards.schema.json +1 -0
  6. package/knowledge/intent-taxonomy.json +1 -183
  7. package/knowledge/intent-taxonomy.schema.json +1 -0
  8. package/knowledge/mcp-resources.json +1 -95
  9. package/knowledge/mcp-resources.schema.json +1 -0
  10. package/knowledge/task-packet.schema.json +1 -159
  11. package/knowledge/task-resolver.js +1 -1230
  12. package/package.json +18 -2
  13. package/src/actions/boxPlots/edit.js +45 -298
  14. package/src/actions/boxPlots/options.js +46 -77
  15. package/src/actions/boxPlots/resolve.js +1 -1
  16. package/src/actions/charts/bar.js +3 -0
  17. package/src/actions/charts/heatmap.js +73 -83
  18. package/src/actions/charts/index.js +1 -1
  19. package/src/actions/charts/parallel.js +35 -1
  20. package/src/actions/charts/shared.js +20 -0
  21. package/src/actions/composition/actions.js +46 -49
  22. package/src/actions/data/bin2d.js +105 -2
  23. package/src/actions/data/box.js +17 -17
  24. package/src/actions/data/density.js +42 -78
  25. package/src/actions/data/gradientProfile.js +22 -52
  26. package/src/actions/data/horizon.js +16 -41
  27. package/src/actions/data/index.js +10 -10
  28. package/src/actions/data/interval.js +16 -38
  29. package/src/actions/data/intervalEdit.js +55 -0
  30. package/src/actions/data/regression.js +7 -17
  31. package/src/actions/data/shared.js +47 -0
  32. package/src/actions/data/timeUnit.js +14 -38
  33. package/src/actions/data/window.js +14 -38
  34. package/src/actions/distributions/revision.js +154 -34
  35. package/src/actions/encodings/angle.js +9 -10
  36. package/src/actions/encodings/appearance.js +17 -51
  37. package/src/actions/encodings/density/resolve.js +3 -1
  38. package/src/actions/encodings/density.js +1 -15
  39. package/src/actions/encodings/horizon/resolve.js +13 -3
  40. package/src/actions/encodings/horizon.js +8 -7
  41. package/src/actions/encodings/index.js +9 -9
  42. package/src/actions/encodings/offset.js +8 -24
  43. package/src/actions/encodings/parallel.js +9 -10
  44. package/src/actions/encodings/pathOrder.js +6 -13
  45. package/src/actions/encodings/position/policies/index.js +4 -4
  46. package/src/actions/encodings/position/policies/line.js +47 -17
  47. package/src/actions/encodings/position/resolve.js +24 -5
  48. package/src/actions/encodings/ranged.js +18 -23
  49. package/src/actions/encodings/remove.js +15 -25
  50. package/src/actions/encodings/ruleAppearance.js +9 -24
  51. package/src/actions/encodings/shared.js +37 -0
  52. package/src/actions/encodings/strokeDash.js +8 -23
  53. package/src/actions/encodings/text.js +9 -10
  54. package/src/actions/errorBands/create.js +105 -39
  55. package/src/actions/errorBands/edit.js +89 -93
  56. package/src/actions/errorBands/index.js +1 -2
  57. package/src/actions/errorBars/create.js +78 -27
  58. package/src/actions/errorBars/edit.js +81 -48
  59. package/src/actions/errorBars/index.js +1 -2
  60. package/src/actions/facets/actions.js +45 -69
  61. package/src/actions/facets/derive.js +38 -53
  62. package/src/actions/facets/replay.js +0 -1
  63. package/src/actions/gradientPlots/components.js +59 -48
  64. package/src/actions/gradientPlots/edit.js +35 -216
  65. package/src/actions/gradientPlots/index.js +11 -10
  66. package/src/actions/gradientPlots/materialize.js +21 -35
  67. package/src/actions/gradientPlots/options.js +5 -7
  68. package/src/actions/gradientPlots/paint.js +9 -6
  69. package/src/actions/gradientPlots/resolve.js +1 -1
  70. package/src/actions/guides/axes/index.js +3 -3
  71. package/src/actions/guides/axes/labels.js +68 -26
  72. package/src/actions/guides/axes/lines.js +22 -2
  73. package/src/actions/guides/axes/policy.js +28 -8
  74. package/src/actions/guides/axes/ticks.js +27 -9
  75. package/src/actions/guides/axes/titles.js +113 -65
  76. package/src/actions/guides/grids/resolve.js +14 -0
  77. package/src/actions/guides/guides.js +2 -4
  78. package/src/actions/guides/index.js +2 -2
  79. package/src/actions/guides/legends/categorical/actions.js +44 -68
  80. package/src/actions/guides/legends/categorical/components.js +6 -1
  81. package/src/actions/guides/legends/categorical/index.js +2 -2
  82. package/src/actions/guides/legends/categorical/layout.js +148 -175
  83. package/src/actions/guides/legends/categorical/recipes.js +5 -0
  84. package/src/actions/guides/legends/categorical/resolve.js +8 -1
  85. package/src/actions/guides/legends/continuous/common.js +117 -66
  86. package/src/actions/guides/legends/continuous/gradient.js +38 -37
  87. package/src/actions/guides/legends/continuous/interval.js +97 -76
  88. package/src/actions/guides/legends/continuous/opacity.js +28 -38
  89. package/src/actions/guides/legends/edit.js +14 -1
  90. package/src/actions/guides/legends/index.js +1 -1
  91. package/src/actions/guides/legends/lane.js +2 -1
  92. package/src/actions/guides/legends/remove.js +8 -0
  93. package/src/actions/guides/legends/size.js +36 -43
  94. package/src/actions/guides/legends/strokeWidth.js +20 -26
  95. package/src/actions/guides/polar/axes/labels.js +17 -1
  96. package/src/actions/guides/polar/axes/shared.js +7 -1
  97. package/src/actions/guides/polar/axes/titles.js +19 -2
  98. package/src/actions/guides/polar/grids.js +4 -0
  99. package/src/actions/guides/polar/resolve.js +6 -0
  100. package/src/actions/index.js +13 -13
  101. package/src/actions/intervals/resolve.js +87 -117
  102. package/src/actions/marks/arc/actions.js +31 -36
  103. package/src/actions/marks/area/actions.js +23 -31
  104. package/src/actions/marks/index.js +6 -6
  105. package/src/actions/marks/line/actions.js +33 -52
  106. package/src/actions/marks/line/materialize.js +7 -5
  107. package/src/actions/marks/point/materialize.js +5 -3
  108. package/src/actions/marks/remove.js +21 -0
  109. package/src/actions/marks/rule/actions.js +53 -53
  110. package/src/actions/marks/shared.js +8 -4
  111. package/src/actions/marks/text/actions.js +14 -6
  112. package/src/actions/marks/text/layout.js +21 -45
  113. package/src/actions/marks/tick/actions.js +22 -21
  114. package/src/actions/primitives/createGraphics.js +4 -0
  115. package/src/actions/primitives/editGraphics.js +4 -0
  116. package/src/actions/primitives/index.js +3 -3
  117. package/src/actions/primitives/semantic.js +1 -1
  118. package/src/actions/primitives/semanticValidation/index.js +2 -2
  119. package/src/actions/primitives/semanticValidation/layer.js +1 -1
  120. package/src/actions/regression/edit.js +3 -43
  121. package/src/actions/scales/consumers/families.js +24 -4
  122. package/src/actions/scales/consumers/index.js +1 -1
  123. package/src/actions/scales/consumers/seriesLayout.js +17 -0
  124. package/src/actions/scales/definitions.js +100 -103
  125. package/src/actions/scales/materialize.js +5 -0
  126. package/src/actions/selection/actions.js +79 -121
  127. package/src/actions/titles/actions.js +48 -94
  128. package/src/actions/titles/resolve.js +14 -27
  129. package/src/actions/violinPlots/create.js +37 -44
  130. package/src/core/textMetrics.js +74 -37
  131. package/src/core/validation.js +18 -0
  132. package/src/grammar/aggregate.js +48 -28
  133. package/src/grammar/arcs.js +58 -11
  134. package/src/grammar/areaSeries.js +14 -16
  135. package/src/grammar/bin2d.js +37 -23
  136. package/src/grammar/boxPlot.js +14 -13
  137. package/src/grammar/categoricalDensity.js +14 -14
  138. package/src/grammar/categoryOrder.js +8 -14
  139. package/src/grammar/curveCommands.js +87 -20
  140. package/src/grammar/density.js +162 -141
  141. package/src/grammar/facets/index.js +14 -0
  142. package/src/grammar/facets/scales.js +7 -4
  143. package/src/grammar/gradientProfile.js +12 -15
  144. package/src/grammar/histogram.js +145 -83
  145. package/src/grammar/horizon.js +60 -23
  146. package/src/grammar/interval.js +14 -13
  147. package/src/grammar/lineSeries.js +91 -61
  148. package/src/grammar/numeric.js +290 -0
  149. package/src/grammar/paint.js +3 -4
  150. package/src/grammar/palettes.js +21 -32
  151. package/src/grammar/pathCommands.js +6 -0
  152. package/src/grammar/polarPaths.js +5 -5
  153. package/src/grammar/regression/derive.js +48 -9
  154. package/src/grammar/regression/models.js +248 -69
  155. package/src/grammar/regression/parameters.js +8 -0
  156. package/src/grammar/scales/color.js +35 -26
  157. package/src/grammar/scales/continuous.js +71 -24
  158. package/src/grammar/scales/definition.js +1 -1
  159. package/src/grammar/scales/discretized.js +42 -12
  160. package/src/grammar/scales/fields.js +21 -4
  161. package/src/grammar/scales/ordinal.js +117 -61
  162. package/src/grammar/scales/temporal.js +40 -11
  163. package/src/grammar/scales/transformed.js +199 -52
  164. package/src/grammar/schemas/graphicBounds.js +270 -79
  165. package/src/grammar/seriesLayout.js +50 -18
  166. package/src/grammar/ticks.js +123 -53
  167. package/src/grammar/timeUnit.js +18 -8
  168. package/src/grammar/transforms.js +4 -1
  169. package/src/grammar/window.js +70 -57
  170. package/src/index.js +1 -1
  171. package/src/layout/canvas.js +4 -8
  172. package/src/layout/composition.js +39 -40
  173. package/src/layout/facets.js +10 -14
  174. package/src/layout/labels.js +91 -15
  175. package/src/layout/legend.js +22 -20
  176. package/src/layout/legendLane.js +54 -40
  177. package/src/layout/title.js +7 -7
  178. package/src/materialization/bars/aggregate.js +14 -40
  179. package/src/materialization/bars/grouped.js +7 -18
  180. package/src/materialization/bars/histogram.js +2 -19
  181. package/src/materialization/bars/ranged.js +20 -15
  182. package/src/materialization/bars/resolve.js +21 -0
  183. package/src/materialization/facetGuides/legacyCategorical.js +2 -1
  184. package/src/materialization/facetGuides/placement.js +34 -19
  185. package/src/materialization/facetGuides/preparation.js +9 -5
  186. package/src/materialization/facets.js +39 -27
  187. package/src/materialization/guides/resources.js +2 -1
  188. package/src/materialization/marks/capabilities.js +5 -2
  189. package/src/materialization/marks/index.js +24 -4
  190. package/src/materialization/scales/policies/bar.js +61 -59
  191. package/src/materialization/scales/policies/binnedPosition.js +34 -0
  192. package/src/materialization/scales/policies/series.js +13 -7
  193. package/src/materialization/scales/resolve.js +4 -5
  194. package/src/materialization/selection/items/arc.js +16 -2
  195. package/src/materialization/selection/items/bar.js +4 -2
  196. package/src/materialization/selection/items/common.js +21 -1
  197. package/src/materialization/selection/items/path.js +19 -2
  198. package/src/materialization/selection/items/point.js +4 -16
  199. package/src/materialization/selection/items/tick.js +13 -21
  200. package/src/materialization/selection/point.js +11 -4
  201. package/src/materialization/selection/styles.js +19 -27
  202. package/src/materialization/text.js +4 -1
  203. package/src/mcp/adapter.js +8 -3
  204. package/src/renderers/canvas/fill.js +2 -2
  205. package/src/renderers/canvas/index.js +35 -2
  206. package/src/renderers/canvas/native.js +160 -0
  207. package/src/renderers/pdf.js +14 -0
  208. package/src/renderers/svg.js +37 -4
  209. package/types/index.d.ts +3 -0
  210. package/types/program.d.ts +505 -131
  211. package/types/svg.d.ts +1 -0
  212. package/src/actions/errorBands/components.js +0 -81
  213. package/src/actions/errorBands/options.js +0 -39
  214. package/src/actions/errorBands/resolve.js +0 -28
  215. package/src/actions/errorBars/components.js +0 -62
  216. package/src/actions/errorBars/options.js +0 -58
  217. package/src/actions/errorBars/resolve.js +0 -25
package/CHANGELOG.md CHANGED
@@ -4,6 +4,71 @@ All notable changes to `ggaction` are recorded in this file.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## [0.0.11] - 2026-09-02
8
+
9
+ ### Added
10
+
11
+ - Added production guidance for accessibility, compatibility, responsive
12
+ layout, performance, data refresh, error recovery, version provenance,
13
+ fonts, and strict TypeScript use.
14
+ - Published versioned action cards, task-packet schemas, the exact
15
+ `ChartProgram` declaration, and a hashed LLM section manifest as deployed
16
+ machine-readable documentation artifacts.
17
+ - Added binned quantitative line aggregates with shared position-scale reuse,
18
+ stable series grouping, path ordering, selection, and rematerialization
19
+ behavior.
20
+ - Added text labels for complete arc sectors, with anchors derived from final
21
+ annular geometry and replay after Canvas, scale, padding, or inner-radius
22
+ changes.
23
+ - Added a provenance-verified 50-source TidyTuesday corpus and deterministic
24
+ smoke, deep, and realistic scenario runners for data, mark, encoding, guide,
25
+ scale, lifecycle, facade, and renderer qualification.
26
+
27
+ ### Changed
28
+
29
+ - Expanded compact action cards with exact option type strings and upgraded
30
+ MCP task packets with package provenance, applied options, explicit
31
+ placeholders, and unmatched-requirement preservation.
32
+ - Expanded chart-intent resolution for area, Horizon, pie, donut, rose, radar,
33
+ Polar axes, accessibility, responsive output, common option values, and
34
+ broader unsupported interaction and animation wording.
35
+ - Expanded documentation search and the LLM routing index from prose-only
36
+ excerpts to complete canonical-page and technical-symbol coverage.
37
+ - Inferred quantitative versus nominal bar positions from field-string
38
+ shorthand, inferred omitted rule datum types from scalar values, and allowed
39
+ compatible datum rules to share grouped or stacked measure scales.
40
+ - Hardened transforms, scales, layouts, selections, legends, and Canvas, PNG,
41
+ SVG, and PDF rendering with deterministic finite-value, cardinality,
42
+ geometry, native-backend, and output-size boundaries.
43
+ - Updated the Canvas runtime and browser build dependencies while preserving
44
+ explicit package and browser-bundle headroom across supported platforms.
45
+
46
+ ### Fixed
47
+
48
+ - Rewrote full LLM-bundle links and images against deployed canonical routes,
49
+ preserved links authored with HTML/Liquid, and exposed deterministic section
50
+ hashes and source-status metadata.
51
+ - Corrected the one-transform `DatasetTransform` documentation, all eight
52
+ public transform branches, legend placement support, duplicated chart
53
+ figures, generated action anchors, navigation order, and leaked internal
54
+ instruction files.
55
+ - Prevented incompatible area stroke-dash steps from appearing as executable
56
+ MCP output and stopped silently dropping recognized numeric, layout,
57
+ accessibility, and interaction requirements.
58
+ - Rematerialized every complete mark that consumes a shared automatic position
59
+ scale when a new ranged consumer expands its domain, keeping inherited error
60
+ bands aligned with existing lines.
61
+ - Preserved direct quantitative line values at their row grain instead of
62
+ collapsing repeated positions through the aggregate-line path.
63
+ - Aligned temporal bar annotations with their final geometry, spanned temporal
64
+ axis baselines across the plot, and composed multi-part UTC tick formats
65
+ without losing date or time components.
66
+ - Preserved encoded ranged-bar outlines and the default or encoded radius of
67
+ path-shaped points across materialization and rendering.
68
+ - Kept discretized heatmap domains nondegenerate, reserved data-aware facet
69
+ guide space, and made realistic gallery charts readable without weakening
70
+ the diagnostic corpus.
71
+
7
72
  ## [0.0.10] - 2026-08-11
8
73
 
9
74
  ### Added
@@ -214,6 +279,7 @@ All notable changes to `ggaction` are recorded in this file.
214
279
  - Cartesian charts are the complete current path. Polar semantic tokens exist only where explicitly documented and do
215
280
  not imply complete polar rendering.
216
281
 
282
+ [0.0.11]: https://github.com/ggaction/ggaction/releases/tag/v0.0.11
217
283
  [0.0.10]: https://github.com/ggaction/ggaction/releases/tag/v0.0.10
218
284
  [0.0.9]: https://github.com/ggaction/ggaction/releases/tag/v0.0.9
219
285
  [0.0.8]: https://github.com/ggaction/ggaction/releases/tag/v0.0.8
package/README.md CHANGED
@@ -54,7 +54,8 @@ const program = chart()
54
54
  ## MCP server for LLM
55
55
 
56
56
  ggaction includes a local, read-only MCP server that gives coding assistants
57
- current action names, exact call shapes, and task-specific authoring steps
57
+ current action names, syntax-valid call templates, explicit placeholders, and
58
+ task-specific authoring steps
58
59
  without loading the complete documentation.
59
60
 
60
61
  <p align="left">
@@ -156,7 +157,7 @@ automatic undo stack; the application chooses which to retain or render.
156
157
 
157
158
  Use `createLinePlot`, `createBarPlot`, `createHistogram`, and `createHeatmap` for
158
159
  the other basic Cartesian charts. The `ggaction/basic` entry keeps this common
159
- creation path at or below the current 120,000-byte gzip regression ceiling while
160
+ creation path at or below the current 125,000-byte gzip regression ceiling while
160
161
  each facade still records its mark, encoding, and guide actions as trace
161
162
  children. Import from
162
163
  `ggaction` when you need editing, selection, composition, alternative
@@ -229,7 +230,7 @@ the extra discussion required before public API or architecture changes.
229
230
 
230
231
  ## Status and development
231
232
 
232
- > **Status:** `0.0.10` is the current experimental public release. APIs may change before `1.0.0`; changes are recorded in the [changelog](./CHANGELOG.md).
233
+ > **Status:** `0.0.11` is the current experimental public release. APIs may change before `1.0.0`; changes are recorded in the [changelog](./CHANGELOG.md).
233
234
 
234
235
  ```bash
235
236
  npm install
@@ -0,0 +1 @@
1
+ {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://ggaction.github.io/ggaction/schemas/action-card.schema.json","title":"ggaction compact action card","type":"object","additionalProperties":false,"required":["schemaVersion","name","layer","domain","summary","signature","intents","lifecycle","resources","options","callPatterns","snippet","errors","route"],"properties":{"schemaVersion":{"const":2},"name":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9]*$"},"layer":{"enum":["user-facing","advanced","primitive"]},"domain":{"type":"string","minLength":1},"summary":{"type":"string","minLength":20,"maxLength":420},"signature":{"type":"string","minLength":10},"intents":{"type":"array","minItems":3,"maxItems":7,"uniqueItems":true,"items":{"type":"string","minLength":2,"maxLength":80}},"lifecycle":{"type":"string","minLength":3},"resources":{"type":"object","additionalProperties":false,"required":["prerequisites","owns","idOptions"],"properties":{"prerequisites":{"type":"array","maxItems":4,"uniqueItems":true,"items":{"type":"string","minLength":2,"maxLength":100}},"owns":{"type":"array","maxItems":3,"uniqueItems":true,"items":{"type":"string","minLength":2,"maxLength":80}},"idOptions":{"type":"array","maxItems":10,"uniqueItems":true,"items":{"type":"string","minLength":2,"maxLength":30}}}},"options":{"type":"array","maxItems":40,"items":{"type":"object","additionalProperties":false,"required":["name","required","type"],"properties":{"name":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9]*$"},"required":{"type":"boolean"},"type":{"type":"string","minLength":1,"maxLength":500}}}},"callPatterns":{"type":"array","minItems":1,"maxItems":2,"uniqueItems":true,"items":{"type":"string","minLength":3,"maxLength":260}},"snippet":{"type":"string","minLength":3,"maxLength":700},"errors":{"type":"array","maxItems":2,"items":{"type":"object","additionalProperties":false,"required":["error","fix"],"properties":{"error":{"type":"string","minLength":5,"maxLength":220},"fix":{"type":"string","minLength":5,"maxLength":220}}}},"route":{"type":"string","pattern":"^/reference/"}}}