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

@docviewkit/viewer

v0.2.59

Published

Browser-local, read-only Office and PDF Viewer Web Component

Readme

DocViewKit Viewer

Free, high-performance, lightweight document viewing—right in your browser.

DocViewKit Viewer is a browser-local, read-only Web Component for Office, PDF, OpenDocument, iWork, WPS Office, XPS, CSV, and RTF files. It uses a compact core with on-demand format packs for fast, responsive viewing across Chrome, Edge, Firefox, and Safari. Document bytes stay in the browser.

Install

npm install @docviewkit/viewer
import "@docviewkit/viewer";

const viewer = document.querySelector("docviewkit-viewer");
await viewer.open(file);

First-open performance

Configure optional formats before the first open() and start their small JavaScript dispatcher import early:

import "@docviewkit/viewer";

const formatPack = import("@docviewkit/viewer/extended-formats")
  .then(({ extendedFormatPack }) => extendedFormatPack);

const viewer = document.querySelector("docviewkit-viewer");
viewer.config = { engine: { formatPack: () => formatPack } };
await viewer.open(file);

Only the Wasm module matching the detected document family is then loaded. Use wps-formats or xps-formats when the product accepts only that optional family. Serve versioned runtime assets with HTTP caching, reuse the Viewer with close() between documents, and avoid preloading every Wasm module or starting all-page rendering and document-wide search before first paint.

Why DocViewKit

  • Free to use: every supported format is available in the free Viewer.
  • High performance: documents are parsed and rendered locally without a conversion service.
  • Lightweight by design: the compact core and optional format packs keep unused capabilities out of the startup path.
  • Broad compatibility: one Viewer covers modern and legacy document formats across major browser engines.
  • Fast and responsive: local processing, lazy loading, and incremental rendering keep viewing interactions immediate.
  • Frontend-only: the component runs entirely in the browser and requires no backend service.
  • Private by default: normal viewing never uploads document bytes.

Licensing

Free Viewer requires no license and keeps the fixed DocViewKit Free brand in the status bar. Commercial licenses add white-label presentation, API text watermarks, deeper integration, and support options; Free Viewer does not render configured watermarks. Commercial plans do not unlock additional document formats.

  • Online demo: https://docviewkit.com/en/demo/
  • Commercial license requests: https://docviewkit.com/en/portal/
  • Releases: https://github.com/docviewkit/viewer/releases
  • Bug reports: https://github.com/docviewkit/viewer/issues
  • Format boundaries: https://docviewkit.com/docs/supported-formats/

This package contains compiled artifacts, not product source code. See FREE_VIEWER_LICENSE.md and THIRD_PARTY_NOTICES.md. Do not attach confidential documents to public issues; follow SECURITY.md for security reports.