Skip to content

feat(charts): bootstrap @astryxdesign/charts package (canary-only)#3570

Draft
cixzhang wants to merge 2 commits into
mainfrom
navi/feat/charts-package
Draft

feat(charts): bootstrap @astryxdesign/charts package (canary-only)#3570
cixzhang wants to merge 2 commits into
mainfrom
navi/feat/charts-package

Conversation

@cixzhang

@cixzhang cixzhang commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

What

Bootstraps a new @astryxdesign/charts package — an empty, ready-to-build scaffold for chart components. Chart components will be thin, themeable wrappers over a peer charting engine: the package owns the design-system surface while leaving the rendering engine as a peer dependency the consumer manages.

This is a bootstrap scaffold only — no components yet. It's set up so components can be added under src/ and exported from src/index.ts.

Why canary-only, no stable version

Charts should be publishable for early testing but not carry a stable release yet. It follows the same canary-only model as lab:

  • "private": true — npm's hard guarantee against an accidental stable publish.
  • "astryx": { "canaryOnly": true } — the release workflow's stable (latest) job skips both private and canaryOnly packages; the canary job strips private in its ephemeral CI checkout only (never in git) to publish under the @canary dist-tag.

So it publishes on every push to main as 0.x.y-canary.<sha> and never as latest.

What's in the scaffold

  • package.json — canary-only config, ESM + type-declaration build.
  • Babel + StyleX setup mirroring lab, so a first component can consume @astryxdesign/core theme tokens directly.
  • tsconfig / tsconfig.build.json, empty src/index.ts barrel, README, CHANGELOG.
  • Wired into the root pnpm build (after core) and the package docs.

The pre-compiled stylesheet wiring (a charts target in scripts/build-css.mjs, a build:css script, and a ./charts.css export) is deferred until the first component adds StyleX styles — an empty CSS extraction would otherwise fail with no rules to collect. The README notes exactly how to re-add it (same as lab).

Verification

  • pnpm -F @astryxdesign/charts build — ESM output + .d.ts declarations generated.
  • pnpm build (full repo) — green.
  • pnpm check:repo — green.

Notes

Draft — bootstrap scaffold for review of the package shape and publishing model before the component surface is built out.

Adds a new @astryxdesign/charts package for chart components — thin,
themeable wrappers over a peer charting engine. The package owns the
design-system surface while leaving the rendering engine as a peer
dependency the consumer manages.

Bootstrapping only: no finalized public API yet. It ships:

- ChartContainer — root wrapper that provides a ChartConfig via context
  and bridges each series color to a scoped --color-{key} custom
  property so the charting engine can reference var(--color-{key}) on
  fill/stroke without parsing design tokens.
- ChartConfig / ChartSeriesConfig — the config contract.
- useChartConfig() — read the active config from within a container.

Follows the canary-only publishing model: private: true plus
astryx.canaryOnly so the stable (latest) release job always skips it,
while the canary job publishes it under the @canary dist-tag. Wires the
package into the root build, the StyleX CSS build targets, and the
package docs. Styling uses design tokens only (no raw values).
@vercel

vercel Bot commented Jul 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Error Error Jul 4, 2026 7:29pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.6KB 0B

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

github-actions Bot added a commit that referenced this pull request Jul 4, 2026
Removes the placeholder ChartContainer/ChartConfig seed so the package
ships as a clean, empty scaffold ready for components to be added. The
StyleX + Astryx-token build setup (babel config, add-extensions plugin)
is kept so a first component can consume core theme tokens directly.

Defers the pre-compiled stylesheet wiring (build:css, the charts CSS
target, and the ./charts.css export) until the first component adds
StyleX styles — the empty CSS extraction would otherwise fail with no
rules to collect. The package build (ESM + type declarations) and the
canary-only publishing model are unchanged.
github-actions Bot added a commit that referenced this pull request Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants