Welcome! We're glad you're here.
git clone https://github.com/nteract/semiotic.git
cd semiotic
npm install --legacy-peer-deps
npm test # 628 unit tests (Jest)
npm run dist # build all bundles (Rollup)
npm run typescript # type checkRequires Node 18+. See .node-version.
src/
components/
StreamXYFrame.tsx, StreamOrdinalFrame.tsx, StreamNetworkFrame.tsx # core Frames
charts/
xy/ # LineChart, AreaChart, Scatterplot, etc.
ordinal/ # BarChart, StackedBarChart, PieChart, etc.
network/ # ForceDirectedGraph, SankeyDiagram, TreeDiagram, etc.
shared/ # colorUtils, hooks, validateChartData, validateProps
server/ # renderToStaticSVG
processing/ # data pipelines and layout algorithms
ai/ # schema.json, MCP server, CLI, system prompt, examples
scripts/ # build.mjs, release scripts
docs/ # website source (Parcel)
- Create a branch from
main - Make your changes
- Run
npm testandnpm run distto verify - Open a PR against
main - CI runs tests, build, and type check automatically
- Rollup 4 — library bundles (
npm run dist) - Parcel — docs website (
npm start) - TypeScript 5 — type checking (
npm run typescript) - Jest — unit tests (
npm test) - Playwright — integration tests (
npm run test:dist)
Semiotic has three layers:
| Layer | Purpose | Example |
|---|---|---|
| HOC Charts | Simple props, sensible defaults | <LineChart data={d} xAccessor="x" yAccessor="y" /> |
| Frames | Full control over rendering and interaction | <XYFrame lines={d} customLineMark={...} /> |
| Utilities | Axes, legends, annotations, brushes | Used internally by Frames |
HOC charts wrap Frames. Every HOC accepts frameProps to pass through to
the underlying Frame for advanced use cases.
- Unit tests live next to source files:
ComponentName.test.tsx - Run a single test:
npx jest --testPathPattern=LineChart - Integration tests:
npm run test:dist(requires build first)
- TypeScript, no
anyin new code where avoidable - Prettier handles formatting (see
.prettierrc) - ESLint for linting (
npm run lint) - No semicolons, double quotes, trailing commas
Releases are automated via GitHub Actions. The workflow:
- Update
versioninpackage.json - Update
CHANGELOG.md - Commit:
git commit -m "chore(release): v3.0.0" - Tag:
git tag v3.0.0 - Push:
git push && git push --tags - CI builds, tests, and publishes to npm automatically
The NPM_TOKEN secret must be configured in the repo's GitHub settings.
This project follows the nteract Code of Conduct.