@mdwrk/theme-contract
v1.1.3
Published
Portable token and class-name contract for MdWrk themes, renderers, editors, and extensions.
Maintainers
Readme
@mdwrk/theme-contract
Portable MdWrk theme compatibility surface
This package defines the stable MdWrk theme token, class-name, bridge, and preset compatibility surface used across apps, renderers, editors, and extensions.
Why
Use it when you need themes to remain compatible across multiple MdWrk surfaces instead of drifting app by app.
What
- Theme preset and draft shapes.
- Stable token and class-name contracts.
- Bridge metadata used to map token values into target surfaces.
Installation
Node.js 20.x through 22.x, matching the workspace engine contract in the root package manifest.
npm install @mdwrk/theme-contractUsage
import { createEmptyThemePreset } from "@mdwrk/theme-contract";
const preset = createEmptyThemePreset("my-theme", "My Theme");
preset.tokens = {
"color.canvas": "#111111",
};Related
- Packages index - family and package navigation
- Root README - repo overview
