Skip to content

Release v6.3.0

Choose a tag to compare

@github-actions github-actions released this 08 Nov 18:28
7106a26

A model can now keep its whole visual identity in .play: a design system declares what exists and what it is for, and each theme gives it values. The compiler checks the pair, so a missing token value, a broken reference or text that fails a contrast rule is reported where it is written instead of showing up on screen.

Added

  • The design system <Name> construct, one per application: modes, default theme, tokens by category (color, space, size, radius, border, shadow, font, type, motion, opacity, z), components with parts, variants and states, words (voice and naming) and rules such as contrast text on background at least 4.5. See Design system. (#1194)
  • A theme can implement the design system with a palette, mode-independent values and a block per mode. Every color token needs a value in every mode, and a theme that only lists compatible with packages keeps working.
  • Compiler diagnostics PLAY0916 to PLAY0930 for malformed blocks, a second design system, unknown modes, duplicate or undeclared tokens, missing mode values, unresolved or cyclic references, parts that take the wrong token category, an invalid default theme, a profile selecting a theme that does not implement the design system, and contrast below a rule. See the diagnostics catalogue.
  • DesignSystemResolver in Cratis.Screenplay.Design resolves the theme and mode a ui profile selects into a flat token map and resolved component parts, so Stage, Scene and Direct do not reimplement reference resolution.
  • The MCP ui-profiles tool now also returns the design system, every theme and each theme's resolved values per mode, and the profile's selected theme and mode.
  • The TypeScript compiler, Monaco editor and VS Code extension understand the design system: parsing, validation, highlighting, hover, completion and conformance vectors held to the C# compiler.
  • A quick fix, in C# workspaces and in the editors, moves a profile's deprecated accent, corners and font into the theme the profile uses.
  • Samples/Invoicing and Samples/AcmeCommerce (one shared design system, one theme per domain) show the construct.

Changed

  • A ui profile without a theme line uses the design system's default theme. Its appearance keeps only color scheme; accent, corners and font now warn with PLAY0929 and still read. Move each value into the profile's theme: the accent as a palette entry, the corner style as the radius.control value and the font as the font.sans value.
  • The executable semantic model still defers UI configuration, now including the design system (PLAY0269); read it through the syntax tree or the resolver.