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

@vitral/chat

v0.2.0

Published

Framework-free chat for Vitral: the engine (messages, grouping, streaming, the composer) and a DOM renderer with roving focus and live announcements, which the Vue, React and Angular components wrap.

Readme

@vitral/chat

A conversation with no framework in it: the engine and a DOM renderer, which the Vue, React and Angular components wrap.

import { createChat } from '@vitral/chat';

const chat = createChat(element, {
    messages: [{ id: 1, role: 'assistant', content: 'How can I help?' }],
    on: {
        send: ({ text }) => answer(text),
        'draft-change': (draft) => chat.update({ draft })
    }
});

chat.update({ messages });
chat.destroy();

It draws a real list — one item a message, runs of one speaker grouped so a thread reads as speech rather than as rows. The log is one tab stop with a roving focus inside it (the arrows move a message, Home and End jump), so a thread of two hundred messages does not bury the composer behind two hundred tab presses.

A message marked streaming grows in place with a caret after the last character, and is announced only once it settles: a live region that changed on every token would say nothing a screen reader could follow.

The thread follows the newest message as messages arrive, but only while the reader is already at the bottom — scrolling someone away from what they were reading is the one thing an auto-scrolling log must never do. When they have scrolled off, a button offers to take them back.

Shapes

variant decides the shape, not the colours:

| variant | for | | --- | --- | | basic | the plain thread, for a page that is the conversation | | messenger | two people: both sides get a bubble and an avatar | | copilot | a narrow column beside the work; no bubbles, no avatars | | agent | an assistant that uses tools, so the steps it took are shown | | widget | a launcher and a panel that opens over the page | | captions | a running transcript, for speech as it is recognised |

The classes and tokens are @vitral/styles' chatStyle, so a thread follows whatever preset the page is themed with.