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

@animated-waffle/react

v0.2.3

Published

React hook and Avatar renderer for Narya Animated Waffle talking Agents. Re-exports @animated-waffle/client.

Readme

@animated-waffle/react

React hook and Avatar renderer for embedding a published Narya talking Agent. This package depends on and re-exports the whole of @animated-waffle/client, so React applications install only this package.

The Agent owns its avatar, voice, and prompt. Pipecat, Daily, API routes, and avatar asset URLs are SDK implementation details. The renderer loads the Avatar bound to the Agent session; callers do not pass an avatarUrl. Production is the default API origin. Tests and non-production integrations may pass apiOrigin; the SDK still owns the Agent session route.

Use

Keep the permanent workspace API key on your server. Exchange it for a short-lived Agent session token and give the hook a callback that obtains one for each connection:

import { AvatarStage, useWaffle } from '@animated-waffle/react'

const waffle = useWaffle({
  agentId,
  inputAudioEnabled: false, // Text-triggered, output-only application.
  sessionToken: () => getSessionToken(agentId),
})

return <AvatarStage {...waffle.avatar} style={{ width: 480, height: 480 }} />

The hook returns the app-facing client surface (status, session, transcript, agentSpeaking, error, connect, disconnect, sendText, and the push-to-talk controls) plus the opaque avatar binding for AvatarStage and the avatarLoad projection. Transport audio tracks are not part of this default React API. Its action functions keep stable identity across renders, so effects and event subscriptions can depend on them directly.

AvatarStage owns the renderer lifetime. Session disconnects, reconnects, and replacements only rebind performance signals; they do not remove the visible canvas. Model replacement reuses the stage, so the previous avatar stays visible until the replacement model is ready. The stage is destroyed only when its host component unmounts.

waffle.avatarLoad reports the Agent avatar's loading state:

const label = waffle.avatarLoad.fromCache
  ? 'Loading cached avatar…'
  : waffle.avatarLoad.progress === null
    ? 'Downloading avatar…'
    : `Downloading avatar… ${Math.round(waffle.avatarLoad.progress * 100)}%`

The first VRM download is streamed with byte progress. The SDK verifies the model against the content hash supplied by the Agent session and stores it in browser Cache Storage. Later sessions reuse that content even though their short-lived asset URL is different.

See the SDK documentation for the complete integration guide.