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

interactions-timeline

v1.0.1

Published

A page timeline recorder and interactive visualizer with time-scrubbing for CSS animations, CSS transitions, WAAPI, Scroll-Driven Animations, scroll positions, and user interactions

Readme

<interactions-timeline>

A zero-dependency Web Component (<interactions-timeline>) with Shadow DOM encapsulation that records and visualizes a page's timeline:

  • CSS Animations (animationstart, animationiteration, animationend, animationcancel, including delays, iterations, and infinite animations)
  • CSS Transitions (transitionrun, transitionstart, transitioncancel, transitionend, including delays between transitionrun and transitionstart)
  • Web Animations API (element.animate()) & Active Animations via document.getAnimations()
  • Scroll-Driven Animations (ScrollTimeline and ViewTimeline) with progress visualization over the recorded time axis
  • User Interactions & Scroller Positions (click, scroll, keydown, keyup, and scrollTop/scrollLeft on both window/root and scrollable elements)
  • Disconnected DOM Elements (!element.isConnected), rendered as greyed-out rows with a warning badge and outline duration boxes/markers
  • Full Time-Scrubbing: Pauses all page animations and transitions when the bottom-sheet visualizer opens, and lets you scrub the playhead backward and forward through the page's visual history (re-creating completed CSS transitions and one-shot animations from snapshotted keyframes and timing). Closing or resetting the visualizer restores and unpauses the page back to its normal interactive state.

👉 Live Demo & Documentation: https://interactions-timeline.netlify.app


Features

  • Shadow DOM Encapsulation & Subtree Exclusion: The top-right recorder button and collapsible/resizable bottom sheet live inside <interactions-timeline>'s Shadow DOM. All clicks, scrolls, and UI animations inside the recorder itself are explicitly ignored during recording and pausing.
  • Pinned Global Row & Element Rows: Features a pinned window / document row for root scroll and global keyboard events alongside rows for each tracked element (tag#id.class). Hovering an element row highlights the element on the page if still connected.
  • Color-Coded Lifecycle Markers: Duration boxes match the recorded duration on the timeline and display color-coded lines for run (cyan), start (green), iteration (amber), end (blue), and cancel (red), plus an inline SVG progress sparkline and a Time / ScrollTimeline / ViewTimeline badge.
  • Removed Element Detection: Uses a MutationObserver to track if/when a recorded element is removed from the DOM (!element.isConnected), greying out its row, displaying a ⚠️ Removed warning indicator, and rendering its recorded boxes and events as outlines.
  • Interactive Playhead Scrubber: Drag the playhead or slider to seek both scroller offsets (scrollTop, scrollLeft) and animation/transition frames (currentTime or percentage progress for scroll-driven animations) without triggering new recording events.

Quick Start

1. Installation

npm install interactions-timeline

2. Usage

<script type="module" src="interactions-timeline"></script>

<!-- Optional: explicitly place in DOM (auto-mounted if omitted) -->
<interactions-timeline></interactions-timeline>

JavaScript API

| Method / Property | Description | |---|---| | startRecording() | Starts recording page animations, transitions, scrolls, interactions, and DOM removals. | | stopRecording() | Stops recording, pauses all page animations/transitions, and opens the bottom-sheet timeline visualizer. Returns the TimelineStore. | | scrubToTime(ms) | Seeks all recorded scrollers and animations/transitions (including re-created completed transitions/animations) to ms relative to recording start. | | toggleCollapse() | Collapses or expands the bottom-sheet visualizer. | | setSheetHeight(px) | Resizes the bottom-sheet height in pixels. | | closeVisualizer() | Closes the bottom sheet and restores/unpauses all page animations back to normal. | | reset() | Clears recorded data, closes the bottom sheet, and restores the page to its normal interactive state. |


Development & Testing

# Start local demo server
npm start

# Run unit and end-to-end Puppeteer tests
npm test

# Build ./dist for publishing
npm run build

License

MIT © Bramus Van Damme