@mdwrk/theme-contract
v1.1.1
Published
Portable token and class-name contract for Markdown Workspace themes, renderers, editors, and extensions.
Maintainers
Readme
mdwrk/theme-contract
Portable token, class-name, and bridge-variable contract for Markdown Workspace themes, renderers, editors, and extensions.
Package purpose
This package defines the shared styling surface that reusable packages and extensions must target.
What it exports
- theme contract version
- canonical token names and definitions
- canonical class names and definitions
- canonical renderer/editor bridge-variable definitions
- compatibility metadata
- theme preset and draft shapes
Derivation source
The initial contract is derived from:
apps/client/styles/base/root.cssapps/client/styles/base/markdown.css- the extracted editor package surface
Key contract surfaces
Tokens
Examples:
bg-panelfg-primaryaccentfont-monoeditor-paddingeditor-line-heighteditor-line-rhythmline-number-gutter-widthmarkdown-line-heightmarkdown-heading-line-heightmobile-rail-expanded-widthmobile-expandable-rail-width
Stable renderer classes
Examples:
markdown-bodymd-tablemd-code-block
Stable editor classes
Examples:
mw-editormw-editor-guttermw-editor-textarea
Bridge variables
Examples:
- renderer:
--mw-bg-surface,--mw-fg-primary,--mw-code-bg,--mw-line-height,--mw-heading-line-height - editor:
--mwe-bg-surface,--mwe-fg-primary,--mwe-editor-padding,--mwe-line-height,--mwe-gutter-width
Build
npm run build -w @mdwrk/theme-contractPublishability
This package is structured as a standalone publishable npm package with typed exports and generated build output under dist/.
