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

@clipkit/patterns

v1.0.0

Published

Authoring-time pattern library for Clipkit — composable motion-graphics units that emit primitive Source elements.

Downloads

117

Readme

@clipkit/patterns

Authoring-time pattern library for ClipKit — composable motion-graphics units that emit primitive Source elements.

npm install @clipkit/patterns

Patterns are TypeScript functions that take parameters and a named theme, returning arrays of primitive ClipKit protocol elements (text, shapes, groups). Use them to author data visualizations (stat blocks, bar charts, ranked lists), cinematic scenes (hero reveals, glass panels), and component units (lower thirds, tilted showcases). Each pattern is a reusable authoring-time abstraction; the runtime sees only the primitive elements it emits.

promo() is the sequence composer — it assembles multiple scene builders into a complete, renderable Source, handling timeline sequencing, crossfades, theme webfont registration, and shared camera + motion blur setup.

Usage

import { statBlock, barChartRow, promo } from '@clipkit/patterns';

// Define scenes as builders that receive composer-assigned timing and dimensions
const scenes = [
  {
    duration: 3,
    build: (ctx) => {
      const elements = [];
      elements.push(...statBlock({
        id: 'stat-1',
        current: 2400,
        previous: 1840,
        label: 'Total views',
        color: 'blue',
        theme: 'mux',
        x: 200,
        y: 100,
        width: 400,
        time: ctx.time,
        duration: ctx.duration,
        layerBase: ctx.layer,
      }));
      return { type: 'group', id: ctx.id, elements };
    },
  },
];

// Compose into a renderable Source
const source = promo({
  scenes,
  theme: 'mux',
  width: 1280,
  height: 720,
});

API

Data patterns — single-unit visualizations, return Element[]:

  • statBlock(props) — themed number + label + optional trend indicator
  • barChartRow(props) — animated horizontal bar + value + label
  • rankedList(props) — ranked items with positions and optional values
  • pieCard(props) — pie chart segment visualization
  • headerBar(props) — full-width header bar for data scenes

Scene builders — full-frame compositions that take SceneCtx:

  • statsScene, barsScene, rankingScene, pieScene — pre-built data-dashboard layouts

Component patterns — reusable UI units:

  • introCard, lowerThird, tiltedShowcase, cameraOrbit, litSurface, heroReveal, glassPanel, ctaOutro, kineticHeadline

Composer:

  • promo(opts) — sequence scenes + theme into one renderable Source

Theming:

  • THEMES — named bundles (mux, minimal, cinematic)
  • getPalette(theme, color) — fetch color palette for a theme + color slot
  • getFonts(theme) — fetch font family names for sans / mono / display

Beat-sync utilities — map @clipkit/music-analysis BeatMap to motion:

  • pulseToTempo, accentOnBeats, snapToBeat, revealOnBeat, slideOnBeat

Helpers:

  • liquidMorph — shape → path → shape transition with liquid blobs
  • trendPill, trendPct — trend indicators

License

Apache-2.0 · part of ClipKit · source