Repository navigation
Release v6.3.0
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,tokensby category (color, space, size, radius, border, shadow, font, type, motion, opacity, z),componentswith parts, variants and states,words(voice and naming) andrulessuch ascontrast text on background at least 4.5. See Design system. (#1194) - A
themecanimplementthe design system with apalette, mode-independentvaluesand a block per mode. Every color token needs a value in every mode, and a theme that only listscompatible withpackages keeps working. - Compiler diagnostics
PLAY0916toPLAY0930for 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. DesignSystemResolverinCratis.Screenplay.Designresolves the theme and mode aui profileselects into a flat token map and resolved component parts, so Stage, Scene and Direct do not reimplement reference resolution.- The MCP
ui-profilestool 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,cornersandfontinto the theme the profile uses. Samples/InvoicingandSamples/AcmeCommerce(one shared design system, one theme per domain) show the construct.
Changed
- A
ui profilewithout athemeline uses the design system'sdefault theme. Itsappearancekeeps onlycolor scheme;accent,cornersandfontnow warn withPLAY0929and still read. Move each value into the profile's theme: the accent as a palette entry, the corner style as theradius.controlvalue and the font as thefont.sansvalue. - The executable semantic model still defers UI configuration, now including the design system (
PLAY0269); read it through the syntax tree or the resolver.