Skip to main content

cjm-design-system

A design system as data (ruling a439c226): token schema v1 with its check and its headless resolution into one flat vocabulary, the CSS custom-properties projection for the web, the vendored seed systems Classical and Netrunner with their OFL fonts, and the importer for a web-first system's CSS. Nothing here imports Qt, so a web build never needs PySide6; the Qt kit (cjm-substrate-qt-kit) consumes the same tokens and keeps only what Qt reads. Born out of the kit by design 0858bbd0, the theme half of the public-site redesign build 8079ae0f.

Modules

  • cjm_design_system.__init__ — A design system as DATA (ruling a439c226): one canonical tokens file per
  • cjm_design_system.systems.__init__ — The design systems this library ships as DATA (ruling a439c226): one
  • cjm_design_system.tokens — Token schema v1 — a design system as DATA, resolved headlessly (ruling
  • cjm_design_system.tools.__init__ — Design-system tools (run as modules):
  • cjm_design_system.tools.build — Build the static web projections of a design system: the CSS
  • cjm_design_system.tools.css_to_tokens — Import a web-first design system's CSS into a schema-v1 tokens file.
  • cjm_design_system.web — The web projections of a design system beyond the CSS variable layer (design

API

cjm_design_system.systems.__init__

  • available function — Every vendored system slug (a directory carrying a tokens.json).
  • locate function — The directory of a system: a vendored slug, a directory holding a
  • tokens_path function

cjm_design_system.tokens

  • SchemaError class — A tokens file that violates schema v1 — every problem listed, so one
  • check function — Refuse a malformed system loudly: every missing / mistyped field named
  • load function — Read a tokens file (JSON). check it before resolving anything.
  • mix function — Flatten fg at opacity t over bg -> a solid hex (QPalette, painters,
  • mode_for_scheme function — The mode the system maps an OS scheme ("light" / "dark") onto — None
  • modes function
  • resolve function — tokens + mode -> the flat vocabulary every projection reads: the QSS
  • rgba function — QSS rgba() with a 0-255 alpha (the form every Qt 6 version parses).
  • slug function — The system's file-system / preference slug: lower-case, spaces -> dashes.
  • to_css function — The CSS custom-properties layer for a system — the ruling's second
  • to_hex function

cjm_design_system.tools.build

  • main function

cjm_design_system.tools.css_to_tokens

  • convert function
  • darker function
  • family function
  • main function
  • parse_root function
  • px function
  • ramp function

cjm_design_system.web

  • bootstrap_defaults function — Bootstrap's variables for one mode, every value read from resolve(tokens, mode):
  • font_files function — The files a system's tokens name, resolved the way the Qt kit registers them.
  • format_ranges function — Code points -> the shortest CSS unicode-range list naming exactly them.
  • parse_ranges function — A CSS unicode-range list ("U+0000-00FF, U+0131") -> the code points it names.
  • sha256_file function
  • theme_rules function — The rules the variables cannot carry: the per-level heading weights the type scale names
  • theme_scss function — One Quarto theme file for one mode of a system.
  • web_fonts function — Convert each font file into woff2 subsets by unicode range and return the @font-face

Dependencies

Used by: cjm-context-graph-projection, cjm-substrate-qt-kit

Metadata

Release files for cjm-design-system 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cjm-design-system 0.0.2
File Size Uploaded
cjm_design_system-0.0.2.tar.gz 923.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cjm-design-system 0.0.2
File Interpreter ABI Platform
cjm_design_system-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.8 MB

Release files / cjm_design_system-0.0.2.tar.gz

Download URL cjm_design_system-0.0.2.tar.gz
Size 923.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a1352d922b50bbf0726bb5b3abbe3642044dfee4cb07eee2596d530412e6e8b2
BLAKE2b-256 checksum
How to use checksums
da629b27d495b872e11802c24b4ff88dfb47a79f75c6aeaa600f890dd3ad9f2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / cjm_design_system-0.0.2-py3-none-any.whl

Download URL cjm_design_system-0.0.2-py3-none-any.whl
Size 925.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90f91d675e5142b4af04ac1f2544ab265fa6e211e79bb57c945e812aa7666d47
BLAKE2b-256 checksum
How to use checksums
601045a7baf7de83b84f20186c1a59155770cda69016fc4557488979756431e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page