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

visio-vanilla-viewer

v0.5.2

Published

Local-first Visio viewer for vanilla

Readme

visio-vanilla-viewer

npm version license types

A browser Visio .vsdx viewer for a browser with ES modules and a bundler such as Vite. This package ships the functional viewer and its framework adapter.

Live demo | npm | Full docs | Source

Install

npm install visio-vanilla-viewer

Quick start

import { mountViewer } from 'visio-vanilla-viewer';

const host = document.createElement('div');
host.style.height = '600px';
const input = document.createElement('input');
input.type = 'file';
input.accept = '.vsdx';
document.body.append(input, host);

const viewer = mountViewer(host, { showToolbar: true });
input.addEventListener('change', async () => {
	const file = input.files?.[0];
	if (file) await viewer.load(file);
});
// Call viewer.destroy() when the host is removed.

Features

| Feature | Description | | ---------- | ------------------------------------------------------------------- | | Viewing | One SVG renderer, page selection, zoom, layers and text search. | | Editing | Core-validated text and geometry operations with bounded undo/redo. | | Export | Source-backed VSDX copies, static SVG and print snapshots. | | Frameworks | One shared <visio-viewer> UI behind six adapters. |

API

The shared properties are document (a parsed VisioDocument, or null to clear), pageIndex (zero-based), zoom (1 means 100%), showToolbar and events. The callback map uses document-load, document-change, document-error, page-change, zoom-change and shape-select. File loading uses the imperative load(File | Blob | Uint8Array | ArrayBuffer) handle; document is not a file URL. Provide a height for the viewer host. Mount and load files in the browser.

The handle supports fit(), replacePlainText(pageId, shapeId, text), applyEdits(edits), undo(), redo() and exportVsdx(). exportVsdx() returns { bytes, dirty, diagnostics }; saving or downloading those bytes is the application's responsibility. Load original bytes through load() to enable source-backed editing and export. Handles are usable after mount.

Every viewer package includes the same browser UI and re-exports the visio-core document API. Parsing and editing belong to ooxml-core/visio; framework bindings only manage lifecycle, properties and events.

Limitations

Rendering and editing are beta features. Supported text and geometry edits are bounded by core validation; unsupported operations reject and diagnostics report limitations. Native Visio layout parity and lossless export are not established. Files stay in the browser unless your application sends them elsewhere.

Documentation

Viewer guide | Demo | Source

For direct custom-element use, call registerVisioViewer() from this package, then create a <visio-viewer> element and call its load() method. Registration is explicit; importing the package does not register the element.

License

Apache-2.0.