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

comark-zoom

v0.11.0

Published

Zoom images and any block like medium-zoom, with Escape, Back, and click-outside to close. A Comark plugin.

Readme

comark-zoom

npm version npm downloads license docs

Zoom images and any block like medium-zoom, written in Markdown. A Comark plugin for HTML, Vue, React, and Svelte.

pnpm add comark comark-zoom
import { createHtmlRenderer } from "@comark/html";
import zoom, { components } from "comark-zoom/html";

const render = createHtmlRenderer({ plugins: [zoom()], components });

Content images zoom on their own, except images inside links. Wrap any other block in ::zoom to make it zoomable, and give blocks the same group to page through them in one zoomed view with a strip at the bottom:

![Dashboard](dashboard.png)

::zoom{group="tour" title="Step one"}
Any Markdown: code, callouts, tables.
::

The zoomed view grows out of the item's place on the page. Escape, Back, and a click around it close it; arrow keys and the strip page through a group; Enter or Space opens a focused item. zoom({ images: false }) leaves images alone, except those you mark with {data-zoom}, and {zoom=false} keeps one image from zooming. Add data-zoom-src to an image to load a larger file when it zooms; the page's image shows until it loads.

Images in data URIs get their width and height while parsing, so the page keeps their room before they load. zoom({ size: true }) also measures remote images with range requests. Enable it only for trusted documents, since requests follow redirects and can reach private networks. zoom({ size: false }) turns measurement off. An image with one pixel side gets the other at the file's ratio; both sides, or a side like 50%, are kept. measure() from comark-zoom/size needs { remote: true } to fetch URLs.

Renderers

| Renderer | Import | | --- | --- | | @comark/html | comark-zoom/html: the script is inlined | | @comark/vue | comark-zoom/vue | | @comark/react | comark-zoom/react | | @comark/svelte | comark-zoom/svelte |

Each entry exports the parse plugin as default and the renderer's components. Without a renderer, call start() from comark-zoom/client once on a page with data-zoom elements; it returns a function that stops it.

Customize

The zoomed view fires comark-zoom:open, comark-zoom:change, and comark-zoom:close on the item. open and change carry the dialog's header, footer, and a layer sized to the zoomed content, so a host can add its own controls or draw pins over it, plus copyOf(element) and originalOf(element) to go between the page and the zoomed copy.

An item that needs styles from its ancestors names them with data-zoom-context, a selector: the copy goes inside empty copies of every ancestor that matches. data-zoom-aside, another selector, puts a copy of that element beside the zoomed item at its own size, such as a caption.

The styles follow shadcn/ui: they read its CSS variables, such as --background and --border, when the page has them, and use its neutral theme otherwise. Set --comark-background, --comark-foreground, --comark-muted, --comark-border, --comark-accent, --comark-ring, --comark-radius, or --comark-font to theme zoom, carousel, and annotate at once; the rules sit in a comark CSS layer, so any plain rule of your own wins. See Theming for the Nuxt UI mapping. To theme only the zoomed view, set the tokens on .cz-dialog, and change the backdrop with --cz-backdrop or --cz-backdrop-opacity; see the zoom's Theming page.