bricks-mp/DESIGN.md

29 lines
851 B
Markdown

# Bricks Multiplatform - 设计文档
## 架构
JSON 描述 → BricksParser → BricksWidget 树 → BricksRenderer → Compose UI
## 组件映射 (Phase 1)
| Bricks Widget | Compose |
|--------------|---------|
| Text | Text() |
| Title1-6 | Text() + fontSize/fontWeight |
| HBox/FHBox | Row() + Arrangement |
| VBox/FVBox | Column() + Arrangement |
| Filler/HFiller/VFiller | Spacer() + weight |
| ResponsiveBox | BoxWithConstraints() |
| KeyinText | OutlinedTextField() |
| Input | TextField() + type |
| Running | CircularProgressIndicator() |
## 事件系统
actiontype: urlwidget/method/script/registerfunction/event → ActionDispatcher
## 技术栈
Kotlin 2.1, Compose Multiplatform 1.7.3, Ktor 3.0, kotlinx.serialization, Coroutines
## 平台支持
- Android (minSdk 24)
- iOS (X64/Arm64/SimulatorArm64)
- Desktop (Windows/Linux/macOS)