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

comins-capture

v0.0.1

Published

Framework-independent static HTML capture with single-image and ISO/JIS paper output

Downloads

384

Readme

Comins Capture

Comins Brand

Browser-side static HTML capture for Vanilla JavaScript, React, Vue, and Svelte, built on one TypeScript core and a pinned SnapDOM engine. Capture a connected element once and export PNG, JPEG, Canvas, or foreignObject SVG at a requested scale, custom size, or ISO/JIS paper size. WebP requires native encoder support.

English docs · 한국어 가이드 · Capture website

0.0.1 — static HTML and single-output capture. The Capture website is a development introduction; current contracts are in this repository's guides.

PNG of the authored statement fixture including text, table, shadows and clipping

This is a real 620×560 PNG output from the 2026-10-15 Chrome benchmark, not a screenshot of the Playground. See preview provenance for its fixture, runtime and evidence limits.

Features

| Capability | What to try in the Playground | | --- | --- | | Single output | Generate and save PNG, JPEG, foreignObject SVG, or native-supported WebP. | | Scale and custom size | Compare CSS 1×, 2×, captured device DPR and custom 800×600 output. | | ISO/JIS paper | Select A3/A4/A5/B3/B4/B5, orientation and margins. Raster defaults to 300 PPI; SVG uses mm. | | Layout and background | Compare contain, cover, stretch and backgrounds. APIs also expose alignment and encoder quality. | | Snapshot reuse | Export several formats from one validated SVG without recapturing the source. | | Resources and lifecycle | Use default-deny resources, explicit origins or a Blob resolver, cancellation, timeout and disposal. |

The target is ordinary static HTML. Crop, tiles, partial output, full-page capture, Shadow DOM, form/scroll state and PDF are outside 0.0.1. See input and resources.

Installation

For the registry release, install the exact version in the consuming application. Before the version appears on npm, use the reviewed maintainer-provided tarball:

npm install --ignore-scripts [email protected]
# Offline candidate: npm install --ignore-scripts ./comins-capture-0.0.1.tgz

Use Node.js 24 or later and ESM. A browser bundler or application-owned import map must resolve the package root. There are no framework subpath packages or framework peer dependencies. Your application supplies its framework runtime.

Quick Start

Call capture after the target has rendered. Keep controls outside the target.

import {capture} from 'comins-capture';

const target = document.querySelector('#card');
if (!(target instanceof HTMLElement)) throw new Error('Missing capture target');
const snapshot = await capture(target);
try {
  const {value: blob, meta} = await snapshot.toBlob({
    format:'png',
    size:{kind:'paper', name:'A4', ppi:300},
    background:'#fff',
  });
  // Use blob and meta.width/meta.height; A4 is 2480×3508 px at 300 PPI.
} finally {
  snapshot.dispose();
}

toBlob() returns {value, meta}. Applications own and revoke the Blob URLs they create. Images and web fonts may require a resolver or explicit origin policy. The complete quick start includes HTML, download handling and cleanup.

Choose a framework

| Framework | Readiness and ownership | Guide | | --- | --- | --- | | Vanilla JavaScript | Connected HTMLElement and application cleanup | Vanilla | | React | ref, user event, effect cleanup; fresh owner per StrictMode setup | React | | Vue | ref, nextTick and onUnmounted | Vue | | Svelte | bind:this, tick and onDestroy | Svelte |

All frameworks import from comins-capture. Root import and paper calculation are DOM-free; capture itself requires a browser. The session helper is example code, not a public export.

Guides and API

import {paperSize} from 'comins-capture';
paperSize('A4'); // {width:2480, height:3508}; ISO, 300 PPI
paperSize('B4', {standard:'JIS', orientation:'landscape'});

Output options use system:'jis'; paperSize uses standard:'JIS'. PPI computes pixels without rewriting file DPI metadata. SVG contains foreignObject and is not a pure vector or design-tool interchange format.

Run the Playground locally

git clone https://github.com/kim1124/comins-capture.git
cd comins-capture
npm ci --ignore-scripts
npm run verify
npm run dev

Open the Capture Playground. Override the port with CAPTURE_PORT. The server has no HMR; rebuild after source changes. Reset restores defaults and clears results. node examples/geometry.mjs runs without a DOM.

0.0.1 scope

The initial release focuses on static HTML, single output, scale, custom sizes and ISO/JIS paper. Unfinished crop, tile and partial paths have been removed. Actual Chrome 155.0.8059.80 (headless, macOS/DPR2) passed 15 single-output/lifecycle/error and 15 resource/SVG checks on the reviewed runtime. Six engine regressions also passed, including zero implicit icon-font requests and large/downscaled images. The 64-node statement's capture-to-PNG measured p50 42.2 ms and p95 47.3 ms across 10 samples; 30 sequential captures had zero failures. Paper dimensions passed 24 ISO/JIS and orientation cases, with JIS values corroborated from public supplier/manufacturer tables. JISC login is not required for this dimension check.

Publication, remote CI and release closure remain separate steps. The exact artifact and source identity are recorded in the checkout's release worklog. See browser evidence and limits.

Browser support and limits

Chrome technical quality is conditionally accepted for the measured static scope. Native Safari is excluded because known shadow/clip failures remain. Edge, Firefox and physical mobile devices are unverified for this runtime. Installed browser metadata and WebKit tests do not establish native runtime support. Broad CSS, low-end systems, long-duration memory and full-image pixel equality are not guaranteed. Canvas is limited to 8192 px per side and 32,000,000 px total.

Repository guidance

The contribution guide, repository guide and release preparation are checkout-only maintainer documents. User references are distributed with the package.

License and support

MIT · Changelog · Issues · Comins Brand

The build supplies a pinned, minimally modified SnapDOM 3.2.0 engine behind an internal adapter, with upstream license and provenance. See third-party notices. Public declarations expose no engine types.