Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,254 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ggsvelte

CI npm codecov license

ggsvelte is a fast agent-native implementation of the layered grammar of graphics, inspired by ggplot2.

Documentation · Examples · Getting started

Bar chart of cold-mount time for a 1,000-point colored scatter: ggsvelte 9.4 ms, LayerCake 22.1 ms, Unovis 92.2 ms, SveltePlot 311.3 ms. Lower is better.

Bar chart of cold-mount time for a 10,000-point colored scatter: ggsvelte 57.6 ms, LayerCake 214.2 ms, Unovis 577.2 ms, SveltePlot 4,385 ms. Lower is better.

Bar chart of cold-mount time for a 100,000-point colored scatter: ggsvelte SVG 616.6 ms, ggsvelte canvas 247.9 ms, LayerCake 2,799 ms, LayerCake canvas 171.2 ms, Unovis 5,732 ms, SveltePlot 39,636 ms. Lower is better.

Bar chart of cold-mount time for a 3-series by 10,000-point line chart: ggsvelte 21.9 ms, LayerCake 36.6 ms, Unovis 173.1 ms, SveltePlot 1,133 ms. Lower is better.

Bar chart of cold-mount time for a 10-series by 10,000-point line chart: ggsvelte SVG 78 ms, ggsvelte canvas 118.7 ms, LayerCake 146.4 ms, LayerCake canvas 131.2 ms, Unovis 593.8 ms, SveltePlot 3,960 ms. Lower is better.

Bar chart of cold-mount time for a 3-series by 1,000-point area chart: ggsvelte 4.6 ms, LayerCake 5.6 ms, Unovis 67.1 ms, SveltePlot 188.7 ms. Lower is better.

Bar chart of cold-mount time for a stacked bar chart of 50 categories by 4 stacks: ggsvelte 4.6 ms, LayerCake 5.2 ms, Unovis 28.9 ms, SveltePlot 62.7 ms. Lower is better.

Install

bun add @ggsvelte/svelte
# or: npm install @ggsvelte/svelte

Requires Node.js 22+ and Svelte 5.33.1+. CI covers npm, pnpm, and Bun on Ubuntu and Windows.

Agents

  • Skill: @ggsvelte/skill — install from npm, then copy node_modules/@ggsvelte/skill into your agent's skills dir as ggsvelte/ (dependabot surfaces version bumps for bundled copies). In-tree source: packages/skill/SKILL.md
  • Schema: schema/v0.json
  • Corpus: llms.txt · llms-full.txt
  • validate() errors are { code, path, message, fix } with a machine-applicable fix.example

Packages

Package Surface
@ggsvelte/svelte Svelte 5 components, re-exports
@ggsvelte/spec PortableSpec types, JSON Schema, validate/normalize, fluent builder
@ggsvelte/core Pipeline, headless SVG, canvas, hit testing
@ggsvelte/cli ggsvelte-render CLI: validate + render specs in agent sandboxes
@ggsvelte/skill Agent skill (SKILL.md + references) teaching the grammar

Why ggsvelte?

Capability ggsvelte SveltePlot Unovis LayerCake
Bundle size (min+gzip, 1k scatter app) ⚠️ 127 KB ✅ 109 KB ✅ 80 KB ✅ 41 KB
API stability ⚠️ v0.37.0 ⚠️ v0.14 ✅ v1.6 ✅ v10
Headless server-side SVG (no DOM) ❌ empty shell ❌ client onMount ⚠️ opt-in ssr flag
Portable JSON spec + schema
CLI validator + renderer
Agent skill
Automatic temporal detection ⚠️ Date objects only
Built-in interactions ⚠️ tooltip + brush ⚠️ tooltip + crosshair
ggplot2 API
Scale, axis & coord control ⚠️ d3 scales

Reference

Release status

Pre-1.0. Package manifests are the version source of truth. Lifecycle and compatibility contracts live in lifecycle.json and the lifecycle guide.

Contributing

See CONTRIBUTING.md.

License

MIT © Liam O'Dea. Loess reference attribution is in NOTICE.

About

A fast agent-native implementation of the layered grammar of graphics, inspired by ggplot2.

Topics

Resources

Contributing

Security policy

Stars

12 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages