utopia_ui_tools 0.1.0
utopia_ui_tools: ^0.1.0 copied to clipboard
CLI for the utopia_ui design protocol: validate design tokens, generate the Flutter theme, HTML twin and component manifest, and catch design drift in CI.
Changelog #
0.1.0 #
Initial release of the Utopia Design Protocol tooling for utopia_ui (protocol 0.4.0):
validate_tokens- protocol gates over DTCG token documents,--fixfor mechanical base-unit re-derivation and color-hex resync.export_tokens- canonical DTCG export ofUtopiaThemeData.defaultTheme(maintainer).generate_theme- token document tobuildUtopiaTheme()Dart codegen, round-trip proven against the default theme.generate_manifest/validate_manifest- component-manifest generation (library and--projectmodes, merged view) with drift, namespace and freshness gates.generate_twin/validate_twin- design-surface codegen (tokens.css, Tailwind@themevariant,DESIGN.mdfront matter, gallery composition via--compose-gallery, section skeletons via--scaffold <id>) and the twin linter: token literals, front-matter freshness, manifest coverage and state-class parity.- Twin elevation parity:
generate_twinpaints everyshadow.*layer incolor.shadow's hue at that layer's own alpha, exactly as the runtime does, in bothtokens.cssand the Tailwind variant. A rebranded shadow hue now reaches the twin, not just the Flutter app. A document withoutcolor.shadow(pre-0.4.0) keeps each layer's own colour. generate_manifest --projectdrops adesign/.gitignoreentry formerged.manifest.json(created if absent, appended once otherwise, never rewriting a consumer's own entries): the merged manifest is a derived view whose library half is a byte copy of the pub-cache manifest, so consumer repos stop versioning it by default. SPEC 7 documents the consumer versioning policy.generate_theme --check- freshness gate for a consumer's generated theme file: exits 1 on drift and writes nothing.
Naming note for the Tailwind @theme output: role names are kebab-cased on camelCase
boundaries, exactly like tokens.css's --utopia-* properties - a textStyle.bodyLarge
role maps to --font-body-large / --color-text-style-body-large, not --font-bodyLarge.
Roles that are already lower-case (every role in the packaged default token document) are
unaffected. validate_twin now byte-compares a committed tokens.tailwind.css against its
generator, so a rename in this mapping is caught rather than left to drift.