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

@stream-mdx/worker

v0.5.0

Published

Worker client utilities and shared worker helpers for the Streaming Markdown V2 pipeline

Readme

@stream-mdx/worker

@stream-mdx/worker contains the worker runtime surface for StreamMDX: hosted worker assets, worker client helpers, Node worker_threads helpers, direct compile helpers, and MDX compile parity utilities.

Most browser app consumers will touch this package only indirectly through stream-mdx or @stream-mdx/react. Use it directly when you need explicit worker/runtime control.

Install

npm install @stream-mdx/worker

Exports

| Export | Purpose | | --- | --- | | @stream-mdx/worker | Main worker utilities surface | | @stream-mdx/worker/worker-client | Explicit worker client wiring | | @stream-mdx/worker/node | Node worker_threads hosted-worker helper | | @stream-mdx/worker/direct | Direct compile path without worker_threads | | @stream-mdx/worker/mdx-compile | Shared MDX compile helper | | @stream-mdx/worker/streaming/custom-matcher | Custom streaming matcher surface | | @stream-mdx/worker/hosted/markdown-worker.js | Hosted worker bundle asset |

Hosted Worker Bundle

Recommended production flow:

mkdir -p public/workers
cp node_modules/@stream-mdx/worker/dist/hosted/markdown-worker.js public/workers/markdown-worker.js

Then point the React surface at it:

<StreamingMarkdown worker="/workers/markdown-worker.js" />

This is the preferred deployment path for explicit CSP control and predictable static hosting.

Node worker_threads Helper

import { compileMarkdownSnapshot } from "@stream-mdx/worker/node";

const result = await compileMarkdownSnapshot({
  text: "# Hello\n\nCompiled in Node worker_threads.",
  init: {
    docPlugins: { tables: true, html: true, math: true, mdx: true, footnotes: true },
  },
});

Use this for SSR, static export, offline compilation, or TUI/CLI pipelines that want the same hosted worker behavior outside the browser.

Direct Compile Helper

import { compileMarkdownSnapshotDirect } from "@stream-mdx/worker/direct";

const result = await compileMarkdownSnapshotDirect({
  text: "# Hello\n\nDirect compile without worker_threads.",
  init: {
    docPlugins: { tables: true, html: true, math: true, mdx: true, footnotes: true },
  },
});

Use this in runtimes where worker_threads are unavailable or undesirable.

MDX Compile Parity Helper

import { compileMdxContent } from "@stream-mdx/worker/mdx-compile";

This is the shared MDX compilation path used to keep browser-worker and server compile flows aligned.

When To Reach For This Package

| Need | Use this package? | | --- | --- | | Host a static worker bundle in production | Yes | | Compile markdown snapshots in Node | Yes | | Build a custom worker integration | Yes | | Standard React app usage only | Usually no; use stream-mdx |

Documentation