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

@aufbau/editor

v0.0.12

Published

Embeddable interactive Aufbau proof editor as a web component.

Readme

@aufbau/editor

Embeddable browser editor components for MM0 theories and Aufbau proofs. Compilation and diagnostics run locally in WebAssembly.

Install

npm install @aufbau/editor @aufbau/compiler \
  @codemirror/view @codemirror/state @codemirror/commands \
  @codemirror/lint

For language-server hover, completion, and proof search, also install the optional packages:

npm install @aufbau/lsp @codemirror/autocomplete

Usage

Importing the package registers its custom elements:

import "@aufbau/editor";
<aufbau-theory id="example" src="/example.mm0"></aufbau-theory>

<aufbau-proof theory="example" src="/example.auf"></aufbau-proof>

Sources may also be inline:

<aufbau-theory id="example">
  <script type="text/mm0">
    -- MM0 source
  </script>
</aufbau-theory>

<aufbau-proof theory="example">
  <script type="text/auf">
    -- Aufbau proof script
  </script>
</aufbau-proof>

Multiple proof elements with the same theory value form one document in DOM order. Use readonly, theme="light|dark|auto", or lsp="off" to adjust an individual proof element. The package also registers <aufbau-index> for a live statement index.

Theories and proofs may import "other.mm0"; / include "other.auf";. The named file is fetched relative to the page (inline sources) or to the source's own URL (src sources), and a fetched .mm0 brings its .auf sibling along when the server has one.

This package requires a browser DOM. It does not run under plain Node.

Loading from a CDN

The components need no bundler and no build step — an import map is enough. The ?external= parameters keep CodeMirror and the Aufbau wasm packages as single shared instances rather than one copy per dependent:

<script type="importmap">
  {
    "imports": {
      "@codemirror/state": "https://esm.sh/@codemirror/state",
      "@codemirror/view": "https://esm.sh/@codemirror/view?external=@codemirror/state",
      "@codemirror/commands": "https://esm.sh/@codemirror/commands?external=@codemirror/state,@codemirror/view",
      "@codemirror/lint": "https://esm.sh/@codemirror/lint?external=@codemirror/state,@codemirror/view",
      "@codemirror/autocomplete": "https://esm.sh/@codemirror/autocomplete?external=@codemirror/state,@codemirror/view",
      "@aufbau/compiler": "https://esm.sh/@aufbau/compiler",
      "@aufbau/lsp": "https://esm.sh/@aufbau/lsp",
      "@aufbau/editor": "https://esm.sh/@aufbau/editor?external=@aufbau/compiler,@aufbau/lsp,@codemirror/state,@codemirror/view,@codemirror/commands,@codemirror/lint,@codemirror/autocomplete"
    }
  }
</script>
<script type="module">
  import "@aufbau/editor";
</script>

The language server runs in a Web Worker that the browser will only build from a same-origin script, so @aufbau/lsp bootstraps it through a blob: URL when it is served from a CDN. A page with a Content-Security-Policy therefore needs worker-src blob: alongside the CDN host — see the @aufbau/lsp README. Drop the @aufbau/lsp and @codemirror/autocomplete entries to run without a language server; the editor still compiles and reports diagnostics.

Host pages with their own global keyboard shortcuts should be aware that keystrokes typed in a cell bubble out of its shadow root retargeted to the <aufbau-*> host element. If those shortcuts swallow ordinary characters, stop keyboard events whose composedPath() contains an AUFBAU- element before the page's own handlers see them.