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

@dev-mainsequence/command-center-themes

v0.1.3

Published

Shared Command Center theme presets, token contracts, and theme application helpers.

Readme

Command Center Themes

Shared theme package for Main Sequence Command Center and embedded applications.

Purpose

This package is the source of truth for reusable Command Center theme contracts, presets, data-visualization palettes, density metrics, surface hierarchy metrics, bundled CSS, font stacks, and DOM CSS-variable application helpers.

Command Center imports this package locally from the monorepo. External iframe applications can install the published package and resolve the active themeId sent by the host application.

Main Entry Points

  • src/types.ts: stable ThemePreset, token, density, and data-viz palette contracts.
  • src/presets/: built-in theme presets exported by id-stable objects.
  • src/chart-palettes.ts: data-viz palette resolution and palette helper functions.
  • src/tightness.ts: density metrics used by tables and compact UI surfaces.
  • src/surface-hierarchy.ts: nested-surface chrome metrics.
  • src/css-vars.ts: helpers for building CSS-variable maps or style blocks.
  • src/apply-theme.ts: DOM helper for applying a resolved theme to an element.
  • styles.css: browser-ready base stylesheet, theme chrome variables, body typography, and reusable Command Center chrome selectors.
  • utilities.css: optional text-size, line-clamp, token-swatch, and positive/negative utility classes.
  • tailwind.css: Tailwind v4 theme-variable mapping for apps that use Tailwind utilities.
  • fonts.css: shared Command Center font-stack custom properties.
  • markdown.css: optional scoped markdown skin for .command-center-markdown.
  • ag-grid.css: optional AG Grid skin keyed off Command Center CSS variables.
  • react-flow.css: optional React Flow workspace graph controls and handle skin.
  • react-grid-layout.css: optional React Grid Layout resize and placeholder skin.

Usage

Import the CSS bundle once in the embedded application:

import "@dev-mainsequence/command-center-themes/styles.css";

Tailwind v4 applications should also import the theme mapping after tailwindcss:

@import "tailwindcss";
@import "@dev-mainsequence/command-center-themes/tailwind.css";
@import "@dev-mainsequence/command-center-themes/styles.css";
@import "@dev-mainsequence/command-center-themes/utilities.css";

Then apply the active preset to the iframe document root:

import {
  applyThemePresetToRoot,
  commandCenterThemes,
  resolveCommandCenterThemeById,
} from "@dev-mainsequence/command-center-themes";

const theme = resolveCommandCenterThemeById("main-sequence-space") ?? commandCenterThemes[0];

if (theme) {
  applyThemePresetToRoot(document.documentElement, { theme });
}

For host-to-iframe messaging, the host can send either the themeId or a serialized style block:

import { buildThemeStyleText, resolveCommandCenterThemeById } from "@dev-mainsequence/command-center-themes";

const theme = resolveCommandCenterThemeById("main-sequence-space");
const cssText = theme ? buildThemeStyleText({ theme }) : "";

Import optional skins only when the consuming application uses those surfaces:

@import "@dev-mainsequence/command-center-themes/markdown.css";
@import "@dev-mainsequence/command-center-themes/ag-grid.css";
@import "@dev-mainsequence/command-center-themes/react-flow.css";
@import "@dev-mainsequence/command-center-themes/react-grid-layout.css";

Maintenance Notes

  • Keep theme ids stable once published. Command Center persists selected theme ids in user preferences.
  • Add new presets to src/presets/ and export them from both src/presets/index.ts and src/index.ts.
  • Treat token key removals or renames as breaking changes.
  • Keep browser-ready portable base theme CSS in styles.css; keep framework or library-specific skins in separate optional CSS entrypoints.
  • Keep Tailwind-specific mapping in tailwind.css.
  • This package intentionally has no React, Vite, app-registry, auth, or storage dependencies.