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

@alternatefutures/chat-ui

v0.2.0

Published

AlternateFutures shared chat UI — presentation-only ChatView (message list, composer, members, search, typing) with injected transport + renderBody. No crypto, no transport. Built on @alternatefutures/ui + tokens.

Downloads

26

Readme

@alternatefutures/chat-ui

The shared, presentation-only chat room for AlternateFutures apps. ChatView renders the full experience — message feed (grouping, replies, edits, deletes, mentions, search), member roster, undecryptable banner, composer, and a typing indicator — while every app injects its own transport and crypto.

It owns no WebSocket, no LiveKit, no keys. You pass it decrypted messages and callbacks; it calls onSend/onEdit/onDelete/onTypingChange back.

Install

npm install @alternatefutures/chat-ui @alternatefutures/ui @alternatefutures/tokens

Peers: react/react-dom 19, lucide-react, Tailwind v4. Add the kit to your Tailwind sources:

@import "tailwindcss";
@import "@alternatefutures/tokens/theme.css";
@source "../node_modules/@alternatefutures/ui/dist";
@source "../node_modules/@alternatefutures/chat-ui/dist";

Usage

import { ChatView } from "@alternatefutures/chat-ui";

<ChatView
  roomLabel={label}
  status={status}
  messages={messages}      // ChatMessage[] — your decrypted data mapped to the kit's shape
  events={events}          // join/leave SystemEvent[]
  members={members}
  me={{ username, fingerprint, pubkey }}
  creatorPubkey={creatorPubkey}
  undecryptable={undecryptable}
  typing={typing}          // TypingUser[] — the local user is filtered out
  renderBody={(text, { myName }) => renderMarkdown(text, myName)}  // injected — keeps markdown deps per-app
  onSend={(text, replyTo) => hook.send(text, replyTo)}
  onEdit={(ref, text) => hook.editMessage(ref, text)}
  onDelete={(ref) => hook.deleteMessage(ref)}
  onLeave={leave}
  onTypingChange={(active) => transport.setTyping(active)}  // for the is-typing feature
  footer={<BrandFooter />}  // per-app brand/logo
/>

What's shared vs per-app

  • Shared (here): the entire view + interaction logic, identity colors (makeColorOf/seedColor re-exported from tokens), the typing indicator UI.
  • Per-app (injected): transport (relay hook for chat, LiveKit data adapter for connect), crypto, renderBody (markdown), the footer/brand, and the optional onCaretSpark flair.

Exports

ChatView, ChatMessageList, ChatInput, ChatAvatar, TypingIndicator, makeColorOf, seedColor, AVATAR_COLORS, initials, and the structural types (ChatMessage, Member, SystemEvent, TypingUser, Me, MsgRef, ConnStatus, RenderBody).