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

flowcms

v0.2.5

Published

The public FlowCMS theme API. Install this to write a FlowCMS theme package.

Readme

flowcms

The public FlowCMS theme API. Install it to write a FlowCMS theme package.

This package is only the contract a theme is written against — types, a few runtime helpers, and the settings builder. It is not the CMS. It contains no database access, no route handlers, no admin panel, and it does not run a site.

npm install flowcms
import type { FlowCMSTheme, BlogPostView } from "flowcms/theme"
import { JsonLd, publicImageUrl, cn, defineThemeSettings } from "flowcms/theme"

One entry point

flowcms/theme is the entire public surface. There is no flowcms, flowcms/views, flowcms/runtime, or flowcms/dist/... — the package's exports map deliberately makes every other path unreachable, so an internal module cannot become somebody's dependency by accident.

What it exports:

| | | |---|---| | View models | HomeView, PageView, BlogIndexView, BlogPostView, ArchiveView, AuthorArchiveView, NotFoundView, and the types they are built from | | Surfaces | FlowCMSTheme, ThemeManifest, ThemeSurface, LayoutProps, THEME_SURFACES | | Settings | defineThemeSettings, themeSettingsOf, and their field types | | Runtime | JsonLd, publicImageUrl, publicImagePath, howToStepAnchor, readingTimeMinutes, cn, FLOWCMS_VERSION |

What a theme owns

Presentation: layout, markup, components, styles, visual hierarchy.

It does not own data, SEO, or routing. Core resolves everything — queries, metadata, JSON-LD, redirects, preview authorisation, 404 logging, RSS, sitemaps, robots.txt — and hands the theme a fully-resolved, typed view model. The theme renders it.

In particular a theme never authors structured data. view.jsonLd arrives already built; the theme decides only whether and where to render it. A theme that could invent its own graph could publish false claims about the site owner's business, which is why that boundary is not negotiable.

A minimal theme

import { defineThemeSettings, type FlowCMSTheme } from "flowcms/theme"

const settings = defineThemeSettings([
  { name: "accent", type: "color", label: "Accent colour", default: "#2563eb" },
])

const theme: FlowCMSTheme = {
  manifest: {
    slug: "my-theme",
    name: "My Theme",
    version: "1.0.0",
    flowcms: "^0.1.0",
    menus: ["primary", "footer"],
  },
  settings,
  Layout: ({ children }) => <div className="site">{children}</div>,
  surfaces: {
    home: ({ view }) => <h1>{view.brand.name}</h1>,
  },
}

export default theme

Surfaces you do not implement fall back to the default theme, so a theme can be partial and still render a whole site.

Compatibility

manifest.flowcms is a semver range checked against FLOWCMS_VERSION when the theme is registered. Declare the range you have actually tested against — a theme claiming compatibility it does not have fails at render time, on a visitor's request, rather than at install time.

Installing a theme into a site

Three explicit, reviewable edits in the FlowCMS project: add the dependency, register the theme with a static import in src/Themes/packages.ts, and add a Tailwind @source line in src/app/globals.css pointing at the package's dist. There is no upload, no ZIP, and no runtime directory scan — Next's tracer decides what reaches a standalone build, so a theme discovered at runtime would simply be absent from the production image.

The Tailwind step is the one whose failure is silent: without it the markup renders and the utility classes are missing from the stylesheet.

See docs/distribution/packages.md in the FlowCMS repository for the full procedure, and @example/flowcms-theme-aurora for a worked example.

Security

A theme is application code, not a passive template. It executes with the privileges of the FlowCMS server: it can read the filesystem, open sockets, and reach anything it can import. There is no sandbox, and FlowCMS does not claim one. Install themes from sources you trust, exactly as you would any other npm dependency.

Requirements

Node 22 or newer, and React 19 as a peer dependency.