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

cc-extension-core

v0.0.7

Published

The shared runtime of Tangent's unofficial browser extensions that display CharaChorder device layouts on typing websites.

Downloads

543

Readme

cc-extension-core

NPM

The shared runtime behind Tangent's unofficial browser extensions that display CharaChorder device layouts on typing websites:

Everything those extensions have in common — the overlay, the layout rendering, the options page, the settings store, and the build configuration — lives here. An extension repo only carries what is genuinely site-specific.

What an extension has to provide

Four things, and nothing else:

| | Where it goes | | --- | --- | | How to read the text the user is about to type | readNextText in the site config | | Which of the site's theme variables map to ours | src/style.css | | Its name and slug | the site config, and public/manifest.json | | Icons and store assets | public/ |

A complete extension entry point:

// src/site-config.ts
import { SiteConfig } from "cc-extension-core";

export const keybrSiteConfig: SiteConfig = {
  id: "keybr",
  siteName: "Keybr",
  readNextText: () => document.querySelector("…")?.textContent ?? null,
};

// src/content_script.tsx
import { mountContentScript } from "cc-extension-core";
import "./style.css";
import { keybrSiteConfig } from "./site-config";

mountContentScript(keybrSiteConfig);

mountOptionsPage(config) and registerBackground() cover the other two entry points. Import registerBackground from cc-extension-core/background, not from the package root — the root barrel pulls in React and MUI, which would inflate the background service worker from a few KB to well over half a MB.

Theming

Core components only ever reference semantic custom properties:

| Property | Meaning | | --- | --- | | --cc-frame-color | Keyboard frame / outline | | --cc-key-color | Key fill | | --cc-symbol-color | Key label | | --cc-pointer-color | Highlight / active accent | | --cc-font-family | Key label font |

Each extension maps them onto the host site's own variables in src/style.css, so the overlay follows whatever theme the user has picked on the site:

@import "tailwindcss";
@import "cc-extension-core/style.css";

:root {
  --cc-frame-color: var(--Keyboard-frame__color);
  /* … */
}

The defaults in style/index.css keep the overlay legible on a site that has not been mapped yet.

Build preset

The webpack, Tailwind and PostCSS configuration is shared too:

// webpack/webpack.prod.js
const path = require("path");
const { createProdConfig } = require("cc-extension-core/webpack");

module.exports = createProdConfig({ extensionRoot: path.join(__dirname, "..") });
// tailwind.config.cjs
module.exports = require("cc-extension-core/tailwind");

The Tailwind preset explicitly scans this package's dist/, because Tailwind skips node_modules when detecting sources automatically — without it every utility class used by the shared components gets tree-shaken away.

Icons

src/lib/model/icon.model.ts holds ICONS, the single source of truth for the Material Symbols subset the extensions bundle. A compile-time assertion fails the build if tangent-cc-lib gains a key-label icon that is missing from it, so the font subset cannot silently drift out of date.

Development

npm install
npm run build   # emits dist/
npm test
npm run lint

While working on an extension against a local checkout, link it:

"cc-extension-core": "link:../cc-extension-core/cc-extension-core"

link: symlinks rather than copies, so rebuilding core takes effect in the extension immediately. Remember to rebuild core (npm run build) after changing it — the extensions consume dist/, not src/.

Disclaimer

This package is not affiliated, associated, authorized, endorsed by, or in any way officially connected with CharaChorder, Keybr or Monkeytype.