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

@simon_he/timeline-ui

v0.1.5

Published

Fixed-layout Vue 3 timeline component for AI agent transcripts. Host-owned content, CSS variable theming, TypeScript.

Readme

Timeline UI renders the stable skeleton of an agent turn: one group header, a vertical rail, rows, disclosure and detail shells. The host supplies every string, icon, panel and state transition.

TimelineGroup
├─ group header       icon / summary / chevron
└─ reveal
   └─ rail            1px vertical line
      └─ TimelineRow  icon / label / primary / chevron
         └─ details   loading | host panel | error

Design principles

  • Fixed group shell, replaceable row skin. The group header, rail and reveal are fixed. The default row is text/icon based, and a host can replace a whole row through the row slot when its card needs richer content.
  • No product coupling. No i18n, store, desktop API, MCP, markdown, diff or data-fetching dependency. vue is the only peer dependency.
  • Data in, events out. The host builds the view model, owns detail fetching and controls expansion when it wants to. The library never fetches or mutates host data.
  • Small public surface. TimelineGroup is the only public component. Row and detail primitives are internal implementation details.

Install

pnpm add @simon_he/timeline-ui vue
# or: npm install @simon_he/timeline-ui vue
import { TimelineGroup, type TimelineGroupVM } from '@simon_he/timeline-ui'
import '@simon_he/timeline-ui/style.css'

The style import is required. The JavaScript bundle has no CSS side effect because the library build extracts the stylesheet into style.css.

Quick start

<script setup lang="ts">
import { markRaw } from 'vue'
import { TimelineGroup, type TimelineGroupVM } from '@simon_he/timeline-ui'
import '@simon_he/timeline-ui/style.css'
import BookIcon from './BookIcon.vue'

const group: TimelineGroupVM = {
  summary: '1 tool',
  items: [
    {
      id: 'read-1',
      kind: 'tool',
      status: 'complete',
      label: 'Read file',
      primary: 'src/App.vue',
      icon: markRaw(BookIcon),
      detail: {
        status: 'loading',
      },
    },
  ],
}
</script>

<template>
  <TimelineGroup :group="group" :expanded="true" />
</template>

A detail starts in loading. When the host panel is ready, replace the whole detail object with a ready one. Start that transition from detail-toggle. The shell paints immediately, before the panel is available.

API at a glance

| Prop | Type | Default | Meaning | | --- | --- | --- | --- | | group | TimelineGroupVM | required | Complete group view model | | expanded | boolean \| undefined | undefined | Controlled group state; omit for internal state | | expandedItemIds | readonly string[] \| undefined | undefined | Controlled open row ids; omit for internal state | | lazyDetails | boolean | true | Do not mount a detail before its first open | | keepDetailsMounted | boolean | true | Keep a detail shell mounted after its first open | | unmountCollapsed | boolean | false | Unmount a large collapsed group's rail after the close transition | | lazyUnmountThreshold | number | 32 | Item count at which unmountCollapsed starts applying | | staggerEnter | boolean | false | Stagger newly added rail items with a per-index enter delay, capped at index 8 |

| Event | Payload | Meaning | | --- | --- | --- | | update:expanded | (expanded: boolean) | Group header was toggled | | update:expandedItemIds | (itemIds: string[]) | A row was toggled | | detail-toggle | (itemId: string, expanded: boolean) | A row toggled; start loading here | | detail-retry | (itemId: string) | The detail shell retry button was pressed | | activate | (itemId: string) | An activatable row without details was pressed |

Slots:

  • summary receives { group: TimelineGroupVM } and renders inside the group header button; it accepts phrasing content only.
  • group-extra receives { group } and renders below the header, outside the button. Use it for a collapsed thinking excerpt or similar status line.
  • row receives { item, expanded, toggle, index } and replaces the whole default row, including its header and detail. The host owns that row's content and interactions; call toggle to request an expansion change.
  • label and primary receive { item } and replace the default text inside a default row, for example to add search highlighting.

TimelineItemVM.data is an opaque host payload. The library never reads it; the row slot is the supported way to turn it into a richer row.

<TimelineGroup :group="group" :expanded="true">
  <template #row="{ item, expanded, toggle }">
    <HostToolRow
      v-if="item.kind === 'tool'"
      :data="item.data"
      :expanded="expanded"
      @toggle="toggle"
    />
    <button v-else type="button" @click="toggle">{{ item.label }}</button>
  </template>
</TimelineGroup>

The package exports TimelineGroup plus its public view-model and event types. TimelineRow, TimelineDetails, TimelineChevron and the fallback icon are internal. Deep imports are blocked by the package exports map.

Theming

All public knobs are CSS variables on .timeline-ui.

<TimelineGroup
  :group="group"
  :style="{
    '--timeline-ui-row-padding-y': '7px',
    '--timeline-ui-rail-color': '#c7d0da',
  }"
/>

<TimelineGroup :group="group" data-tone="dark" />

The library CSS is authored in @layer timeline-ui, so unlayered host CSS wins. Prefer tokens for normal customization. The full token list, dark values and live controls are in Docs: Theming.

Capping a long group

A group is unbounded: a host may append hundreds of rows to one group. Set --timeline-ui-group-max-height to keep the rail from pushing the rest of the page away; the rail then scrolls inside its own container. The default none keeps the unconstrained layout, and the header, summary and group-extra content stay outside the scroll area.

<TimelineGroup
  :group="group"
  :expanded="true"
  :style="{ '--timeline-ui-group-max-height': '420px' }"
/>

Documentation

The live Docs cover concepts, host boundaries, accessibility, browser support, the full type reference, slots, examples and every token:

Open the Lab to inspect group, row, details and token states live. The Docs and Lab are deployed from src/playground.

Development

Requires Node 20+ and pnpm 10.

pnpm install
pnpm dev        # Lab and Docs at http://localhost:4173
pnpm typecheck  # source, tests and configs
pnpm test       # Vitest + Vue Test Utils
pnpm build      # library -> dist/ (JS, CSS, rolled-up d.ts)
pnpm build:demo # Lab and Docs -> dist-demo/
pnpm preview    # preview the demo build

The Lab uses the public TimelineGroup entry, not a deep internal import. Its streaming player, stream-diffs panels and markstream-vue markdown are development dependencies only. They are not exported from the library entry or included in the published package.

Read CONTRIBUTING.md before opening a PR. Release steps live in RELEASING.md. Report vulnerabilities through SECURITY.md.

License

MIT. Copyright 2026 Simon He. See LICENSE and THIRD_PARTY_NOTICES.md.

The Lab and Docs use Gentleface animated icons (MIT, copyright 2026 Alexander Kiselev, original designer eric8810) and an original generated DSH big fat fish anime girl demo image. The deployed demo exposes the full notices at third-party-notices.html.