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

@axiia/stream-markdown

v0.0.2

Published

Progressive Markdown streaming for React, powered by the remark ecosystem with headless primitives and directive support.

Readme

Stream Markdown

Progressive Markdown streaming for React, powered by the remark ecosystem with headless primitives and directive support.


Try The Examples

deno task example basic      # streaming walkthrough
deno task example directive  # directive renderer demo
  • Requires Deno 2+ with Node compatibility (default install).
  • Examples run Vite through Deno, so hot reload works out of the box.

Overview

  • Stream Markdown incrementally while keeping promoted blocks stable for React reconciliation.
  • Opt into directive rendering via the remark-directive syntax and a directives map.
  • Headless primitives only—consumers control every piece of UI.
  • For implementation details and roadmap, see SPEC.md.

Usage

import { MarkdownStream } from 'stream-markdown'

export const Preview = ({ chunks }: { chunks: string[] }) => (
  <MarkdownStream streaming chunks={chunks} />
)

Stable Markdown can be rendered without streaming props:

<MarkdownStream content='# Hello world' />

When the stream finishes, render again with streaming={false} and the final content so the session can finalize buffered suffixes without resetting:

const streaming = !isComplete

<MarkdownStream
  {...(streaming
    ? { streaming: true as const, chunks }
    : { content: fullMarkdown })}
/>

Rendering directives

import type { MarkdownDirectiveComponents } from 'stream-markdown'

const directives: MarkdownDirectiveComponents = {
  callout: ({ children }) => <aside className='callout'>{children}</aside>,
}

<MarkdownStream content=':::callout\nContent\n:::' directives={directives} />

If no matching directive renderer is provided, directive nodes resolve to null, keeping the tree stable even when directives appear in streamed chunks.

Overriding Markdown elements

import type { MarkdownComponents } from 'stream-markdown'

const components: MarkdownComponents = {
  h1: ({ children, ...rest }) => (
    <h1 {...rest} className='text-3xl font-bold'>
      {children}
    </h1>
  ),
}

<MarkdownStream content='# Styled heading' components={components} />

Development

  • Format & lint: deno fmt, deno lint
  • Tests: deno test
  • Examples: deno task example <name>

The spec captures the streaming contract, buffer promotion rules, and React integration notes.


License

MIT