@microcharts/react@0.3.0
Minor Changes
-
#23
c5854a0Thanks @ganapativs! - Deepen the theming surface — all additive, backward-compatible, and identity at
their defaults (no visual change to existing charts):defineTheme()— a new opt-in@microcharts/react/themesubpath (zero
runtime deps, ~2 kB gzip, tree-shaken when unused). Give it one brand accent
and it derives a harmonized, colour-blind-safe categorical palette and
hand-tuned-style dark twins in-house in OKLCH — never moving the
positive/negative hues off their CVD-safe split. Extend a preset, pin any
token, pass an explicit palette, orextend()a variant; returns
vars/style/css(selector)(with aprefers-color-scheme: darkblock).- New tokens —
--mc-font-numeric(a dedicated face for figures, tracks
--mc-fontby default),--mc-label-weight, and--mc-density(one scalar
that scales stroke weight, label size, and small-multiple gap together for
compact vs comfortable layouts; the plot box is untouched). colorsprop — per-instance series colours on the categorical charts
(SegmentedBar,StackedArea,PartitionStrip,Hypnogram,MicroDonut),
overriding--mc-cat-*just there.printandeinkpresets — output-context token bundles for paper and
grayscale e-paper, answeringdata-mc-theme/data-mc-presetlike the rest.
The
MicrochartCommonPropsshared-grammar type is now enforced as a single
source of truth: a guard test holds every chart's shared props to its canonical
types.
Patch Changes
-
#23
c5854a0Thanks @ganapativs! - Ship a minifiedstyles.css.@microcharts/react/styles.css(and the
per-chartstyles/*.cssescape-hatch files) now resolve to minified copies in
dist/— the shared stylesheet drops from ~8.7 kB to ~2.8 kB gzip. The
minifier only strips comments and whitespace (no rule merging), so@layer
membership and cascade order are unchanged. The repo-rootstyles.cssstays the
unminified source of truth; no API or visual changes. -
#23
c5854a0Thanks @ganapativs! - Improve npm and search discoverability: expandkeywords, add afundinglink
(GitHub Sponsors), and a structuredauthor(name/email/url). Metadata only — no
API, runtime, or visual changes.