feat(export): add server-side AI export
Build, Push and Deploy / build (push) Failing after 6m44s
Build, Push and Deploy / deploy (push) Skipped

This commit is contained in:
lai_hong
2026-09-13 13:01:34 +08:00
parent 0877ae73e8
commit 7a506114a2
12 changed files with 632 additions and 3 deletions
+17
View File
@@ -211,6 +211,23 @@ SSE 事件流。事件数据模型:
| `ring_width` | `1` | 环线宽 |
| `ring_spacing` | `8` | 环间距 |
### POST `/api/exports/ai`
将应用生成的 SVG 转换为 Illustrator 5 兼容的 `.ai` 文件。该接口仅转发到 Compose 内部的 `ai-converter` 服务,不暴露转换容器端口。
请求体:
```json
{
"svg": "<svg ...>...</svg>",
"filename": "wordcloud.ai"
}
```
- 最大 SVG 大小:25 MB。
- 当前支持路径、`rect``circle``ellipse``line`、纯色填充/描边和仿射变换。
- 不支持图片、普通文字、SVG 图案/裁剪/透明效果时会返回 `422`,不会产生可能失真的 AI 文件。
## Templates
### GET `/api/templates`