- scripts/token-lint.js:只查 diff 新增行(默认 HEAD,--base 查已提交批次,--file 整文件)
· 禁裸 #hex/rgba()、禁裸 px(字号/圆角/内距/间距/外边距)、禁裸 z-index(插件不得高于 --iwb-z-anchor)
· 四类白名单:内容色 /*iwb:content*/、var() 兜底、布局尺寸不查、临时例外 /*iwb:raw-until=X*/
· JS 两套判据:CSS 文本按 px 单位判(不误伤 { gap: 20 } 布局参数)、React 对象按 camelCase 判
- tests/design-token-ratchet-test.js + fixtures/token-baseline.json:13 项计数只降不升;var() 目标必须存在;禁自我兜底
- tests/theme-contrast-test.js:亮/暗 × 文字 × 表面 114 对,阈值取 theme-tokens.js 的 RATIO(text 7 / text2 4.5 / dim 3 / canvas 6 / onBrand 4.5)
- 三条接进 verify:ci(lint:tokens + 两个测试进 test:unit),各做一次打红验证
- 顺手堵漏:首启动「选择资料目录」弹窗是全仓唯一完全未 token 化的界面(12.5px / #fff / #2563eb),已 token 化并给每个 var() 加字面兜底;遮罩 rgba 登记为例外待 RFC
- 存量计数零变化(字号 170 / 圆角 103 / 间距 415 / z-index 31)
51 lines
2.0 KiB
TOML
51 lines
2.0 KiB
TOML
[package]
|
||
name = "image-workbench"
|
||
version = "3.26.50"
|
||
description = "无限画布 · 生图工作台桌面版"
|
||
authors = ["malongan"]
|
||
license = ""
|
||
repository = ""
|
||
edition = "2024"
|
||
rust-version = "1.90"
|
||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||
|
||
[lib]
|
||
name = "image_workbench_lib"
|
||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||
|
||
[build-dependencies]
|
||
tauri-build = { version = "2.7.4", features = [] }
|
||
|
||
[dependencies]
|
||
serde_json = "1.0"
|
||
serde = { version = "1.0", features = ["derive"] }
|
||
log = "0.4"
|
||
# tray-icon:系统托盘(关闭窗口收进托盘而不是退出)
|
||
# tray-icon:系统托盘;image-png:托盘用单色 PNG 模板图标
|
||
# unstable:`Manager::get_window`(窗口级句柄,不受子 webview 影响)与 Window::add_child 都在它下面。
|
||
# 画布内嵌网页已下线(v3.25.27),但 get_window 仍要留着 —— save_geom/托盘/单实例都靠它,
|
||
# 且它比 get_webview_window 更稳(后者一旦窗口里有非同名 webview 就返回 None,见 v3.25.26)。
|
||
tauri = { version = "2.12.5", features = ["tray-icon", "image-png", "unstable"] }
|
||
url = "2"
|
||
tauri-plugin-log = "2"
|
||
tauri-plugin-dialog = "2"
|
||
tauri-plugin-fs = "2"
|
||
tauri-plugin-http = "2"
|
||
tauri-plugin-updater = "2"
|
||
tauri-plugin-single-instance = "2"
|
||
tauri-plugin-notification = "2"
|
||
arboard = "3"
|
||
image = { version = "0.25", default-features = false, features = ["png"] }
|
||
base64 = "0.22"
|
||
|
||
# 画布内嵌网页的圆角(2026-11-19):WKWebView 是矩形,要给它 backing layer 设
|
||
# cornerRadius/masksToBounds 只能走 Objective-C 消息。objc2 0.6 已由 tauri/wry 引入
|
||
# (Cargo.lock 里是同一个 0.6.x),这里显式依赖不会多编译一份。
|
||
[target.'cfg(target_os = "macos")'.dependencies]
|
||
objc2 = "0.6"
|
||
|
||
# Windows:直接读进程工作集(GetProcessMemoryInfo),不再启动 PowerShell 子进程
|
||
[target.'cfg(windows)'.dependencies]
|
||
windows-sys = { version = "0.52", features = ["Win32_Foundation", "Win32_System_ProcessStatus", "Win32_System_Threading"] }
|