Skip to content

v2.5.0 — Token Inspection, Native Exports, Storefront Previews & Theme Fixes

Choose a tag to compare

@toozuuu toozuuu released this 28 Nov 15:49
· 1 commit to main since this release

TokiForge 2.5.0 connects token edits directly to their consumers—trace a color token to its source, inspect CSS usages, compare WCAG contrast across brands, and verify generated web and native outputs.

Highlights

Token Formats & Generated Output

  • W3C DTCG Resolution & Validation: Resolve chained aliases, explicit $root group roots, and local DTCG group inheritance with nested overrides. Invalid references, inheritance cycles, and unsupported structured color values are reported with exact token paths.
  • Structured Colors & Live Aliases: Export structured srgb and display-p3 colors to CSS. Preserve selected aliases as live CSS custom properties via liveAliases so scoped palette overrides update dependent components (flattened CSS remains the default).
  • Native Platform Exports: Generate UIKit Swift, Android XML, and React Native TypeScript directly from your project build configuration using token types and sRGB fallbacks.
  • Build & Watch Parity: Aligned initial watch output with project builds (CSS selector, prefix, and @layer), and added build --check to detect missing or stale web, responsive, and native artifacts without rewriting them.

CLI Inspection, MCP Server & Impact Review

  • New CLI Commands:
    • explain — inspect alias chains and resolved token values
    • rename --dry-run — preview JSON patches across tokens and usage bindings
    • audit-css — detect raw literals and matching tokens in CSS
    • usages — locate direct and indirect CSS token references
  • Local MCP Server: Inspect project tokens, explain aliases, audit CSS, and find usages from MCP-compatible clients.
  • Token Impact Reporting: Trace token changes through aliases to named components and themes, flagging WCAG contrast threshold crossings.

Runtime & Framework Adapters

  • Instance Isolation & Cleanup: Isolate styles across runtime instances, clean up scoped styles on teardown, eliminate duplicate initial system-theme notifications, and handle retired stored theme names when following OS preferences.
  • React & Next.js Lifecycle + SSR: Update provider lifecycles on configuration or tenant changes, extend SSR/hydration coverage (scoped CSS, cookie-selected first paint, saved preferences), and safely handle SSR theme scripts running before document.body exists.
  • Color & Accessibility Accuracy: Fixed color parsing and hue normalization, accounted for translucency in contrast calculations, and used unrounded ratios for accessibility checks.

Playground & Storefront Examples

  • Harbor & Orchard Storefront Fixtures: Interactive checkout previews with token usage bindings, light/dark comparison, live contrast feedback, and downloadable tokens.
  • Named Snapshots: Save, compare, and restore named snapshots across reloads with timestamps in Collaboration.
  • Editor & Export Improvements: Shared token traversal across panels, improved keyboard selection and narrow-screen layout, escaped TypeScript export names/values, alpha preservation in Flutter and Swift exports, and accurate clipboard feedback.

Full Changelog: v2.4.0...v2.5.0