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

@mirrordown/mdit-lightbox

v0.1.0

Published

A markdown-it plugin to opt an image into a JavaScript-free <dialog> lightbox with a leading !! (zoom on click).

Readme

@mirrordown/mdit-lightbox

Part of Mirrordown — a suite of markdown syntax extensions for the unified and markdown-it ecosystems.

A markdown-it plugin that opts an image into a click-to-zoom lightbox — with no JavaScript.

Overview

Opt an image in with a leading !!:

!![A wild rice field](./wild-rice.jpg "Wild rice")

The marked image becomes a trigger that opens the full-size image in a modal <dialog>, dimming and blurring the page behind it. Unmarked images (![…]) render normally. The entire interaction — open, close, backdrop dismiss, Esc, and the zoom/fade animation — is built from modern declarative HTML and CSS only: <dialog>, the Invoker Commands API (command/commandfor), closedby="any", and @starting-style. That makes it work in environments that disable scripts, such as the VSCode Markdown preview.

Click the image to zoom; click it again, click the backdrop, or press Esc to close. In renderers without the plugin, the extra ! renders as plain text and the image still shows.

Install

npm install @mirrordown/mdit-lightbox

Usage

import MarkdownIt from "markdown-it";
import { lightbox } from "@mirrordown/mdit-lightbox";
import "@mirrordown/mdit-lightbox/styles";

const md = MarkdownIt().use(lightbox);

md.render('!![A wild rice field](./wild-rice.jpg "Wild rice")');

The plugin renders each opted-in image as an inline trigger button and emits the matching <dialog> elements at the end of the document (a <dialog> cannot be nested in the paragraph that wraps an inline image). Import @mirrordown/mdit-lightbox/styles for the default look.

Behavior

  • Repeated images share one dialog. The dialog id is a stable hash of the image src, so referencing the same image more than once produces a single dialog that every trigger opens — not a duplicate per reference.
  • Name a lightbox with {#id}. With markdown-it-attrs (or any compatible attrs plugin), !![Alt](photo.jpg){#hero} uses hero as the dialog id instead of the hashed default.
  • Images inside a link are skipped. A <button> can't nest in an <a>, so a linked image ([!![Alt](photo.jpg)](/page)) renders as a normal linked image and the ! stays literal.

Customization

The stylesheet exposes public custom properties:

| Property | Default | Description | | ------------------------------ | ----------------- | -------------------------------- | | --markdown-lightbox-backdrop | rgb(0 0 0 /72%) | Backdrop color behind the image. | | --markdown-lightbox-blur | 3px | Backdrop blur radius. | | --markdown-lightbox-radius | 0.375rem | Image corner radius. | | --markdown-lightbox-duration | 0.25s | Open/close transition duration. |

Browser support

Requires command/commandfor, <dialog closedby>, and @starting-style (Chromium 135+ and equivalent). Where unsupported, images degrade to a plain, non-zooming thumbnail.

License

MIT © Drake Costa