feat(charts): bootstrap @astryxdesign/charts package (canary-only)#3570
Draft
cixzhang wants to merge 2 commits into
Draft
feat(charts): bootstrap @astryxdesign/charts package (canary-only)#3570cixzhang wants to merge 2 commits into
cixzhang wants to merge 2 commits into
Conversation
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).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
josephfarina
approved these changes
Jul 4, 2026
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bootstraps a new
@astryxdesign/chartspackage — 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 fromsrc/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 andcanaryOnlypackages; the canary job stripsprivatein its ephemeral CI checkout only (never in git) to publish under the@canarydist-tag.So it publishes on every push to
mainas0.x.y-canary.<sha>and never aslatest.What's in the scaffold
package.json— canary-only config, ESM + type-declaration build.lab, so a first component can consume@astryxdesign/coretheme tokens directly.tsconfig/tsconfig.build.json, emptysrc/index.tsbarrel, README, CHANGELOG.pnpm build(aftercore) and the package docs.The pre-compiled stylesheet wiring (a
chartstarget inscripts/build-css.mjs, abuild:cssscript, and a./charts.cssexport) 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 aslab).Verification
pnpm -F @astryxdesign/charts build— ESM output +.d.tsdeclarations generated.pnpm build(full repo) — green.pnpm check:repo— green.Notes
@astryxdesign/core; this PR instead stands charts up as its own canary-only package per direction. Flagging for maintainer confirmation on the package-vs-core decision.Draft — bootstrap scaffold for review of the package shape and publishing model before the component surface is built out.