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

@lacspace/thumbgen

v1.0.0

Published

Thumbnail variants for YouTube (1280×720), Open Graph (1200×630), square and story from a headline and an optional licensed photo — split (text + cover-cropped photo), fullbleed with legibility scrim, typographic band, number badge for data stories, and q

Readme

@lacspace/thumbgen

Thumbnail variants from a headline and a licensed photo — five layouts, urgency and category colouring, Devanagari-correct, with a rationale per variant for A/B picking. Sizes: YouTube 1280×720, Open Graph 1200×630, square 1080×1080, story 1080×1920.

npm i @lacspace/thumbgen sharp
import { thumbnails, composeThumbs } from "@lacspace/thumbgen";

const variants = await thumbnails({
  theme: { bg: "#0b1f3a", fg: "#fff", accent: "#c8102e", fontFamily: "Mukta", logo: "logo.png" },
  size: "youtube",
  headline: { en: "NEPSE closes at a record high", ne: "नेप्से रेकर्ड उचाइमा बन्द" },
  kicker: { en: "Economy", ne: "अर्थतन्त्र" },
  image: "cover.jpg", credit: "Photo: Pexels / Name",
  stat: "+12.5%", attribution: "NRB governor", urgency: "normal", lang: "ne",
});
// → [{ layout: "split" | "fullbleed" | "band" | "badge" | "quote", image: PNG bytes, fontSize, lines, rationale, plan }]

Layouts

  • split — headline on brand colour (left 55 %), photo cover-cropped on the right with a soft fade into the colour. Safest YouTube default.
  • fullbleed — photo full frame under a dark scrim; headline bottom-left; breaking adds a full-width accent banner with the kicker.
  • band — typographic: big headline, accent band with the kicker at the bottom, optional rounded photo tile. Works without a photo.
  • badge — a giant number (stat) above the headline — for forex/NEPSE/weather data stories.
  • quote — big accent quote mark, headline as the quote, attribution, optional round portrait tile.

Only layouts whose inputs exist are produced (no image → no split/fullbleed; no stat → no badge). The headline auto-fits: the largest size that wraps into ≤ 3–4 whole-word lines (never inside a Devanagari word), down to a minimum, then ellipsis.

composeThumbs(spec) is pure (returns newscard CardPlans) and renderThumb / thumbnails render via @lacspace/newscard's sharp/Pango path (correct conjunct shaping). Feed rationale + layout to @lacspace/postbandit to learn which layout wins per category.

Licence

Lacspace Free Licence v1.0 — free for personal and commercial use.