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

@datafe-open/markdown-chart

v0.1.15

Published

Framework-neutral registry and lifecycle controller for JSON charts in Markdown

Downloads

20,499

Readme

@datafe-open/markdown-chart

Framework-neutral renderer registry, canonical markdown-chart fence router, strict JSON parser, and one-container chart lifecycle controller. Canonical inline datasets and renderer-materialized referenced datasets receive a built-in Chart/Data switch and bounded data table. The switch uses accessible chart/table icons and Qwen Code WebShell-inspired card styling. Hosts can override --markdown-chart-background, --markdown-chart-subtle-background, --markdown-chart-accent, and --markdown-chart-accent-foreground. The selected Chart/Data icon foreground falls back to --markdown-chart-background, then #ffffff, so hosts can pair a custom accent background with a contrasting foreground. See Third-party notices for source attribution and license details.

Renderers may expose a title through getTitle(parsed). The core trims that value and creates a title element only when it is non-empty; it never supplies a fallback title. The Chart/Data controls remain right-aligned when no title is present, and the chart keeps 8px of vertical spacing from the toolbar.

Canonical envelopes keep default data and optional named datasets separate from renderer-owned spec. parseMarkdownChartEnvelope() exposes validated inline or referenced ChartData objects and passes both forms to the selected renderer. The shared Chart/Data view inspects the default data; renderers own the presentation of any selected named datasets.

materializeChartData() is the shared renderer-neutral ref boundary. Hosts provide ResolveChartDataRef and optional validation; core forwards the opaque ref and abort signal, validates the returned scalar rows and explicit limits, and returns inline data. It does not select a transport, fetch, authorize, or interpret any ref scheme.

Dynamic renderer parse contexts expose normalized language and the optional original rawLanguage first token. Adapters should preserve rawLanguage when a dynamic fence embeds a case-sensitive payload such as a file path.

ChartRenderRequest.streaming is block-level pending state. Markdown adapters defer only an unterminated tail fence; completed blocks remain mounted while the surrounding document continues streaming. ChartController renders a visible loading state while a block is pending and while parsing, materialization, or runtime mounting is in flight. Set ChartRenderRequest.loadingLabel to localize the default text. Custom Markdown adapters that render isolated blocks can use findUnclosedMarkdownFence to identify the active tail fence without duplicating fence parsing.

Set ChartRenderRequest.labels to localize chart accessibility labels, the Chart/Data controls, empty-data text, truncation notice, and adapter error fallbacks. MarkdownChartLabelOverrides is partial; omitted entries retain the exported DEFAULT_MARKDOWN_CHART_LABELS. Framework adapters expose the same labels object.

ChartRenderRequest.referenceActions is a renderer-neutral host boundary for clickable references. Core only forwards { rendererId, reference: { ref, label } }; it does not parse refs, authorize access, fetch content, navigate, or create a panel. Hosts can hide unsupported references with canOpen and handle accepted clicks with open.