新增: Rust 数据模型 + 颜色纯函数 + ts-rs 类型同步(B1)

- model.rs: 全部数据结构(Deck/Slide/Element/Style/Theme/AiCfg/LibItem/PageTemplate/ChatMessage/Op/RichSegment)
  所有结构体 derive Serialize/Deserialize/TS,自动生成 TS 类型到 bindings/types.ts
- color.rs: 颜色解析纯函数(resolve_color/resolve_bg/is_dark_bg/shade/hex_to_rgb)
  对应 store.ts 的颜色逻辑,23 个单元测试全部通过
- lib.rs: 新增 app_info IPC 命令
- ts-rs 自动生成的 bindings/types.ts 与手写 types.ts 类型一致
This commit is contained in:
2026-07-12 18:20:49 +08:00
parent b9a388b570
commit 1430e9e061
6 changed files with 626 additions and 5 deletions

View File

@@ -17,3 +17,8 @@ tauri-build = { version = "2", features = [] }
tauri = { version = "2", features = [] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
ts-rs = { version = "10", features = ["no-serde-warnings"] }
[features]
# 默认不导出类型(避免 CI 构建 fail
default = []