Commit graph

2 commits

Author SHA1 Message Date
chaoxiaoche
b68e4d3252
feat(design-systems): add tokens.css + components.html for 9 AI product brands (#1841)
* feat(design-systems): add tokens.css + components.html for 9 AI product brands

Compiles DESIGN.md prose into machine-consumable agent artifacts for
claude, cohere, elevenlabs, huggingface, mistral-ai, nvidia, opencode-ai,
replicate, and together-ai.

Each brand adds:
- tokens.css  — :root block of CSS custom properties derived from the brand's
                DESIGN.md; agents paste this directly into generated HTML <style> tags
- components.html — reference fixture embedding the token block inline and
                    demonstrating buttons, inputs, cards, and badges styled
                    with var(--token-name) calls

Key brand decisions encoded:
- claude: warm parchment canvas, terracotta accent, Anthropic Serif display
- cohere: pure white, 22px signature radius, CohereText + Unica77
- elevenlabs: achromatic + warm stone, Waldenburg weight 300, pill-shaped
- huggingface: IBM Plex Mono headings/tags, HF Yellow (#ffd21e), 4-6px radius
- mistral-ai: golden amber palette, Arial weight 400, near-zero radius
- nvidia: true black, NVIDIA Green as border/outline signal only, teal hover
- opencode-ai: Berkeley Mono sole typeface, flat depth (ring-only elevation)
- replicate: pill-shaped everything (9999px), rb-freigeist-neue heavy
- together-ai: "The Future" font, -0.03em tracking, white/midnight dual world

openai tokens.css + components.html were merged to main separately.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(design-systems): sync :root token blocks with tokens.css for opencode-ai and together-ai

opencode-ai: add missing "Liberation Mono" to all three font-stack fallbacks.
together-ai: remove --lavender declaration absent from tokens.css (guard requires byte-identical :root blocks).
Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: chaoxiaoche <chaoxiaoche@chaoxiaochedeMacBook-Pro.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 11:54:50 +08:00
Tom Huang
9ee2c1994c
feat(web): add brand design systems, card thumbnails, and DESIGN.md side-by-side preview (#289)
* feat(web): add brand design systems, card thumbnails, and DESIGN.md side-by-side preview

- Add 7 new brand design systems (arc, canva, discord, duolingo, github, huggingface, openai)
- Show live showcase HTML thumbnails on Design Systems cards
- Add toggleable DESIGN.md side panel in preview modal with syntax-highlighted spec view
- Make preview iframe responsive: render at fixed design viewport and scale to fit so opening the side panel never reflows showcases into broken breakpoints
- Add floating collapse/expand handles on the sidebar boundary for direct hide/show

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(web): guard ResizeObserver and re-fire sidebar lazy-load on content swap

- Guard `new ResizeObserver(...)` in PreviewModal so the modal mounts in
  jsdom (the existing preview-modal-fullscreen test was failing with
  `ReferenceError: ResizeObserver is not defined`) and in older embedded
  WebViews. Fall back to a window resize listener when the constructor
  is unavailable.
- Add a `contentKey` hint to PreviewSidebar so the lazy-load `onToggle`
  callback re-fires when the underlying side-panel source swaps while
  the sidebar stays open. Wire `system.id` through from
  DesignSystemPreviewModal so swapping design systems with the spec
  panel open primes a fresh DESIGN.md fetch instead of leaving it stuck.

Generated-By: looper 0.4.0 (runner=fixer, agent=claude-code)

* fix(web/i18n): add missing ds/preview keys to hu locale

The Validate workspace check failed after main's hu.ts landed
without the four i18n keys introduced by this PR (ds.specToggle,
ds.specLoading, preview.showSidebar, preview.hideSidebar).

Generated-By: looper 0.4.0 (runner=fixer, agent=claude-code)

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-02 23:19:00 +08:00