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

@snowcone-app/chat-contracts

v0.3.0

Published

Wire contract for the Snowcone chat orchestrator — AI SDK UIMessage data-part payloads and UI Message Stream chunk types, shared by the backend emitter, www /create, and third-party chat clients.

Readme

@snowcone-app/chat-contracts

Types for the Snowcone AI design-chat wire contract.

Snowcone's chat endpoint (POST https://api.snowcone.app/ai-generations/chat/stream) speaks the AI SDK UI Message Stream protocol over SSE, so any AI SDK v5+/v6 client (useChat, assistant-ui, …) can consume it directly. This package is the typed contract for what streams back: the data-part payloads (generated images, product suggestions, mockup cards, committed designs, progress stages) and the chunk union.

Full integration guide: https://developers.snowcone.app/guides/ai-chat

Install

npm install @snowcone-app/chat-contracts

Typing your messages

import { useChat } from "@ai-sdk/react";
import type { UIMessage } from "ai";
import type { SnowconeChatDataParts } from "@snowcone-app/chat-contracts";

type SnowconeUIMessage = UIMessage<never, SnowconeChatDataParts>;

const { messages, sendMessage } = useChat<SnowconeUIMessage>({ /* … */ });

Every part in message.parts is then discriminated: data-images, data-products, data-mockup, data-design, plus the transient data-stage progress labels.

Data parts

| Part type | Payload | Meaning | |---|---|---| | data-images | ChatImagesData | AI-generated or processed artwork this turn (image count varies by pipeline — don't assume a fixed grid) | | data-products | ChatProductsData | Product suggestions from catalog search — price/lowestPrice are integer USD cents (3772 = $37.72) | | data-mockup | ChatMockupData | A product mockup preview card, including the variantId it was rendered for | | data-design | ChatDesignData | Result of an explicit save/commit | | data-stage | ChatStageData | Transient progress label ("generating image", …) — rendered live, never persisted |

A data-mockup part carries viewUrl/editorUrl only for a committed design; a stateless preview has neither, and your UI should offer a Save affordance instead (the orchestrator never auto-commits). When committing, pass the part's variantId along so the saved design renders the same variant (color) the user previewed.

Server helpers

UI_MESSAGE_STREAM_HEADERS, encodeSseChunk, and encodeSseDone are the SSE framing helpers Snowcone's backend uses to emit the protocol. You only need them if you re-emit or transform the stream; a pass-through proxy (the normal integration) does not.

License

MIT