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

@industream/timeline

v1.1.0

Published

The @industream timeline as a framework-agnostic Web Component (<industream-timeline>). Self-contained bundle (React + styles inside a Shadow DOM). Works in Angular, Vue, vanilla — no React or Tailwind setup required.

Readme

@industream/timeline

The @industream timeline as a framework-agnostic Web Component<industream-timeline>: a band with a movable snapshot point, a resizable [from, to] window, zoom, and Live / Timelapse modes. It only produces times — it fetches nothing and has no API coupling.

Self-contained: React, the widget, and its styles are bundled inside a Shadow DOM. The host provides nothing — no React, no Tailwind, no CSS setup. Works in Angular, Vue, Svelte, vanilla… or a React app.

Building a React app? If you can consume the source package, prefer @industream/timeline-react: you avoid a second React runtime and get typed hooks (useSnapshot, useStartDate…) instead of DOM events.

Install

npm i @industream/timeline

Usage

A single side-effect import registers the <industream-timeline> element globally:

import "@industream/timeline";

Then drop it anywhere. Drive it with attributes, read it back through events.

Attributes

| Attribute | Values | Default | Meaning | | --- | --- | --- | --- | | language | en | fr | de | en | UI language. | | instant | boolean (presence) | — | Show the snapshot instant T (playhead + value bubble). | | window | boolean (presence) | — | Show the [from,to] window and its start/end fields. | | modes | space-separated live timelapse (absent = all; "" = Historic only) | all compatible | Animated modes on top of Historic (always on). timelapse auto-adds instant+window while it runs. | | theme | light | dark | light | Built-in colour theme. | | step-loading | boolean | off | Tells timelapse a snapshot is still loading, so playback waits for your data. |

If neither instant nor window is present, both default on (bare <industream-timeline> = full timeline). Historic is always on; modes lists only live / timelapse (omit the attribute for the default, "" for Historic only). Listing historic or an unknown mode throws; timelapse never throws — it auto-adds any missing content while it runs. See the full guide for every combination.

One property (an object, so set it in JS, not as an attribute): el.preview = { points, min, max } — an optional series drawn faintly across the band.

Events

All fire as CustomEvents (they bubble and cross shadow boundaries). Times are epoch milliseconds in event.detail.

| Event | detail | Fires when | | --- | --- | --- | | snapshotchange | { snapshot } | the "as of" instant changes (debounced). | | windowchange | { from, to } | the window bounds change (debounced). | | extentchange | { from, to } | the full navigable extent changes. |

Angular

import { Component, CUSTOM_ELEMENTS_SCHEMA, signal } from "@angular/core";
import "@industream/timeline";

@Component({
  selector: "app-root",
  schemas: [CUSTOM_ELEMENTS_SCHEMA], // lets Angular accept the custom tag
  template: `
    <industream-timeline
      [attr.language]="language()"
      [attr.theme]="theme()"
      (snapshotchange)="onSnapshot($event)"
      (windowchange)="onWindow($event)">
    </industream-timeline>`,
})
export class App {
  readonly language = signal<"en" | "fr" | "de">("en");
  readonly theme = signal<"light" | "dark">("light");
  onSnapshot(e: Event) { const { snapshot } = (e as CustomEvent).detail; /* new Date(snapshot) */ }
  onWindow(e: Event) { const { from, to } = (e as CustomEvent).detail; /* … */ }
}

Vanilla

<industream-timeline language="en" theme="dark"></industream-timeline>
<script type="module">
  import "@industream/timeline";
  const el = document.querySelector("industream-timeline");
  el.addEventListener("snapshotchange", (e) => console.log(new Date(e.detail.snapshot)));
</script>

Theming

The widget ships a default theme. Flip it with theme="dark", or override the CSS variables from the host — they inherit through the shadow boundary:

industream-timeline { --primary: oklch(0.55 0.2 250); --radius: 0.3rem; }

License

ISC