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

dive-video

v1.2.2

Published

DIVE is a framework for creating Interruptible Narrative Visualizations (INV). A <dive-video> web component that bridges curated data stories and interactive exploration.

Readme

DIVE (Directed Interactive Video/Visualisation Experience)

DIVE is a framework for creating "Interruptible Narrative Visualizations (INV)." It bridges the gap between curated, author-driven data stories (like videos) and user-driven exploratory tools (like interactive dashboards).

Core Concept

  • Watch Mode: An automated narrative plays, panning, zooming, and highlighting data to tell a specific story.
  • Explore Mode: Users can pause the narrative at any time to freely interact with and explore the underlying data using the native visualization tool's capabilities.
  • Resume Handoff: Resuming playback instantly snaps the visualization back to the curated narrative path, continuing the story seamlessly.

Architecture Overview

  • Library Agnostic: Uses an Adapter Pattern to integrate with any interactive library (e.g., D3.js, Apache ECharts, Mapbox).
  • Web Component: Delivered as a Custom Web Element (<dive-video>) for simple integration and encapsulation.
  • State Management: A Sequencer and Virtual State Cache maintain perfect synchronization between the narrative timeline and the interactive chart.

For full technical details, see the DIVE Framework Specification.

Install

npm install dive-video

The package name is dive-video because dive is already taken on npm. Importing the module registers the <dive-video> custom element.

import 'dive-video';

Or import the public API:

import { registerTool } from 'dive-video';

CDN

After a version is published to npm, jsDelivr and unpkg serve it automatically:

Live demo (GitHub Pages): https://adamridley.github.io/DIVE/

The demo loads dive-video from jsDelivr and plays a same-origin wealth.dive pack.

<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/dive.js"></script>
<dive-video src="./wealth.dive"></dive-video>

Classic (non-module) script tag:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/dive.iife.js"></script>
<dive-video src="./story.json"></dive-video>

The IIFE build exposes window.DIVE (DiveVideo, registerTool, Sequencer).

Story JSON can include aspectRatio (default 9:16), audio (URL or clip objects), and captions (WebVTT URL or { startTime, endTime, text } cues). If you only set the element's width, it sizes its height from the aspect ratio and letterboxes when the box is forced (explicit height or fullscreen).

Local development

npm ci
npm run dev
  • PoC: http://localhost:5173/
  • Wealth and Health example: http://localhost:5173/examples/the_wealth_and_health_of_nations/
npm run test:ci          # typecheck + library build + dist smoke check
npm run build            # ESM + IIFE + typings → dist/
npm run build:example    # example site → dist-example/

CI/CD

This repository now includes two GitHub Actions workflows:

  • .github/workflows/ci.yml

  • Runs on pull requests and pushes to main.

  • Installs dependencies with npm ci.

  • Runs npm run test:ci (typecheck + production build).

  • Performs a Docker smoke build for examples/the_wealth_and_health_of_nations/Dockerfile.

  • .github/workflows/pages.yml

  • Runs on pushes to main and on manual dispatch.

  • Packs wealth.dive and deploys a static demo to GitHub Pages (CDN player + same-origin pack).

  • .github/workflows/release.yml

  • Runs on tags matching v*.*.* and on manual dispatch.

  • Builds the library (dist/dive.js, dist/dive.iife.js) and publishes it to npm as dive-video.

  • Publishes release artifacts (dist.tar.gz, dist-example.tar.gz) to GitHub Releases.

  • Builds and pushes the example Docker image.

Uses npm trusted publishing (OIDC) from this workflow. No NPM_TOKEN secret. The trusted publisher on npm must allow release.yml in AdamRidley/DIVE.

Release image registry settings

By default, the release workflow pushes to ghcr.io.

To push to a custom/private registry, configure these GitHub repository settings:

  • Variables: DOCKER_REGISTRY, DOCKER_IMAGE_REPO (example: dive-example or myorg/dive-example, must be lowercase)
  • Secrets: DOCKER_REGISTRY_USERNAME, DOCKER_REGISTRY_PASSWORD

Triggering a release

Create and push a semantic version tag:

git tag v1.0.0
git push origin v1.0.0