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

@proteus-vue/docs

v0.1.0

Published

G-36 B2 / website B2 文档引擎:Markdown → Docs IR(语义块 AST)→ HTML/Vue SFC——零依赖手写 docs 子集解析器 + 轻量高亮器 + TOC/frontmatter/搜索索引;产出的 SFC 可直接喂框架编译器 compileVueSfc(文档也是编译产物);附 vite 插件(.md → 组件虚拟模块)

Readme

@proteus-vue/docs

文档引擎(官网 B2 核心件)——Markdown → Docs IR(语义块 AST)→ HTML / Vue SFC。零依赖手写 docs 子集解析器 + 轻量高亮器。

核心叙事(第九次泛化):文档内容语义化(Markdown → Docs IR → 渲染)与编译/渲染同构;产出的 SFC 直接喂框架编译器 compileVueSfc——「我们的文档是用我们自己的编译器编译的」。

用法

import { parseMarkdown, renderDocHtml, toSfc, flatToc, buildSearchIndex } from '@proteus-vue/docs'

const doc = parseMarkdown(mdSource) // frontmatter + blocks(Docs IR)
const html = renderDocHtml(doc)     // docs-* 语义类 HTML(SPA v-html / 静态直出)
const sfc = toSfc(doc, { componentName: 'GuideStart' }) // → compileVueSfc 可编译
const toc = buildToc(doc.blocks)    // 嵌套目录(h2-h3 可配)
const index = buildSearchIndex([{ path: '/guide/start', doc }]) // 搜索索引

覆盖范围(docs 子集)

  • :标题(锚点 id kebab + 中文保留 + 去重)/ 段落 / 代码围栏(lang + meta)/ 列表(含一层嵌套)/ 表格(对齐声明)/ 引用 / 分隔线
  • 行内code / strong / em / link / image
  • frontmatter:YAML-lite(key: value、块式数组、行内数组、布尔/数字/去引号归一)
  • 高亮:js/ts/vue/json/bash/css/html(comment/string/keyword/number/tag;内容全转义防注入)

SFC 产出约定

  • 代码块包 <DocsCode lang code v-pre>(站点侧提供高亮组件;v-pre 防 Vue 插值误伤)
  • 段落文本 {{ }} 实体化为 &#123;&#125;(防模板插值误解析)
  • frontmatter.title → 根 <p-page title> 语义声明;恒输出 <script setup>(SFC 合规)

诚实边界

  • 解析器覆盖框架自有文档子集,非 CommonMark 全集(嵌套引用/多级嵌套列表等按需扩展)
  • 高亮为轻量 tokenizer,复杂语言可换 shiki(接口兼容:code+lang → HTML)