@razorwind/thunderbird
v0.0.44
Published
Razorwind plugin that generates Mozilla Thunderbird themes from design tokens.
Maintainers
Readme
💨 Razorwind is a unified set of tools that make creating design systems a breeze.
[!IMPORTANT] This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be available through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.
Razorwind - Thunderbird Theme Generator
Razorwind - Thunderbird Theme Generator creates Mozilla Thunderbird extension theme folders from design tokens. Output matches community themes such as Dracula for Thunderbird (manifest.json plus optional icons).
Quick Features
- Generate Thunderbird extension themes from design tokens with
mapTheme. - Flatten token trees for lookup with
flattenTokens. - Share one mapping across targets with
@razorwind/preset.
Installing
Using pnpm:
pnpm add -D @razorwind/thunderbirdnpm install -D @razorwind/thunderbirdyarn add -D @razorwind/thunderbirdUsage
import { defineConfig } from "@razorwind/core";
import thunderbird, {
flattenTokens,
toThunderbirdRgbString
} from "@razorwind/thunderbird";
export default defineConfig({
plugins: [
thunderbird({
mapTheme: tokens => {
const flat = flattenTokens(tokens);
const color = (path: string) =>
toThunderbirdRgbString(
flat.find(t => t.path === path)?.cssValue ?? "#282a36"
);
return {
name: "My Thunderbird Theme",
gecko: { id: "[email protected]" },
colors: {
frame: color("color.bg"),
toolbar: color("color.accent"),
tab_text: color("color.fg"),
sidebar: color("color.bg"),
toolbar_field: color("color.bg"),
tab_line: color("color.link")
},
icons: {
"200": "icon.png"
}
};
}
})
]
});Generated files (under thunderbird-themes/ by default):
{theme-slug}/manifest.json— Thunderbird extension theme manifest frommapThemeINSTALL.md— zip each folder and install via Add-ons and Themes
Install like Dracula for Thunderbird:
- Zip a generated theme folder so
manifest.jsonis at the archive root - Open Thunderbird → Settings → Add-ons and Themes
- Gear menu → Install Add-on From File… and select the ZIP
Add any icon PNGs referenced in manifest.json before installing.
Options
| Option | Default | Description |
| -------------- | ----------------- | ------------------------------------------------- |
| mapTheme | (required) | (tokens) => theme, theme array, or theme record |
| outputPath | "thunderbird-themes" | Output directory for theme folders |
| installGuide | (generated) | Override body for generated INSTALL.md |
mapTheme return shapes: a single ThunderbirdTheme, an array, or a Record<string, ThunderbirdTheme>. Each theme needs name, gecko.id, and colors. Color values may be hex strings (#rrggbb) or [r, g, b] tuples (0–255); they are rendered as rgb(r, g, b) strings per the Dracula Thunderbird manifest. Optional fields include icons and gecko.strictMinVersion.
Development
Building
Run nx build thunderbird to build the library.
Running unit tests
Run nx test thunderbird to execute the unit tests via Vitest.
Storm Workspaces
Storm workspaces are built using Nx, a set of extensible dev tools for monorepos, which helps you develop like Google, Facebook, and Microsoft. Building on top of Nx, the Open System provides a set of tools and patterns that help you scale your monorepo to many teams while keeping the codebase maintainable.
Roadmap
See the open issues for a list of proposed features (and known issues).
- Top Feature Requests (Add your votes using the 👍 reaction)
- Top Bugs (Add your votes using the 👍 reaction)
- Newest Bugs
Support
Reach out to the maintainer at one of the following places:
License
This project is licensed under the Apache License 2.0. Feel free to edit and distribute this template as you like.
See LICENSE for more information.
Changelog
This project adheres to Semantic Versioning. Every release, along with the migration instructions, is documented in the CHANGELOG file
Contributing
First off, thanks for taking the time to contribute! Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.
Please try to create bug reports that are:
- Reproducible. Include steps to reproduce the problem.
- Specific. Include as much detail as possible: which version, what environment, etc.
- Unique. Do not duplicate existing opened issues.
- Scoped to a Single Bug. One bug per report.
Please adhere to this project's code of conduct.
You can use markdownlint-cli to check for common markdown style inconsistency.
Contributors
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
Storm Software is an open source software development organization and creator of Acidic, StormStack and StormCloud.
Our mission is to make software development more accessible. Our ideal future is one where anyone can create software without years of prior development experience serving as a barrier to entry. We hope to achieve this via LLMs, Generative AI, and intuitive, high-level data modeling/programming languages.
Join us on Discord to chat with the team, receive release notifications, ask questions, and get involved.
If this sounds interesting, and you would like to help us in creating the next generation of development tools, please reach out on our website or join our Slack channel!
