ui: slim the design tokens and set all text through type roles (#32615)
* ui: drop component tokens that only alias a semantic token
A component token now exists only for what a component decides itself:
a value no semantic token has, or one that only this component changes
between themes. Components that take a semantic token as it is read it
directly, so 88 of the 118 component tokens go, with no change to what
is drawn.
Also drops semantic tokens that repeat another one (status-* is fill-*,
elevation-tooltip is elevation-surface), the unused info lamp tokens and
14 primitives nothing reads, and adds fg-soft for the label of an option
that is not the picked one (tabs, toggle group).
Assisted-by: Claude (Opus 5.5 Medium)
* ui: add a short summary on top of DESIGN.md
The rules most changes need, in one screen: components, colour, type,
shape, sizes, surfaces, tokens and no arbitrary values. The sections
below keep the detail.
Assisted-by: Claude (Opus 5.5 Medium)
* ui: derive design tokens by rule and drop the alias layers
Semantic tokens are either a pick (a primitive per theme) or a derivation,
mixed from another semantic token by a fixed rule and declared once: hover
fills, status surfaces and lines, dark shadows (--elevation-strength), the
middle of a matte edge, a lamp's rim and glyph.
Primitives keep colours only. shadcn's colour names stay as Tailwind
utilities and no longer exist as variables; neutral semantic utilities that
duplicated them are gone.
Assisted-by: Claude (Opus 5.5 Medium)
* ui: set all text through type roles and move off-scale values onto the scale
Tailwind's text sizes and bracketed sizes become the type roles, with a new
text-caption-sm (10px) for tags and counts. Body and caption roles no longer
set a weight, and line heights are written as Tailwind writes its own, so the
swap from text-sm and text-xs changes no pixel. A unit test keeps old sizes
from coming back.
Arbitrary values with a scale equivalent use it (z-20, max-w-4/5, min-w-32),
and the two easing curves repeated across the app are ease-out-quint and
ease-sheet. DESIGN.md is updated and regenerated.
Assisted-by: Claude (Opus 5.5 Medium)
* ui: bump @ggml-org/llama-ui to 0.5.0
Removed and renamed tokens are breaking for an app that reads them.
Assisted-by: Claude (Opus 5.5 Medium)
* ui: add a display type role for the biggest headline
The greeting on a new chat keeps its 30px from md up, now as text-display
instead of a Tailwind size.
Assisted-by: Claude (Opus 5.5 Medium)
* ui: one corner scale, one set of shadows and three more derived tokens
Six corner roles named values Tailwind's rounded-md to rounded-4xl
already have, and components used the Tailwind names nine times out of
ten. The roles are gone; the whole scale is computed from --radius.
Tailwind's shadow sizes were restated next to the elevation tokens and
did not follow the theme, so they were five times fainter in dark. The
five uses take elevation tokens and a unit test keeps both from coming
back.
A button group's seam is the button's own text colour at 25%, the dark
status text is the dark status fill, and the pressed shadow scales with
--elevation-strength like the inset one.
Assisted-by: Claude (Opus 5.5 Medium)