Skip to content

Website: add a Theming page documenting Styles, Glyphs, WithStyles, and SetStyles #62

Description

@joestump-agent

Part of #54. Best written once #56/#57 land so it documents the full token set.

Problem

The theming API is effectively undocumented outside the source:

  • website/docs/api-reference.md shows Render(msgs, opts ...render.Option) but never says what an Option is; WithStyles, DefaultStyles, Styles, WithCompact, WithCompactThreshold appear nowhere on the website.
  • The A2UI spec's own theming guide points users at each catalog's theming documentation ("check the documentation of each component to see what variables it exposes") — a2tea has no equivalent of the web catalog's CSS-variable reference.

Fix

Add a Theming page to the website (new slot in sidebars.ts under Guides):

  • The layering story: agents send semantic hints; a2tea is the catalog; the host owns the final look via WithStyles — mirroring a2ui.org/guides/theming.
  • The two invariants and why: monochrome default (no color SGR, test-pinned), createSurface.theme no-op (spec-aligned, upstream design open in Consider renaming theme on createSurface to configuration and remove primaryColor from basic catalog a2ui-project/a2ui#1118).
  • Full reference table: every Styles slot and Glyphs entry, its default, and which components consume it — the terminal analog of the --a2ui-* variable reference.
  • A worked example: mapping a host palette (primary/accent/subtle ramp) onto Styles, plus live restyle via SetStyles.
  • Also document all render.Options in api-reference.md while there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions