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

@ -9,6 +9,8 @@
"./lib/*": "./src/lib/*.ts",
"./components/*": "./src/components/*.tsx",
"./components/ui/*": "./src/components/ui/*.tsx",
"./components/markdown": "./src/components/markdown/index.ts",
"./components/markdown/*": "./src/components/markdown/*.tsx",
"./hooks/*": "./src/hooks/*.ts"
},
"dependencies": {
@ -23,12 +25,18 @@
"shadcn": "^3.7.0",
"tailwind-merge": "^3.4.0",
"tailwindcss": "^4",
"tw-animate-css": "^1.4.0"
"tw-animate-css": "^1.4.0",
"react-markdown": "^10.1.0",
"remark-gfm": "^4.0.1",
"rehype-raw": "^7.0.0",
"shiki": "^3.21.0",
"linkify-it": "^5.0.0"
},
"devDependencies": {
"@tailwindcss/postcss": "^4",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@types/linkify-it": "^5.0.0",
"typescript": "catalog:"
}
}