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

@cascivo/text

v1.9.0

Published

Machine mode for cascivo — serialize a rendered UI to Markdown for agents. Docs offline: npx @cascivo/docs

Readme

npm downloads license types

npm · cascivo.com · Docs · Storybook · GitHub


Machine mode for cascivo: serialize a rendered UI to Markdown, for agents that need to know what a page says rather than what its source says. No CSS, no hydration, nothing to click.

Docs offline? The full cascivo reference ships as an npm package — npx -y @cascivo/docs, no website needed.

Install

pnpm add @cascivo/text

Use

import { renderToStaticMarkup } from 'react-dom/server'
import { toMarkdown } from '@cascivo/text'

const doc = toMarkdown(renderToStaticMarkup(<Billing />))
### Billing Active

Email [input = "[email protected]"]

[checkbox: Email me a receipt = checked]

| Name | Plan |
| ---- | ---- |
| Ada  | Pro  |

[button: Save changes] [button: Cancel (disabled)]

Four entry points

| Where the UI is | Use | | ------------------------------------ | ---------------------------------------------------------------------------------------------- | | A server or agent process, as HTML | toMarkdown(html, options?) | | The browser, as a live DOM subtree | elementToMarkdown(element, options?) — reads typed values, checked boxes, opened disclosures | | A React tree you want shown as text | <TextView> from @cascivo/text/react | | A React tree shown beside its text | useLiveMarkdown(ref) from @cascivo/text/react |

The one rule

Machine mode is the accessibility tree, serialized. Class names are build-time hashes and mean nothing; the accessible layer is the part of a component's output that is specified, tested and covered by semver.

A chart therefore serializes to a Markdown table with no chart-specific code in the serializer — @cascivo/charts already renders that table for screen readers. And a component that serializes to nothing is one that says nothing to assistive technology either.

Options

| Option | Default | What it does | | ---------- | ---------- | ---------------------------------------------------------------------------------------------------- | | annotate | true | Name the affordances and their state. | | links | 'inline' | 'inline' keeps standard Markdown links; 'footnote' numbers them; 'strip' keeps the label only. | | width | 0 | Wrap column for plain paragraphs. Tables, fenced code and lists are never wrapped. |

Full guide, including what is kept and what is dropped: MACHINE-MODE.md.

Install

pnpm add @cascivo/text

cascivo.com · Docs · Storybook · GitHub · AI agents: read llms.txt (install steps + component index, plain text) or use @cascivo/mcp and registry.json · MIT