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

@sctg/tracespace-view

v5.1.6

Published

Probably the best Gerber viewer on the internet

Readme

tracespace view

https://tracespace.io/view

Probably the best Gerber viewer on the internet. @sctg/tracespace-view uses the pcb-stackup library to render Gerber and NC drill files as SVGs in your browser, without ever sending your files to a server.

Your renders are saved locally, so you can check out your boards without constantly having to re-upload your Gerber files.

embedding as a React component

The package exports <TracespaceViewer>, a self-contained React 19 component. See the main README for full usage instructions.

Quick start:

import '@sctg/tracespace-view/style.css'
import {TracespaceViewer} from '@sctg/tracespace-view'

export default function MyPage() {
  return (
    <TracespaceViewer
      showLoadFiles={false}
      showAnalyticsOptin={false}
      file="/boards/my-board.zip"
    />
  )
}

Props summary:

| Prop | Type | Default | Description | |------|------|---------|-------------| | showNav | boolean | true | Show/hide the top navigation bar | | showPageTitle | boolean | true | Show/hide the page title | | showPageTitleLogo | boolean | true | Show/hide the tracespace logo | | pageTitle | string | "tracespace" | Main title text | | pageSubtitle | string | "view" | Subtitle text | | showLoadFiles | boolean | true | Show/hide the file upload interface | | file | string \| File \| Blob \| Array<File \| Blob> | — | File(s) to load programmatically | | useStorage | boolean | false | Persist state in IndexedDB | | showAnalyticsOptin | boolean | false | Show/hide the analytics opt-in modal on first visit |

Building the library bundle:

npm run build:lib

This generates lib/index.js (pre-compiled ESM) and lib/style.css (pre-built Tailwind styles). The worker is inlined as a base64 blob so no separate asset file is needed.

architecture

The app is very similar to a typical React + Redux application. A central state store is available all through-out the app, and much of the UI is derived directly from that state.

The state can be changed by dispatching a specific action to the store, which will fold the action into the state. As the action is being processed, it will pass through a series of middleware that can trigger side-effects, like triggering a render.

For more information, see the state module

styling

The app uses Tailwind CSS 4.2.4 through the official @tailwindcss/vite 4.2.4 plugin. Global styling is defined in src/styles/index.css, including the app theme via Tailwind's @theme directive.

Component styling lives directly in TSX as Tailwind utility classes. The old Tachyons stylesheets and local reset.css, skins.css, and animation.css files have been removed.

rendering

The app runs pcb-stackup and various file reading libraries in a separate thread from the main UI via a Web Worker. The render worker responds to and emits application store actions via the [render middleware][render-middleware]/

For more information, see the render module.

local storage

Source files and their associated renders, as well as application preferences, are stored locally using IndexedDB. The app has two databases:

  • BoardDatabase
    • Accessed exclusively by the render worker
    • Stores board information, layer information, and source files
  • AppDatabase
    • Accessed from the main UI thread via the settings middleware
    • Stores application preferences and information

analytics

The tracespace view application collects anonymous usage data if you opt-in to tracking. See the analytics module for more information

debugging

To debug the application state, you can change the app's log level using your browser's JavaScript console:

localStorage.setItem("logLevel", "debug");

Available log levels are:

  • debug (default in development)
  • info
  • warn (default in production)
  • error

At logLevel: 'debug', all actions and state changes will be logged