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

@ayu-sh-kr/dota-md

v0.0.2

Published

dota-md is a web component elements to help user host better docs and blogs.

Readme

@ayu-sh-kr/dota-md

Web component library for rendering Markdown in documentation and blog layouts. Built on markdown-it with syntax highlighting, anchor links, and an extracted Table of Contents.

Installation

npm install @ayu-sh-kr/dota-md

Import the stylesheet alongside the components:

import '@ayu-sh-kr/dota-md';
import '@ayu-sh-kr/dota-md/dota-md.css';

Components

<md-view>

Renders themed markdown HTML. Reacts to events on the shared event bus — no wiring required when used alongside MDService.render({ publish: true }).

Attributes

| Attribute | Default | Description | |-----------|-----------|------------------------------------------------------| | theme | flat | Theme name (flat, material, apple, github). | | color | neutral | Accent colour — any Tailwind color name. |

Usage

<md-view theme="flat" color="indigo"></md-view>
import { MDService } from '@ayu-sh-kr/dota-md';

const raw = `# Hello\nSome **markdown** content.`;
MDService.render(raw, { publish: true });
// md-view receives the md:render event and updates automatically

<md-toc>

Sticky Table of Contents sidebar. Highlights the active heading on scroll, smooth-scrolls on click, and stays in sync with theme/colour changes via events.

Attributes

| Attribute | Default | Description | |-----------------|----------------|----------------------------------------------------------| | theme | flat | Theme name. | | color | indigo | Accent colour. | | header-height | 64 | Sticky header height in px, used for scroll offset. | | label | On this page | Text displayed above the TOC list. |

Usage

<md-toc theme="flat" color="indigo" header-height="64"></md-toc>

TOC entries are populated automatically when MDService.render({ publish: true }) fires. No additional wiring needed.


MDService

Singleton rendering service. Results are cached by content string (LRU, 50 entries by default).

MDService.render(content, options?)

Returns { html: string, toc: TocEntry[] }.

| Option | Type | Default | Description | |-----------|-----------|---------|-------------------------------------------------------------| | publish | boolean | false | Fires an md:render event so components update themselves. | | bust | boolean | false | Discards the cache entry for this content before rendering. |

const { html, toc } = MDService.render(raw, { publish: true });

MDService.renderHtml(content, options?)

Returns the HTML string only. Still writes to cache.

const html = MDService.renderHtml(raw);

MDService.renderToc(content, options?)

Returns the TocEntry[] array only. Still writes to cache.

const toc = MDService.renderToc(raw);

Cache control

MDService.clearCache();              // clear all
MDService.clearCacheFor(content);   // clear one entry
MDService.setCacheLimit(100);       // adjust max entries (default 50)

Custom markdown-it instance

import markdownit from 'markdown-it';

MDService.setMd(markdownit().use(myPlugin));
// Clears the cache automatically

Events

Components communicate through the application event bus. You can dispatch these events manually to drive the components from outside.

| Event | Payload | Direction | |--------------------|--------------------------|----------------------| | md:render | { html, toc } | Service → Components | | md:theme-change | { theme: string } | App → Components | | md:color-change | { color: string } | App → Components |


Themes

Built-in themes available via the theme attribute:

| Name | Description | |------------|----------------------------------| | flat | Clean, minimal, flat styling | | material | Material Design-inspired | | apple | Apple documentation style | | github | GitHub Markdown style |

More themes will be added in future releases.


Colors

Any Tailwind color name is accepted on the color attribute:

slate · gray · zinc · neutral · stone · red · orange · amber · yellow · lime · green · emerald · teal · cyan · sky · blue · indigo · violet · purple · fuchsia · pink · rose


License

MIT