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

@pennsieve-viz/core

v0.1.6

Published

Pennsieve visualization component library for scientific data

Readme

@pennsieve-viz/core

Pennsieve visualization component library for scientific data. Built with Vue 3, Pinia, and TypeScript.

Installation

npm install @pennsieve-viz/core

Peer Dependencies

The following peer dependencies must be installed by the host application:

| Package | Version | Required | |---------|---------|----------| | vue | ^3.2.0 | Yes | | pinia | ^2.0.0 || ^3.0.0 | Yes | | @duckdb/duckdb-wasm | ^1.29.0 | Yes (for DataExplorer, UMAP, ProportionPlot) | | plotly.js | ^2.35.0 | Optional (for AiPlotly) | | @aws-amplify/auth | ^6.0.0 | Optional (for authenticated data fetching) | | @pennsieve-viz/micro-ct | ^1.0.0 | Optional (for OmeViewer, TiffViewer) | | @pennsieve-viz/tsviewer | ^1.0.0 | Optional (for TSViewer) |

DuckDB Setup

@pennsieve-viz/core does not bundle or initialize DuckDB. The host application owns the DuckDB lifecycle and provides a store instance via Vue's provide/inject.

1. Install DuckDB

npm install @duckdb/duckdb-wasm

2. Create a DuckDB store

Your store must implement the DuckDBStoreInterface exported by this package:

import type { DuckDBStoreInterface } from '@pennsieve-viz/core'

The interface requires:

| Property / Method | Description | |-------------------|-------------| | isReady | Reactive boolean — components wait for this before operating | | createConnection(viewerId?) | Returns { connection, connectionId } | | closeConnection(connectionId) | Cleans up a connection | | loadFile(url, type, tableName?, csvOptions?, viewerId?, fileId?) | Loads a CSV/Parquet file into DuckDB, returns the table name | | executeQuery(query, connectionId) | Runs SQL, returns an array of row objects | | publishViewFromQuery(name, sql, connectionId) | Creates a DuckDB VIEW and updates shared state | | sharedResultName | Reactive string — the name of the last published view | | sharedVersion | Reactive number — incremented on each publish | | formatIdFromUrl(srcUrl) | Pure utility to derive a stable ID from a URL |

3. Provide the store at the app root

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import { useDuckDBStore } from './store/duckdbStore' // your store

const pinia = createPinia()
const app = createApp(App)

app.use(pinia)

// Provide DuckDB store for @pennsieve-viz/core components
const duckdbStore = useDuckDBStore()
app.provide('duckdb', duckdbStore)

app.mount('#app')

All core components inject the store with inject('duckdb'). If the store is not provided, components will throw a descriptive error.

Components

Production

| Component | Import | Description | |-----------|--------|-------------| | DataExplorer | import { DataExplorer } from '@pennsieve-viz/core' | SQL-powered data exploration for CSV/Parquet files | | UMAP | import { UMAP } from '@pennsieve-viz/core' | UMAP dimensionality reduction visualization | | Markdown | import { Markdown } from '@pennsieve-viz/core' | Markdown renderer | | TextViewer | import { TextViewer } from '@pennsieve-viz/core' | Plain text file viewer |

Lazy-loaded variants are also available: DataExplorerLazy, UMAPLazy, MarkdownLazy, TextViewerLazy.

Beta

| Component | Import | Description | |-----------|--------|-------------| | ProportionPlotBeta | import { ProportionPlotBeta } from '@pennsieve-viz/core' | Proportion/composition plot | | AiPlotlyBeta | import { AiPlotlyBeta } from '@pennsieve-viz/core' | AI-assisted Plotly charting |

External (lazy-loaded wrappers)

| Component | Import | Requires | |-----------|--------|----------| | TSViewer | import { TSViewer } from '@pennsieve-viz/core' | @pennsieve-viz/tsviewer | | OmeViewer | import { OmeViewer } from '@pennsieve-viz/core' | @pennsieve-viz/micro-ct | | TiffViewer | import { TiffViewer } from '@pennsieve-viz/core' | @pennsieve-viz/micro-ct |

Styles

Import the component styles in your app:

import '@pennsieve-viz/core/style.css'

A SCSS theme file is also available for customization:

@use '@pennsieve-viz/core/styles/theme.scss';

Cross-Component Communication

DataExplorer and UMAP share data through the DuckDB store:

  1. DataExplorer runs a query and calls publishViewFromQuery('umap_result', sql, connectionId)
  2. This creates a DuckDB VIEW and increments sharedVersion
  3. UMAP watches sharedVersion and sharedResultName to detect new data
  4. When those change, UMAP re-queries from the published view

This works because both components inject the same store instance via inject('duckdb').

License

MIT