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

@foomo/cms-tools

v0.2.1

Published

CMS UI tools for Contentful apps, built on @foomo/ui. Every module is imported by its own subpath; there is no root entry.

Readme

@foomo/cms-tools

CMS UI tools for Contentful apps, built on @foomo/ui.

ESM only. There is no root entry and no barrel files — import each module by its subpath:

import { SomeTool } from "@foomo/cms-tools/tools/some-tool";
import { useSomething } from "@foomo/cms-tools/hooks/use-something";

Install

npm install @foomo/cms-tools @foomo/ui @contentful/app-sdk react react-dom tailwindcss

Styles

The package ships precompiled CSS. Import it once, after @foomo/ui:

@import "tailwindcss";
@import "@foomo/ui/ui.css";
@import "@foomo/ui/themes/neutral.css";
@import "@foomo/cms-tools/styles.css";

No Tailwind @source entry or @theme mapping is needed for this package. The stylesheet includes the cropper styles from react-image-crop.

  • Prefix: every utility is prefixed ct: (ct:flex, ct:hover:bg-muted) and every theme variable --ct-*, so nothing clashes with the host's Tailwind. Tailwind 4 only supports a prefix: form, not ct-. The same approach is used by @foomo/ui with fui:.
  • No preflight: the CSS does not reset any element styles. @foomo/ui/ui.css already provides the reset.
  • Theme tokens: colors resolve straight to the @foomo/ui tokens (var(--primary), var(--border), …), so a custom theme only has to define those variables.
  • className props: a class passed to a tool from the host is unprefixed. It competes with ct: utilities on specificity-equal terms, so the later stylesheet wins.

Layout

| Subpath | Source | Contents | | --------- | ------------ | --------------------------------------------- | | tools/* | src/tools/ | UI tools, each receiving the Contentful sdk | | hooks/* | src/hooks/ | Shared React hooks | | lib/* | src/lib/ | Framework-free helpers | | contentful/* | src/contentful/ | SDK provider and complete app pages built from the tools | | styles.css | src/styles.css | Precompiled, ct:-prefixed stylesheet |

Contentful pages read the SDK from context, so wrap the app once:

import { ContentfulSdkProvider } from "@foomo/cms-tools/contentful/sdk";
import { ImageCropPage } from "@foomo/cms-tools/contentful/image-crop-page/image-crop-page";

<ContentfulSdkProvider>
  <ImageCropPage ratios={ratios} publish onImported={({ assets }) => link(assets)} />
</ContentfulSdkProvider>;

A tool can be a single file (src/tools/slug-field.tsx → tools/slug-field) or a folder (src/tools/slug-field/slug-field.tsx → tools/slug-field/slug-field).

Conventions

  • Import sibling modules relatively with their real extension (./format.ts, ./field.tsx); tsc rewrites them to .js.
  • No index.ts re-export files. Biome's noBarrelFile and noReExportAll rules fail the lint if one appears.
  • @contentful/app-sdk, @foomo/ui and React are peer dependencies — never bundle them.

Playground

bun run playground serves playground/ on http://localhost:5173 as a Contentful app.

  • In Contentful: create an app definition with App URL http://localhost:5173 and the Page or Entry field location, and install it. Open it from the Apps menu (page) or assign it to a field's appearance (entry field). It connects to the real SDK and lists the environment's image assets.
  • Standalone: opened directly in a browser, it falls back to a mock SDK with sample photos.

Scripts

bun run playground # vite dev server for playground/
bun run build      # tsc + tailwind → dist/
bun run typecheck
bun run check      # biome lint + format check
bun run format