feat(ui): add Markdown rendering components

Add CodeBlock, Markdown, StreamingMarkdown components with
Shiki syntax highlighting, GFM support, and linkify utility.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Naiyuan Qing 2026-01-30 20:40:27 +08:00
parent 2a96fc9227
commit 9b87cd789e
9 changed files with 2130 additions and 53 deletions

View file

@ -119,6 +119,20 @@
--sidebar-ring: oklch(0.552 0.016 285.938);
}
/* Shiki dual themes: CSS-only light/dark switching via CSS variables */
/* @see https://shiki.style/guide/dual-themes */
.shiki,
.shiki span {
color: var(--shiki-light);
background-color: var(--shiki-light-bg);
}
.dark .shiki,
.dark .shiki span {
color: var(--shiki-dark) !important;
background-color: var(--shiki-dark-bg) !important;
}
@layer base {
* {
@apply border-border outline-ring/50;