npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@protoyard/charts-ui

v1.9.4

Published

Svelte chart components for Protoyard: thin re-exports and adapters over @texuli/charts families.

Readme

@protoyard/charts-ui

Svelte 5 chart components for Protoyard prototypes. Every family re-exports the charts of Texuli (@texuli/charts), with thin adapters that keep Protoyard's props (docs/texuli-charts.md). The math comes from @protoyard/charts, which re-exports @texuli/charts/math (ADR-044). Each chart family has its own subpath, so a prototype pays only for the families its screens import. Nothing here is re-exported from the @protoyard/ui barrel.

ChartRoot is a compatibility wrapper around Texuli chart families: it keeps Protoyard's named-group focus target and data-py-chart marker while using Texuli's cx helper for its styling. CellPlot is a direct alias of the Texuli-backed Heatmap adapter. RampLegend preserves its optional-label Protoyard prop while delegating rendering and accessibility to @texuli/charts/matrix from Texuli 0.5.0.

Install in a workspace prototype

Add "@protoyard/charts-ui": "workspace:*" to the prototype dependencies and import the styles after Tailwind and the theme/UI styles:

@import 'tailwindcss';
@import '@protoyard/themes/base.css';
@import '@protoyard/ui/styles.css';
@import '@protoyard/charts-ui/styles.css';

Entry points

| Import | Family | | --- | --- | | @protoyard/charts-ui | CHART_FAMILIES and the data contract types only (imports no family) | | @protoyard/charts-ui/cartesian | Line, area, bar, combo, scatter | | @protoyard/charts-ui/part-whole | Pie, donut, funnel, treemap, sankey | | @protoyard/charts-ui/matrix | Histogram, heatmap, calendar heatmap | | @protoyard/charts-ui/compact | Sparkline, gauge, radial progress | | @protoyard/charts-ui/canvas | Canvas renderer for dense series | | @protoyard/charts-ui/geo | Tile-grid choropleth | | @protoyard/charts-ui/flow | Funnel, sankey and network graph, straight from @texuli/charts/flow | | @protoyard/charts-ui/interaction | The shared interaction layer (InteractivePlot, Legend, ChartTable, TableToggle, brush, zoom and keyboard helpers) from @texuli/charts/interaction |

What each subpath ships:

  • ./cartesian: LineChart, AreaChart, BarChart, ComboChart, ScatterChart;
  • ./part-whole: DonutChart, PieChart, FunnelChart, Treemap, SankeyChart, plus Texuli's TreemapChart and SunburstChart;
  • ./matrix: Heatmap, CalendarHeatmap, Histogram, RampLegend;
  • ./compact: Sparkline, Gauge, RadialProgress;
  • ./geo: TileMap;
  • ./canvas: the Canvas renderer used by the dense line and scatter charts;
  • ./flow and ./interaction: Texuli's flow charts and interaction layer.

Sizes, measured by pnpm exec tsx scripts/bench-charts.ts --skip-browser --check (a real Vite build with one lazy import per family; gzip level 9 of the chunks each family downloads beyond the app entry): cartesian 13,466 B, part-whole 9,819 B, matrix 15,923 B, compact 7,213 B, canvas 1,647 B, geo 4,651 B. A LineChart + BarChart view is 8,977 B (12,718 B on Texuli 0.9.0), within the bench's 13,354 B guard.

The platform guide with every chart's props, the data contracts and the measured numbers is docs/CHARTS.md. sideEffects lists only CSS, so a bundler keeps just the components a screen imports from a subpath. Load a family from a lazy route (load: () => import('./Screen.svelte')) so charts stay out of the initial chunk.

Families and props

Each subpath re-exports Texuli's charts, through an adapter where Protoyard's props differ (docs/texuli-charts.md):

  • ./cartesian: LineChart, AreaChart, BarChart and ComboChart pass emptyMessage and description to Texuli's description, drop Protoyard-only series fields, and forward xKind, formatX and locale: xKind="time" reads epoch milliseconds as UTC dates on the axis, live region, tooltip and table. A time or linear kind on string x keeps Texuli's inferred axis instead of throwing. ScatterChart maps series[] to Texuli's matrix points[].
  • ./part-whole: Pie and Donut default the table labels and map height to size; FunnelChart maps count to value; Texuli's TreemapChart and SunburstChart are re-exported as they are.
  • ./matrix and ./geo: Histogram bins with @texuli/charts/math bin and draws a BarChart; CalendarHeatmap lays out cells with calendarLayout; TileMap draws Texuli's GeoMap (WORLD_TILES and REGION_TILES re-exported).
  • ./compact: RadialProgress draws Texuli's ProgressRing.
  • ./canvas, ./flow, ./interaction: Texuli's, unchanged.

Many older props are accepted but ignored (units and currency formatting, axis kinds, curve, renderer, loading / error / onretry, showLegend / showTable / hidden, among others). The exact props each adapter forwards, the data contracts, the keyboard and screen reader behavior, the palette and the renderers are documented in docs/CHARTS.md from the adapter source.

Tests

pnpm vitest run packages/charts-ui
pnpm --filter @protoyard/charts-ui typecheck
pnpm exec tsx scripts/bench-charts.ts --skip-browser --check        # Node math + real Vite bundle sizes

Package output

The repository keeps source exports for workspace development. pnpm build:packages --filter svelte creates the compiled ESM, declarations and Svelte components under dist/ that the packed manifest exposes.