feat(chat): a2ui internal token system + catalog refactor (Pass 2b)#234
Merged
Conversation
Declare ~50 --a2ui-* tokens at :host on <a2ui-surface> covering spacing, typography, shape, focus ring, motion, elevation, and color scales with dark-theme defaults. Refactor 14 catalog components (button, card, text, text-field, modal, slider, check-box, multiple-choice, tabs, divider, image, video, list, date-time-input) to consume var(--a2ui-*) instead of hardcoded values. The --a2ui-primary host binding (agent-overridable via beginRendering.styles.primaryColor) is preserved. Four layout-only components (audio-player, column, row, icon) carry no token-eligible values and are intentionally unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--a2ui-*CSS custom properties at:hoston<a2ui-surface>, covering spacing (7-step 4px scale), typography (h1–h5, body, caption, label), shape radius, focus ring, motion duration/easing, elevation (box-shadow), and a full color palette with dark-theme defaultsvar(--a2ui-*)instead of hardcoded px/color values — same visual design, now driven by tokens--a2ui-primarycontinues to be agent-overridable via the existing[style.--a2ui-primary]="primaryColor()"host binding frombeginRendering.styles.primaryColor; the token default (#4f8df5) applies when the agent omits it--a2ui-card-bg,--a2ui-input-bg,--a2ui-input-text,--a2ui-label,--a2ui-caption,--a2ui-border) are preserved as aliases onto the new semantic tokensstyles:blocks and are intentionally unchangedComponents touched (14 refactored)
button, card, text, text-field, modal, slider, check-box, multiple-choice, tabs, divider, image, video, list, date-time-input
Unchanged (no token-eligible CSS)
audio-player, column, row, icon
Pass 3 path
Pass 3 will ship preset CSS files (e.g. a Material flavor) that consumers
@importto override these:hostdefaults with light-theme or branded palettes.Test plan
npx nx run-many -t test,lint,build -p a2ui,chat --skip-nx-cache— all green🤖 Generated with Claude Code