react-ai-renderer 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/index.cjs +4425 -4054
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4425 -4054
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,6 +58,23 @@ yarn add react-ai-renderer
|
|
|
58
58
|
|
|
59
59
|
### 可选依赖
|
|
60
60
|
|
|
61
|
+
#### 1. KaTeX(数学公式渲染)
|
|
62
|
+
|
|
63
|
+
本库支持使用 KaTeX 渲染数学公式,但需要在你的项目中手动导入 CSS:
|
|
64
|
+
|
|
65
|
+
**在 _app.tsx 或全局样式文件中添加:**
|
|
66
|
+
```tsx
|
|
67
|
+
import 'katex/dist/katex.min.css';
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Next.js 项目中:**
|
|
71
|
+
```tsx
|
|
72
|
+
// pages/_app.tsx 或 app/layout.tsx
|
|
73
|
+
import 'katex/dist/katex.min.css';
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
#### 2. Mermaid(图表渲染)
|
|
77
|
+
|
|
61
78
|
本库支持渲染 Mermaid 图表,但需要安装额外的依赖:
|
|
62
79
|
|
|
63
80
|
```bash
|