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

gridline-viewer

v0.3.1

Published

Embeddable React and Next.js Excel viewer powered by a local Rust/WebAssembly engine

Readme

gridline-viewer

Gridline Viewer is an embeddable, read-only Excel workbook viewer for React and Next.js. Workbook bytes stay in the browser: a Web Worker runs the from-scratch Rust/WebAssembly OOXML engine and a virtualized Canvas surface paints the visible cells.

Install

npm install gridline-viewer

For Next.js 16, compose the supplied configuration helper. Gridline works with the default Turbopack development and production pipelines:

// next.config.ts
import type { NextConfig } from "next";
import { withGridline } from "gridline-viewer/next";

const nextConfig: NextConfig = {
  reactStrictMode: true,
};

export default withGridline(nextConfig);

For Next.js 15 or an application that explicitly uses Webpack, select the compatibility mode and run Next.js with --webpack:

export default withGridline(nextConfig, { bundler: "webpack" });

withGridline gives worker assets a release-versioned HTTP path so browser upgrades cannot reuse an immutable worker bootstrap cached by an earlier Gridline release. If the application sends a Content Security Policy, script-src must contain 'wasm-unsafe-eval' on both document and worker responses. Use a global header matcher (or explicitly cover Next.js worker assets under /_next/static/) and keep the broader JavaScript 'unsafe-eval' token disabled. See the repository README for a complete Next.js example.

Render the viewer from a client component:

"use client";

import { GridlineViewer } from "gridline-viewer";

export function WorkbookPage({ file }: { file?: File }) {
  return <GridlineViewer initialFile={file} />;
}

For an embedded read-only financial model, use compact mode and open the desired worksheet directly:

<GridlineViewer
  mode="compact"
  initialSheet="Dashboard"
  source={{ type: "url", url: signedWorkbookUrl, name: "Atlas.xlsx" }}
/>

Compact mode keeps accessible sheet switching and zoom while removing branding, the repeated workbook title, editor-like controls, duplicate sheet navigation, the status bar, and file actions owned by the embedding platform. Its desktop chrome uses 76px instead of the full viewer's 234px.

initialSheet accepts a case-insensitive sheet name or zero-based index. defaultSheet is an alias; initialSheet takes precedence. Use the optional chrome prop to override any surface individually:

<GridlineViewer
  mode="compact"
  initialSheet="Dashboard"
  chrome={{ sheetRail: true, sheetTabs: false, exportButton: true }}
/>

The package exports GridlineChromeOptions, GridlineInitialSheet, and GridlineViewerMode. Available chrome controls are topBar, branding, title, toolbar, formulaBar, sheetRail, sheetTabs, statusBar, openButton, exportButton, workbookMenu, and zoom.

The package also exports cloud/resolver source types, browser-side encryption helpers, GridlineController, and the lower-level worker client. Remote URLs are fetched by the browser and remain subject to CORS; embedding platforms should allowlist origins and use short-lived read-only URLs.

Full integration and security documentation lives in the Gridline repository.