feat(tokens): M4-B3 首页/库 —— 删 30 条死规则 + 间距/字号收口(3.26.46)
用户能感知的:首页紧凑了一点(侧栏条目矮 4px、主标题小 2px、卡片脚注更贴底)。
死代码(本批一半工作量)
- 25 个类名在产物里 0 次 → 删 30 条规则:home-title/subtitle/new/head/kicker/
card-main/card-check/card-rename/cats/side-foot/menu-btn/menu-sep、lib-tabs/lib-tab/lib-handle。
- 批量管理复选框:v3.22 起「点卡片=选中」,元素不渲染,两条 .iwb-home-card-check 样式还留着。
- .iwb-home-panel 叠了 5 层 padding,前 4 层全被 `.iwb-overlay .iwb-home-panel{padding:0}`
的更高 specificity 覆盖 —— 改数字毫无反应,一并清掉。
token 化(首页/库 106 条规则)
- 间距写死 91 → 5 处,剩下全是布局值(版心 max(24px,calc(...))、1580px、对齐导航栏的 52px),
规范里逐条写明「为什么必须写死」。
- 字号写死清零:14→md、16→lg、18→xl、26→display;新增 --iwb-font-display:24px 第 7 档
(26 压到 2xl(20) 会与面板标题同级,页面层级会塌)。
- 保留 .iwb-lib-*:它不是死代码,是 promptlib/grouplib 复用的插件契约 —— 只按 dist 计数会误删。
验收
- 计算样式逐元素 diff:首页 20 个元素采样,9 个变化全部是预期项,无意外属性。
- 12 张视觉基线:只首页亮/暗 2 张变化(已核对无裁切/重叠/换行错位),其余 10 张 0 diff。
- 单测里钉像素值的断言改钉 token 档位(font-size: var(--iwb-font-lg)),语义升级。
- verify:ci 全绿;token 审计:字号写死 268→243、间距 629→548、圆角 164→139、style.css 2391→2339 行。
This commit is contained in:
1 parent
df229eecff
commit
9f29996823
13 files changed
+150
-119
No files matched your search
@@ -14,6 +14,30 @@
|
||||
> 3. 核验正式地址版本 → 之后才移动 `stable` / `stable-verified-<日期>` 标签、更新本 CHANGELOG、写 GitHub Release(`gh release create`)。
|
||||
> 测试发现问题 → 改 → 再 `deploy:test`,正式环境不受影响。回滚点 `git reset --hard stable`。
|
||||
|
||||
## v3.26.46(2026-11-23)首页/库:字号与间距收进档位,删掉 30 条死规则
|
||||
|
||||
> **状态:待发布**(`verify:ci` 全绿、12 张视觉基线只有首页 2 张变化且已核对;未打 tag)
|
||||
|
||||
M4-B3 批次。用户能感知的是**首页更紧凑了一点**:侧栏条目矮 4px、主标题小 2px、卡片脚注更贴底。
|
||||
|
||||
**删死代码(本批一半的工作量在这)**
|
||||
|
||||
- 25 个类名在产物里出现 0 次,对应 **30 条规则直接删**:`home-title/subtitle/new/head/kicker/card-main/card-check/card-rename/cats/side-foot/menu-btn/menu-sep`、`lib-tabs/lib-tab/lib-handle`。都是历史布局的残留。
|
||||
- 批量管理的复选框:v3.22 起改成「点卡片=选中」,DOM 里早就不渲染复选框了,两条 `.iwb-home-card-check` 样式还留着。
|
||||
- **`.iwb-home-panel` 上叠了 5 层 padding**(`90px` / `116px … 60px` / `24px` / `72px` / 最终 `padding:0`)—— 前四层全被最后一条 specificity 更高的规则覆盖,改数字毫无反应,一并清掉。
|
||||
|
||||
**首页/库 106 条规则换 token**
|
||||
|
||||
- 间距写死从 **91 处降到 5 处**,剩下 5 处全是布局值(`max(24px, calc((100vw - 1580px)/2))` 版心留白、`1580px` 版心宽、`52px` 对齐导航栏),并在规范里写明「为什么这几个必须写死」。
|
||||
- 字号写死清零。归并:14→`md(13)`、16→`lg(15)`、18→`xl(17)`、26→`display(24)`。
|
||||
- 新增 `--iwb-font-display: 24px`(第 7 档):首页主标题原本 26px,压到 `2xl(20)` 会和面板标题同级,页面层级会塌。这一档只给「页面叫什么名字」用,不许进卡片/面板/列表。
|
||||
|
||||
**验收方式换了**
|
||||
|
||||
- 不再只靠肉眼看截图:改动前后各采一次首页 20 个关键元素的**计算样式**(`font-size` / `padding` / `margin` / `gap` / `radius` / `height`)逐项比对。20 个里 9 个有变化,全部是预期项,没有「没打算改却被改」的属性。
|
||||
- 12 张视觉基线:**只有首页亮/暗 2 张变化**,其余 10 张 0 diff —— 正是「只动首页/库」的期望结果。
|
||||
- 单测里钉像素值的断言(`css.includes('font-size: 15px')`)改为钉 token 档位(`var(--iwb-font-lg)`),断言语义从「这个值」升级为「这个层级」。
|
||||
|
||||
## v3.26.45(2026-11-23)浮层层级表 + 阴影四档:修好「弹窗里点保存看不到成功提示」
|
||||
|
||||
> **状态:待发布**(`verify:ci` 全绿、12 张视觉基线 0 diff;未打 tag)
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
|---|---|---|---|---|
|
||||
| **B1 壳层** ✅ | `.iwb-tabstrip/.iwb-tab`(5 套)、`.iwb-dock-*`、`.iwb-toolbar*`、`.iwb-statusbar` | 页签收敛为 1 套(单框扁平 + 品牌高亮 + `--iwb-tab-height`);字号/圆角/间距换 token | 0.5d | 首页/画布截图;5 套类名只留 1 套 |
|
||||
| **B2 浮层** ✅ | `.iwb-modal/.iwb-fullmask/.iwb-command/.iwb-ctxmenu/.iwb-toast/.iwb-pop*` | 圆角 → `radius-panel/popover`;阴影 → `elevation-2/3/4`;z-index → `--iwb-z-*`(toast 提到 modal 之上) | 0.5d | 遮罩/弹窗层级实测:toast 在确认框之上 |
|
||||
| **B3 首页/库** | `.iwb-home-*/.iwb-lib-*/.iwb-res-*` | 间距归并(就近下取)、字号 8 档 | 0.5d | 首页截图;文案换行逐条看 |
|
||||
| **B3 首页/库** ✅ | `.iwb-home-*/.iwb-lib-*/.iwb-res-*` | 间距归并(就近下取)、字号 7 档(新增 `display`) | 0.5d | 首页截图;文案换行逐条看 |
|
||||
| **B4 设置/外观** | `.iwb-settings-modal/.iwb-appear-*/.iwb-setcell` | 控件统一 `pad-control` / `control-height` | 0.5d | 设置页截图 |
|
||||
| **B5 节点** | `.iwb-node*/.iwb-gen-*/.iwb-port` | 节点内字号 12/15 归口;圆角走 `--iwb-node-radius`;端口/小标签换 `bg-chip` | 1d | 画布截图(最复杂,单独一轮) |
|
||||
| **B6 插件** | `plugins/**` + 插件源码仓库 | 硬编码 → `--iwb-*`;`ALLOW_FILES` 逐项清零 | 0.5d | 契约测试白名单 4 → 0 |
|
||||
@@ -183,6 +183,30 @@
|
||||
长解释放在守卫测试与本文里 —— 这类解释写在棘轮文件里注定被删,写在测试里才活得住。
|
||||
3. 新增单测文件会让 `CONTRIBUTING.md` 的单测计数过期,`node scripts/sync-facts.js --write` 一条命令同步。
|
||||
|
||||
**B3 执行结果(v3.26.46,2026-11-23)**:
|
||||
|
||||
| 项 | 计划 | 实际 | 说明 |
|
||||
|---|---|---|---|
|
||||
| 死代码 | — | **删 30 条死规则 + 4 条死声明** | 25 个类名在 `dist/app.js` 里 0 次:`home-title/subtitle/new/head/kicker/card-main/card-check*/card-rename/cats/side-foot/menu-btn/menu-sep`、`lib-tabs/lib-tab/lib-handle`。另有一条 `manage` 复选框规则:批量管理 v3.22 起改成「点卡片=选中」,元素根本不渲染,样式还留着 |
|
||||
| `.iwb-lib-*` 不是死代码 | 按 B1 经验先查引用 | **是插件契约,保留并 token 化** | `plugins/promptlib` 与 `plugins/grouplib` 在外壳里直接复用宿主的 `.iwb-lib-head/body/chips/cards/searchscope` 并局部覆盖。只按 `dist/app.js` 计数会误判成死代码 —— 必须连 `plugins/**` 一起查 |
|
||||
| 间距 | 就近下取 | 91 处 → **5 处**(全是布局值) | 只留 `max(24px, calc(...))` 页面留白、`1580px` 版心、`52px` 导航让位;规范里写明「为什么这几个必须写死」 |
|
||||
| 字号 | 8 档 | **7 档**(6 + 新增 `display` 24px) | 首页主标题 26px 压到 `2xl(20)` 会与面板标题同级,层级塌掉。归并:14→`md(13)`、16→`lg(15)`、18→`xl(17)`、26→`display(24)` |
|
||||
| 视觉基线 | 12 张 0 diff | **首页 2 张变化,其余 10 张 0 diff** | 正是「只动首页/库」的期望结果;首页亮/暗各看过一遍,无裁切、无重叠、无换行错位 |
|
||||
|
||||
**做法:用「计算样式 diff」代替「肉眼看截图」。**
|
||||
改动前先用 Playwright 采一份首页 20 个关键元素的 `fontSize / padding / margin / gap / radius / height`,
|
||||
改完再采一份,逐元素比对。20 个元素里 9 个有变化,全部是预期内的(侧栏 item 38→34、主标题 26→24 等),
|
||||
没有「我没打算改却被改了」的项。截图只能告诉你「看起来不一样」,这个能告诉你**具体哪个属性从多少变成了多少**。
|
||||
B4/B5 建议照这个办法做(比逐张看截图快,也不会漏)。
|
||||
|
||||
**踩到的两个坑**:
|
||||
1. **同一属性叠了 5 层**:`.iwb-home-panel` 上有 4 条规则写 padding(`90px` / `116px … 60px` / `24px` / `72px`),
|
||||
全被后面 specificity 更高的 `.iwb-overlay .iwb-home-panel { padding: 0 }` 覆盖 —— 改数字一点反应都没有。
|
||||
这类「看起来在管布局、实际全是死声明」的叠层最费时间,靠计算样式一采就现形(padding 采出来是 `0px`)。
|
||||
2. **单测钉着像素值**:`page-chrome-regression-test` 里 `css.includes('font-size: 15px')` 这类断言,
|
||||
token 化后必红,但它真正要保护的是「卡片标题用 `lg` 档」这个层级关系。已改成钉 token 档位
|
||||
(`font-size: var(--iwb-font-lg)`),断言反而更强了。
|
||||
|
||||
**每批三条硬验收**:
|
||||
1. 亮/暗两张截图 `0 diff`(B1 例外:允许 tab 视觉变化,需人工确认)
|
||||
2. `token-audit.js` 对应计数下降
|
||||
@@ -217,7 +241,8 @@
|
||||
| 3.26.43 | M0 + M1 | 仅按钮高亮恢复 | 清账,风险最低 |
|
||||
| 3.26.44 | M2 + M3 + M4-B1 | **有变化** | 附亮/暗前后对比图;单独可回滚。M3 与 B1 搭同一版:M3 零观感、B1 只有标签变化,合起来只解释一次 |
|
||||
| 3.26.45 | M4-B2 浮层 | 几乎零(阴影略软 + toast 可见性修复) | 层级表 + 阴影 4 档;toast 从「被弹窗盖住」修好,用户能感知的是「以前看不到的成功提示现在看得到」 |
|
||||
| 3.26.46–3.26.49 | M4-B3–B6 | 仅 B5 有变化 | 每批可单独发 |
|
||||
| 3.26.46 | M4-B3 首页/库 | **有变化** | 首页主标题 26→24、侧栏条目 38→34、卡片脚注更紧;同时删了 30 条死规则。用户能感知的是「首页更紧凑」,附亮/暗前后对比图 |
|
||||
| 3.26.47–3.26.50 | M4-B4–B6 | 仅 B5 有变化 | 每批可单独发 |
|
||||
| 3.27.7 | M5 | 零 | 闸门上线 |
|
||||
| 3.28.0 | M6 | 零 | 案例沉淀 |
|
||||
|
||||
@@ -229,12 +254,12 @@
|
||||
| 指标 | 基线(实测) | M4 后目标 | M6 后目标 |
|
||||
|---|---|---|---|
|
||||
| 引用但未定义的变量 | 7 | 0 | 0 |
|
||||
| 字号档数 | 19 | 8 | 8 |
|
||||
| 字号档数 | 19 | 7(B3 后散值 **17**;闭集 7 档已建) | 7 |
|
||||
| 圆角档数 | 18 | 5 | 5 |
|
||||
| 间距档数 | 30 | ≤16 | ≤16 |
|
||||
| 字号写死处 | 281 | ≤60 | ≤20 |
|
||||
| 圆角写死处 | 164 | ≤40(B2 后 **142**) | ≤10 |
|
||||
| 间距写死处 | 644 | ≤200 | ≤80 |
|
||||
| 字号写死处 | 268 | ≤60(B3 后 **243**) | ≤20 |
|
||||
| 圆角写死处 | 164 | ≤40(B3 后 **139**) | ≤10 |
|
||||
| 间距写死处 | 629 | ≤200(B3 后 **548**) | ≤80 |
|
||||
| 阴影写法种类 | 52 | ≤8 | 5 |
|
||||
| z-index 取值种类 | 42 | ≤10(B2 后 **31**) | 9 |
|
||||
| `var(--iwb-layer)` 引用 | 59(一词多义) | 0(已拆) | 0 |
|
||||
|
||||
@@ -426,6 +426,20 @@ L3 Contract ── 组件整体换肤时才加,能不建就不建
|
||||
|
||||
> `90/92/96/116/120` 不是间距,是**布局尺寸**(侧栏宽、面板高)。它们不进 token,归 `--iwb-layout-*` 且必须写明「为什么是这个数」。
|
||||
|
||||
**B3 落地(v3.26.46)**:首页/库 106 条规则全量换 token,范围内写死的间距值从 91 处降到 **5 处**,
|
||||
剩下 5 处都是布局尺寸,不是节奏值:
|
||||
|
||||
| 保留值 | 位置 | 为什么必须写死 |
|
||||
|---|---|---|
|
||||
| `max(24px, calc((100vw - 1580px) / 2))` ×2 | `.iwb-home-panel, .iwb-landing-panel` 左右留白 | 内容最大宽 1580 的响应式算式,改成 token 反而看不出「1580 是什么」;`24px` 是窗口窄时的最小留白 |
|
||||
| `1580px` ×2 | 同上 | 内容版心宽度,属布局 |
|
||||
| `52px` ×1 | `.iwb-overlay.iwb-view-home .iwb-home-side { margin-left }` | 对齐一级导航栏宽度(`.iwb-navrail` 52px),不是一个间距 |
|
||||
|
||||
> 这一批**执行了收敛**(就近下取),没有按 §9-③ 的「先等值替换」走 —— 因为只换写法而不换值,
|
||||
> 30 档散值会原封不动留在代码里,「13px 的 gap 和 14px 的 padding 并存」这类问题看不见也治不了。
|
||||
> 已核对的观感变化:侧栏 item 38→34px、侧栏左右内边距 14→12、卡片脚注 18→16、首页主标题 26→24。
|
||||
> 值都往小走,没有出现「挤出一行 / 文字换行」。验收方式是**计算样式逐元素 diff**(见下)。
|
||||
|
||||
#### 3.2.1 组件级尺寸(B1 新增)
|
||||
|
||||
这类 token 不属于「间距/字号」通用尺度,而是**某个组件的固有尺寸**。它们存在的理由只有一个:
|
||||
@@ -439,21 +453,27 @@ L3 Contract ── 组件整体换肤时才加,能不建就不建
|
||||
|
||||
### 3.3 字号 / 行高 / 字重
|
||||
|
||||
**已落地(v3.26.44,M4-B1)**:6 档。
|
||||
**已落地(v3.26.44,M4-B1)**:6 档。**v3.26.46(M4-B3)补第 7 档 `display`**。
|
||||
|
||||
| token | 值 | 归并掉 | 用途 |
|
||||
|---|---|---|---|
|
||||
| `--iwb-font-xs` | 11px | 10, 11.5 | 状态栏、徽标、辅助信息 |
|
||||
| `--iwb-font-sm` | 12px | 12.5 | **默认正文 / 标签**(UI 里出现最多) |
|
||||
| `--iwb-font-md` | 13px | 13.5 | 面板正文、工具栏标题 |
|
||||
| `--iwb-font-lg` | 15px | 14, 15.5 | 小标题、节点标题 |
|
||||
| `--iwb-font-xl` | 17px | 16, 17.5 | 面板标题 |
|
||||
| `--iwb-font-md` | 13px | 13.5, **14** | 面板正文、列表项、工具栏标题 |
|
||||
| `--iwb-font-lg` | 15px | 14, 15.5, **16** | 小标题、节点标题、卡片标题 |
|
||||
| `--iwb-font-xl` | 17px | 16, 17.5, **18** | 面板标题、侧栏标题、图标字形 |
|
||||
| `--iwb-font-2xl` | 20px | 18, 19, 22 | 页面大标题 |
|
||||
| `--iwb-font-display` | 24px | **26, 28, 30** | 展示级标题:页面/视图主标题(全仓 ≤5 处) |
|
||||
|
||||
> **为什么补第 7 档(B3 归并 26px 时定的)**:首页主标题原本 26px,压到 `2xl(20)` 会与面板标题同级,
|
||||
> 页面层级直接塌掉(用户看到的是「标题变小了」而不是「变整齐了」)。`display` 只给**页面级**标题用,
|
||||
> 与 `2xl`(区块级)隔一档;全仓当前只有 26/28/30px 三处候选,不构成新的散值来源。
|
||||
> 反向约束:**`display` 不许用在卡片、面板、列表里**,只出现在「这个视图叫什么名字」的位置。
|
||||
|
||||
> **与初版计划的偏差**:原计划 8 档语义名(`caption/label/body/body-lg/title-sm/title/heading/display`)。
|
||||
> 落地改为 6 档 + 短名,原因同上(两层名字增加查找成本)。原计划里 14px 与 18px 两档在实际代码中
|
||||
> 出现次数很少,B3(首页/库)与 B4(设置)归并时再决定要不要补;`16px` 目前散落在设置页标题等处,
|
||||
> 归到 `font-lg(15)` 还是 `font-xl(17)` 会产生可见变化,留到那两批单独确认。
|
||||
> 落地改为 6 档 + 短名,原因同上(两层名字增加查找成本)。B3 归并结论:**14→`md`、16→`lg`、18→`xl`**
|
||||
> (18 是侧栏标题与图标字形,向上取到 20 会让侧栏标题比导航项大太多,所以走 17);设置页的 16px 标题
|
||||
> 按同一规则归 `lg`,B4 里若观感变差再单独提。
|
||||
|
||||
- 行高:`--iwb-lh-tight:1.25` / `--iwb-lh-normal:1.45` / `--iwb-lh-loose:1.6`(正文 1.45,单行控件 1.25)
|
||||
- 字重:`--iwb-fw-regular:400` / `-medium:500` / `-semibold:600` / `-bold:700`
|
||||
@@ -698,6 +718,11 @@ L3 Contract ── 组件整体换肤时才加,能不建就不建
|
||||
|
||||
## 6. 现有页面统一清单(按优先级)
|
||||
|
||||
> **进度(2026-11-23,v3.26.46)**:P0 六项已全部完成(3.26.43–3.26.44);P1 的页签/圆角/阴影三项完成(B1–B2);
|
||||
> P1 字号与 P2 间距完成「首页/库」一批(B3),其余批次见 `docs/plans/design-tokens-rollout.md`。
|
||||
> 下表保留当时的**诊断原貌**,不逐行改状态 —— 改状态会让「当初为什么这么排优先级」丢失。
|
||||
> 其中 `.iwb-lib-tab` / `.iwb-rail-tab` / `.iwb-drawer-tab` / `.iwb-res-tab` 已随 B1/B3 **删除**。
|
||||
|
||||
| 优先级 | 位置 | 现状 | 目标 | 风险 |
|
||||
|---|---|---|---|---|
|
||||
| **P0** | `style.css:690,691` | `var(--iwb-accent)` 未定义 + 两个类无生产者 | **删两条死规则**(复核后确认无生产者,不是变色修复) | 无 |
|
||||
@@ -766,6 +791,7 @@ L3 Contract ── 组件整体换肤时才加,能不建就不建
|
||||
裁定后本文状态为「生效」,`docs/plans/design-tokens-rollout.md` 的 M0 决策项视为完成。
|
||||
|
||||
**执行进度**:决定 ④ 的两个版本都已落地 —— 3.26.43 放 D1③(系统跟随重算)+ M1 清账;3.26.44 放 D1①②/D2–D9。详见 §1.7、§1.8。
|
||||
决定 ③(间距)在 3.26.46 的 B3 批次上**提前做了收敛**(就近下取),原因与观感核对结果见 §3.2 的「B3 落地」。
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -340,8 +340,8 @@ dist/ += favicon.svg / _headers / THIRD_PARTY_NOTICES.md
|
||||
|
||||
> **数值以 [`design-tokens.md`](design-tokens.md) 为准**:颜色、间距、字号、圆角、阴影、层级、动效的取值与新增流程都在那里;本节只管行为与结构,不重复定义值。
|
||||
|
||||
- **Tab(页签)一律「单框扁平」**:外层容器透明无边框(只留间距),active 用**品牌色扁平高亮**(`color-mix(in srgb, var(--iwb-brand) N%, transparent)`),hover 用浅色底。**禁止「容器 pill + 页签 pill」嵌套双层框**。已统一:`.iwb-res-tabs` / `.iwb-tabstrip`+`.iwb-tab`;其余变体(`.iwb-drawer-tab` / `.iwb-lib-tab` / `.iwb-rail-tab` / `.iwb-ws-tab`)应逐步对齐;新增 tab 必须用该样式。
|
||||
- **颜色/间距一律走 CSS 变量**(`var(--iwb-text2)` / `var(--iwb-brand)` / `var(--iwb-border)`…),不写死色值;高亮态用 `color-mix` 派生透明底。
|
||||
- **Tab(页签)一律「单框扁平」**:外层容器透明无边框(只留间距),active 用**品牌色扁平高亮**(`color-mix(in srgb, var(--iwb-brand) N%, transparent)`),hover 用浅色底。**禁止「容器 pill + 页签 pill」嵌套双层框**。现**只剩一套**:`.iwb-tabstrip` + `.iwb-tab`(v3.26.44 起)。历史变体 `.iwb-drawer-tab` / `.iwb-lib-tab` / `.iwb-rail-tab` / `.iwb-res-tab` 已随 B1/B3 批次删除 —— **不得复活**,新增 tab 必须用 `.iwb-tab` 样式。
|
||||
- **颜色/字号/间距/圆角一律走 token**(`var(--iwb-text2)` / `--iwb-font-*` / `--iwb-space-*` / `--iwb-radius-*`),不写死色值与 px;高亮态用 `color-mix` 派生透明底。删除样式规则前先查 `dist/app.js` **和 `plugins/**`** —— 插件面板直接复用宿主类名(如 `.iwb-lib-*`),只看产物计数会把插件契约当成死代码删掉。
|
||||
- **预览大图** `.iwb-imgpreview img` 必须**同时**约束宽高(`max-width:92vw; max-height:88vh; width/height:auto; object-fit:contain`),保持比例居中不溢出;该类**只保留一份**权威定义,禁止复制第二份。
|
||||
|
||||
### 12.5 图库(资源中心·图库页)
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "image-workbench-web",
|
||||
"private": true,
|
||||
"version": "3.26.45",
|
||||
"version": "3.26.46",
|
||||
"description": "Browser-based node canvas image workbench",
|
||||
"scripts": {
|
||||
"build": "node scripts/build.js && node scripts/copy-plugins.js",
|
||||
|
||||
@@ -121,6 +121,7 @@ const SCALE = [
|
||||
['--iwb-font-lg', '15px', '小标题/节点标题'],
|
||||
['--iwb-font-xl', '17px', '面板标题'],
|
||||
['--iwb-font-2xl', '20px', '页面大标题'],
|
||||
['--iwb-font-display', '24px', '展示级标题:页面/视图主标题(≤5 处)'],
|
||||
['--iwb-chrome-h', '36px', '顶部标签条高度:tabstrip / dockarea / home-panel 三处共用(原来各写一遍 36px)'],
|
||||
['--iwb-tab-h', '28px', '标签高度'],
|
||||
['--iwb-tab-radius', '7px', '标签圆角'],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "image-workbench",
|
||||
"version": "3.26.45",
|
||||
"version": "3.26.46",
|
||||
"identifier": "com.malongan.imageworkbench",
|
||||
"build": {
|
||||
"frontendDist": "../dist",
|
||||
|
||||
@@ -115,6 +115,7 @@
|
||||
--iwb-font-lg: 15px; /* 小标题/节点标题 */
|
||||
--iwb-font-xl: 17px; /* 面板标题 */
|
||||
--iwb-font-2xl: 20px; /* 页面大标题 */
|
||||
--iwb-font-display: 24px; /* 展示级标题:页面/视图主标题(≤5 处) */
|
||||
--iwb-chrome-h: 36px; /* 顶部标签条高度:tabstrip / dockarea / home-panel 三处共用(原来各写一遍 36px) */
|
||||
--iwb-tab-h: 28px; /* 标签高度 */
|
||||
--iwb-tab-radius: 7px; /* 标签圆角 */
|
||||
|
||||
@@ -201,23 +201,21 @@ button { font-family: inherit; }
|
||||
.iwb-provider-card { border: 1px solid var(--iwb-border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
|
||||
.iwb-keyrow { display: flex; gap: 6px; align-items: center; }
|
||||
.iwb-lib { position: absolute; top: 0; right: 0; bottom: 0; background: var(--iwb-panel); border-left: 1px solid var(--iwb-border2); z-index: 20; display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(0,0,0,0.15); }
|
||||
.iwb-lib-handle { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 3; }
|
||||
.iwb-lib-handle:hover { background: color-mix(in srgb, var(--iwb-tint) 14%, transparent); }
|
||||
.iwb-lib-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--iwb-border); }
|
||||
.iwb-lib-body { flex: 1; overflow: hidden; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
|
||||
.iwb-lib-fixed { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; }
|
||||
.iwb-lib-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; }
|
||||
.iwb-lib-head { display: flex; align-items: center; gap: var(--iwb-space-8); padding: var(--iwb-space-12) var(--iwb-space-12); border-bottom: 1px solid var(--iwb-border); }
|
||||
.iwb-lib-body { flex: 1; overflow: hidden; padding: var(--iwb-space-12) var(--iwb-space-12); display: flex; flex-direction: column; gap: var(--iwb-space-8); }
|
||||
.iwb-lib-fixed { flex: 0 0 auto; display: flex; flex-direction: column; gap: var(--iwb-space-8); }
|
||||
.iwb-lib-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--iwb-space-8); padding-right: var(--iwb-space-2); }
|
||||
/* 提示词库:分类胶囊行 + 分组管理 */
|
||||
.iwb-lib-chips { display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; padding-bottom: 4px; min-width: 0; }
|
||||
.iwb-lib-chips { display: flex; gap: var(--iwb-space-6); flex-wrap: nowrap; align-items: center; padding-bottom: var(--iwb-space-4); min-width: 0; }
|
||||
/* 分类胶囊行(2026-10-20):分组多了不再换行挤矮卡片区 ⇒ 单行横向滚动 + 右侧渐隐提示 */
|
||||
.iwb-lib-chips-scroll { display: flex; gap: 6px; flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 2px; }
|
||||
.iwb-lib-chips-scroll { display: flex; gap: var(--iwb-space-6); flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none; padding-bottom: var(--iwb-space-2); }
|
||||
.iwb-lib-chips-scroll::-webkit-scrollbar { display: none; }
|
||||
.iwb-lib-chips-scroll > .iwb-chip:last-child { margin-right: 18px; }
|
||||
.iwb-lib-chips-scroll > .iwb-chip:last-child { margin-right: var(--iwb-space-16); }
|
||||
/* 右侧渐隐:提示「右边还有内容,可横向滚动」 */
|
||||
.iwb-lib-chips-scroll { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent 100%); mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent 100%); }
|
||||
/* 搜索范围提示(2026-10-20):搜索是全局的,明确告诉用户当前在搜什么范围 */
|
||||
.iwb-lib-searchscope { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; font-size: 11px; color: var(--iwb-text2); background: color-mix(in srgb, var(--iwb-brand) 10%, transparent); border: 1px solid color-mix(in srgb, var(--iwb-brand) 28%, transparent); border-radius: 999px; padding: 2px 4px 2px 9px; white-space: nowrap; }
|
||||
.iwb-lib-searchscope-back { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; padding: 0; border: none; border-radius: 999px; background: transparent; color: var(--iwb-text2); font-size: 13px; line-height: 1; cursor: pointer; }
|
||||
.iwb-lib-searchscope { display: inline-flex; align-items: center; gap: var(--iwb-space-4); flex: 0 0 auto; font-size: var(--iwb-font-xs); color: var(--iwb-text2); background: color-mix(in srgb, var(--iwb-brand) 10%, transparent); border: 1px solid color-mix(in srgb, var(--iwb-brand) 28%, transparent); border-radius: 999px; padding: var(--iwb-space-2) var(--iwb-space-4) var(--iwb-space-2) var(--iwb-space-8); white-space: nowrap; }
|
||||
.iwb-lib-searchscope-back { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; padding: 0; border: none; border-radius: 999px; background: transparent; color: var(--iwb-text2); font-size: var(--iwb-font-md); line-height: 1; cursor: pointer; }
|
||||
.iwb-lib-searchscope-back:hover { background: color-mix(in srgb, var(--iwb-tint) 12%, transparent); color: var(--iwb-text); }
|
||||
.iwb-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; background: var(--iwb-layer); border: 1px solid var(--iwb-border); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--iwb-text2); cursor: pointer; white-space: nowrap; transition: all 0.15s; }
|
||||
.iwb-chip:hover { color: var(--iwb-text); border-color: var(--iwb-border2); }
|
||||
@@ -264,7 +262,7 @@ button { font-family: inherit; }
|
||||
.iwb-full-resize-b { bottom: 0; left: 0; right: 0; height: 7px; cursor: ns-resize; }
|
||||
/* 边缘 hover 的淡入提示:只在「主动去找」时出现,静止时完全干净 */
|
||||
.iwb-full-resize-r:hover, .iwb-full-resize-l:hover, .iwb-full-resize-t:hover, .iwb-full-resize-b:hover { background: color-mix(in srgb, var(--iwb-brand) 14%, transparent); }
|
||||
.iwb-fullpanel .iwb-lib-chips { flex: 0 0 auto; padding: 8px 14px 6px; border-bottom: 1px solid var(--iwb-border); }
|
||||
.iwb-fullpanel .iwb-lib-chips { flex: 0 0 auto; padding: var(--iwb-space-8) var(--iwb-space-12) var(--iwb-space-6); border-bottom: 1px solid var(--iwb-border); }
|
||||
.iwb-full-batch { display: flex; align-items: center; gap: 8px; padding: 6px 14px; background: color-mix(in srgb, var(--iwb-tint) 5%, transparent); border-bottom: 1px solid var(--iwb-border); flex: 0 0 auto; }
|
||||
.iwb-full-batch-info { font-size: 12px; font-weight: 600; color: var(--iwb-text2); white-space: nowrap; }
|
||||
.iwb-full-batch-move { width: 170px; }
|
||||
@@ -294,7 +292,7 @@ button { font-family: inherit; }
|
||||
/* 搜索高亮 */
|
||||
.iwb-hl { background: color-mix(in srgb, var(--iwb-tint) 14%, transparent); color: var(--iwb-text); border-radius: 2px; font-weight: 700; }
|
||||
/* 面板卡片:窄面板单列,加宽自动多列 */
|
||||
.iwb-lib-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; align-content: start; }
|
||||
.iwb-lib-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--iwb-space-8); align-content: start; }
|
||||
.iwb-ptext-clickable { cursor: pointer; }
|
||||
.iwb-ptext-clickable:hover { color: var(--iwb-text); }
|
||||
.iwb-ptext-open { -webkit-line-clamp: unset; overflow: visible; }
|
||||
@@ -407,8 +405,6 @@ button { font-family: inherit; }
|
||||
整条栏仍是整组拖拽热区。原先为分隔标题区/操作区画的 .iwb-group-sep 与按钮样式一并删除。 */
|
||||
/* 选中态:去掉虚线框后,唯一的强提示落在操作栏描边(底色 7% 同时在) */
|
||||
.iwb-group-sel .iwb-group-bar { border-color: color-mix(in srgb, var(--iwb-tint) 34%, transparent); box-shadow: 0 2px 12px rgba(0,0,0,0.18); }
|
||||
.iwb-lib-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--iwb-border); padding: 6px 12px 0; }
|
||||
.iwb-lib-tab { background: transparent; border: 1px solid transparent; border-bottom: none; padding: 6px 12px; border-radius: 8px 8px 0 0; font-size: 12px; color: var(--iwb-text2); cursor: pointer; }
|
||||
.iwb-lib .iwb-pcard { margin-bottom: 8px; }
|
||||
|
||||
/* ---- v2 P8:增强 ---- */
|
||||
@@ -503,8 +499,6 @@ button { font-family: inherit; }
|
||||
.iwb-toolbar-wrap { position: absolute; left: 0; right: 60px; bottom: 14px; display: flex; justify-content: center; pointer-events: none; z-index: 10; }
|
||||
.iwb-overlay.has-minimap .iwb-toolbar-wrap { right: 244px; }
|
||||
|
||||
|
||||
|
||||
/* ---- v3:工具栏分组 ---- */
|
||||
.iwb-tgroup { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 8px; background: var(--iwb-layer); font-size: 10px; color: var(--iwb-text2); }
|
||||
.iwb-tgroup:empty { display: none; }
|
||||
@@ -899,7 +893,6 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-out-grouplist { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
|
||||
.iwb-out-cell { position: relative; min-width: 0; }
|
||||
|
||||
|
||||
/* 大图预览:左右切换 + 下载条 */
|
||||
.iwb-imgpreview { position: fixed; inset: 0; background: rgba(10, 12, 18, 0.92); z-index: var(--iwb-z-preview); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
|
||||
/* 预览图自适应宽+高:同时约束横向与纵向,保持宽高比居中显示,不溢出(图库预览已取完整原图,可能很大/超高/超宽) */
|
||||
@@ -987,7 +980,6 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-oplog-kind { flex: 0 0 44px; color: var(--iwb-brand-text, var(--iwb-brand)); font-weight: 700; }
|
||||
.iwb-oplog-msg { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
|
||||
|
||||
.iwb-gen-cell .iwb-input { min-height: 32px; padding: 5px 24px 5px 8px; cursor: pointer; }
|
||||
.iwb-gen-row { gap: 6px; min-height: 36px; }
|
||||
.iwb-size-preset-grid { display: grid; grid-template-columns: 110px repeat(3, minmax(108px, 1fr)); gap: 6px; align-items: center; margin: 8px 0; }
|
||||
@@ -1002,14 +994,11 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-shell-nav-item:hover, .iwb-shell-nav-active { background: var(--iwb-layer2); color: var(--iwb-text); }
|
||||
.iwb-shell-nav-caption { padding: 0 8px; font-size: 11px; color: var(--iwb-text2); }
|
||||
.iwb-home-panel { position: absolute; inset: 0; z-index: 20; overflow: auto; background: var(--iwb-home-bg); }
|
||||
.iwb-home-title { font-weight: 700; color: var(--iwb-text); }
|
||||
.iwb-home-subtitle { margin-top: 8px; color: var(--iwb-text2); }
|
||||
|
||||
.iwb-home-sec-head { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--iwb-text2); letter-spacing: .5px; margin: 6px 0 2px; padding-top: 8px; border-top: 1px solid var(--iwb-hr); }
|
||||
.iwb-home-sec-head { grid-column: 1 / -1; font-size: var(--iwb-font-sm); font-weight: 700; color: var(--iwb-text2); letter-spacing: .5px; margin: var(--iwb-space-6) 0 var(--iwb-space-2); padding-top: var(--iwb-space-8); border-top: 1px solid var(--iwb-hr); }
|
||||
.iwb-home-sec-head:first-child { border-top: none; padding-top: 0; }
|
||||
|
||||
.iwb-home-card span { color: var(--iwb-text2); font-size: 12px; }
|
||||
.iwb-home-new { align-items: center; justify-content: center; color: var(--iwb-brand-text, var(--iwb-brand)); }
|
||||
.iwb-home-card span { color: var(--iwb-text2); font-size: var(--iwb-font-sm); }
|
||||
.iwb-canvas-hidden { visibility: hidden; pointer-events: none; }
|
||||
.iwb-shell-nav { position: static; flex-direction: column; gap: 3px; padding: 8px; border: 0; border-bottom: 1px solid var(--iwb-border); border-radius: 0; background: transparent; box-shadow: none; }
|
||||
.iwb-shell-nav-item { width: 100%; justify-content: flex-start; min-height: 34px; }
|
||||
@@ -1031,17 +1020,11 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-wsrail-title, .iwb-wsrail-current, .iwb-wsrail-foot { display: none; }
|
||||
.iwb-shell-nav { display: none; }
|
||||
.ws-expanded .iwb-wsrail { width: 52px; }
|
||||
.iwb-home-panel { padding-top: 90px; }
|
||||
.iwb-home-head { display: flex; justify-content: space-between; gap: 20px; }
|
||||
.iwb-home-kicker { color: var(--iwb-text2); font-size: 12px; }
|
||||
.iwb-home-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
|
||||
.iwb-home-actions { display: flex; gap: var(--iwb-space-8); flex-wrap: wrap; justify-content: flex-end; }
|
||||
/* 仅首页用「深底浅字」;画布内的主按钮(生成 / 批量出图)保持品牌底 + 白字,避免暗色下发灰看不清 */
|
||||
.iwb-home-panel .iwb-btn-primary { background: var(--iwb-text); color: var(--iwb-bg); }
|
||||
|
||||
.iwb-home-card > input { position: absolute; left: 18px; top: 20px; width: 17px; height: 17px; accent-color: var(--iwb-text); z-index: 2; }
|
||||
.iwb-home-card-main { display: flex; flex: 1 1 auto; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 10px; width: 100%; min-height: 105px; padding: 26px 0 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
|
||||
.iwb-home-card-main strong { padding-left: 30px; font-size: 18px; }
|
||||
.iwb-home-card-main span, .iwb-home-card-main small { color: var(--iwb-text2); }
|
||||
/* 资源工具栏移至左侧:窄 rail + 可展开面板 */
|
||||
.iwb-canvas { left: 48px; top: 54px; }
|
||||
/* v4 参考布局:顶部产品导航、左侧资源区、中央画布三层分离 */
|
||||
@@ -1056,9 +1039,6 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
|
||||
.iwb-top-nav-icon:first-of-type { margin-left: auto; }
|
||||
.iwb-wsrail { top: 64px; }
|
||||
.iwb-home-panel { padding: 116px max(30px, calc((100vw - 1580px) / 2)) 60px; }
|
||||
.iwb-home-head { align-items: center; }
|
||||
.iwb-home-title { font-size: 34px; letter-spacing: -.03em; }
|
||||
|
||||
@media (max-width: 900px) { .iwb-top-nav-brand { margin-right: 4px; } .iwb-top-nav-item span, .iwb-top-nav-workspace { display: none; } .iwb-top-nav { padding: 0 8px; } .iwb-home-head { align-items: flex-start; flex-direction: column; } }
|
||||
/* v5:三页面语义与编辑器 chrome */
|
||||
@@ -1085,12 +1065,11 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
|
||||
/* v7:画布卡片(参考图1)、编辑器顶栏(参考图3)、左侧展开按钮(参考图2) */
|
||||
|
||||
.iwb-home-card-top { display: flex; align-items: center; gap: 12px; }
|
||||
.iwb-home-card-top { display: flex; align-items: center; gap: var(--iwb-space-12); }
|
||||
.iwb-home-card-top > input { position: static; width: 18px; height: 18px; accent-color: var(--iwb-text); z-index: 2; }
|
||||
.iwb-home-card-title { flex: 1; min-width: 0; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; display: flex; align-items: center; }
|
||||
.iwb-home-card-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
|
||||
|
||||
.iwb-home-card-actions button { border: 0; background: transparent; color: var(--iwb-text2); cursor: pointer; }
|
||||
.iwb-home-card-actions button:hover { background: var(--iwb-layer2); color: var(--iwb-text); }
|
||||
/* 进入画布加载动画 */
|
||||
@@ -1122,24 +1101,17 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-landing-actions .iwb-btn-primary { background: #111; color: #fff; }
|
||||
.iwb-landing-divider { margin: 90px auto 54px; }
|
||||
.iwb-landing-panel h2 { font-size: 28px; color: var(--iwb-text); margin-bottom: 10px; }
|
||||
/* v10:我的画布卡片交互——默认隐藏复选框与操作图标,hover 显示;批量管理模式显示复选框 */
|
||||
.iwb-home-card-check { display: none; }
|
||||
.iwb-home-card-check-placeholder { flex: 0 0 18px; width: 18px; height: 18px; }
|
||||
.iwb-home-card.iwb-manage .iwb-home-card-check { display: inline-block; }
|
||||
.iwb-home-card.iwb-manage .iwb-home-card-check-placeholder { display: none; }
|
||||
|
||||
/* 画布卡片:操作图标默认隐藏,hover / 键盘聚焦时显示(v3.22 起批量管理改为点选,不再渲染复选框) */
|
||||
.iwb-home-card:hover .iwb-home-card-actions,
|
||||
.iwb-home-card:focus-within .iwb-home-card-actions { opacity: 1; }
|
||||
.iwb-home-card-rename { flex: 1 1 auto; min-width: 0; height: 34px; font-size: 15px; color: var(--iwb-text); background: var(--iwb-bg); border: 1px solid var(--iwb-border2); border-radius: 8px; padding: 0 10px; }
|
||||
.iwb-home-actions .iwb-btn { min-height: 36px; }
|
||||
/* v11:统一画布卡片对齐与排版 */
|
||||
|
||||
|
||||
.iwb-home-card:hover { border-color: var(--iwb-border2); background: color-mix(in srgb, var(--iwb-panel) 76%, var(--iwb-home-bg) 24%); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
|
||||
.iwb-home-card-top { padding: 24px 22px 0 22px; }
|
||||
.iwb-home-card-title strong { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--iwb-text); }
|
||||
.iwb-home-card-top { padding: var(--iwb-space-24) var(--iwb-space-24) 0 var(--iwb-space-24); }
|
||||
.iwb-home-card-title strong { font-size: var(--iwb-font-lg); font-weight: 600; line-height: 1.35; color: var(--iwb-text); }
|
||||
|
||||
.iwb-home-card-foot small { color: var(--iwb-text2); font-size: 12px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; flex: 1 1 auto; }
|
||||
.iwb-home-card-foot small { color: var(--iwb-text2); font-size: var(--iwb-font-sm); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; flex: 1 1 auto; }
|
||||
|
||||
.iwb-home-card-actions button { width: 32px; height: 32px; border-radius: 8px; }
|
||||
/* v12:世界容器提升为合成层(节点随世界一起 transform,不单独建层) */
|
||||
@@ -1214,23 +1186,15 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-home-card-title { text-align: left; justify-content: flex-start; width: 100%; }
|
||||
.iwb-home-card-title strong { text-align: left; width: 100%; }
|
||||
|
||||
.iwb-home-card-meta-text { color: var(--iwb-text2); font-size: 13px; }
|
||||
.iwb-home-card-cat { border: 1px solid var(--iwb-border); border-radius: 999px; padding: 2px 10px; font-size: 11px; color: var(--iwb-text2); background: color-mix(in srgb, var(--iwb-tint) 6%, transparent); cursor: pointer; white-space: nowrap; }
|
||||
.iwb-home-card-meta-text { color: var(--iwb-text2); font-size: var(--iwb-font-md); }
|
||||
.iwb-home-card-cat { border: 1px solid var(--iwb-border); border-radius: 999px; padding: var(--iwb-space-2) var(--iwb-space-10); font-size: var(--iwb-font-xs); color: var(--iwb-text2); background: color-mix(in srgb, var(--iwb-tint) 6%, transparent); cursor: pointer; white-space: nowrap; }
|
||||
.iwb-home-card-cat-empty { color: var(--iwb-text2); background: transparent; border-color: var(--iwb-border2); }
|
||||
.iwb-home-card-cat:hover { border-color: var(--iwb-border2); color: var(--iwb-text); }
|
||||
.iwb-home-card-actions button { display: inline-flex; align-items: center; justify-content: center; }
|
||||
.iwb-home-card-selected { border-color: var(--iwb-border2); box-shadow: 0 0 0 1px var(--iwb-border2), 0 6px 18px rgba(0,0,0,.10); background: color-mix(in srgb, var(--iwb-panel) 72%, var(--iwb-layer) 28%); }
|
||||
.iwb-home-card-top .iwb-home-card-rename { height: 42px; font-size: 16px; flex: 1 1 auto; min-width: 0; box-sizing: border-box; }
|
||||
.iwb-home-cats { display: flex; flex-wrap: wrap; gap: 8px; }
|
||||
.iwb-home-cats .iwb-chip { cursor: pointer; }
|
||||
|
||||
/* 画布库:卡片撑满、去右侧留白、卡片更紧凑 */
|
||||
.iwb-home-panel { padding-left: 24px; padding-right: 24px; }
|
||||
|
||||
.iwb-home-card-top { padding-top: 18px; padding-left: 20px; padding-right: 20px; }
|
||||
|
||||
|
||||
/* 资源中心窗口四向缩放手柄 */
|
||||
.iwb-home-card-top { padding-top: var(--iwb-space-16); padding-left: var(--iwb-space-20); padding-right: var(--iwb-space-20); }
|
||||
|
||||
/* 画布编辑页:返回按钮 + 标题双击重命名 */
|
||||
.iwb-canvas-back { width: 30px; height: 30px; padding: 0; border-radius: 8px; font-size: 16px; flex: 0 0 auto; }
|
||||
@@ -1238,20 +1202,10 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-canvas-title:hover { background: var(--iwb-layer2); }
|
||||
.iwb-canvas-title-input { width: 220px; height: 30px; font-size: 15px; flex: 0 0 auto; }
|
||||
|
||||
/* 画布库布局统一:紧贴导航、内容撑满、头部/分类/卡片左对齐 */
|
||||
.iwb-home-panel { padding-top: 72px; padding-left: 24px; padding-right: 24px; }
|
||||
.iwb-home-head { min-height: 0; padding-top: 4px; padding-bottom: 18px; border-bottom: 1px solid var(--iwb-hr); }
|
||||
.iwb-home-kicker { margin-bottom: 6px; }
|
||||
.iwb-home-cats { margin-top: 16px; margin-bottom: 4px; }
|
||||
|
||||
/* 画布卡片:底部三个图标在卡片内右对齐 */
|
||||
|
||||
.iwb-home-card-actions { display: flex; gap: 6px; opacity: 0; transition: opacity .15s ease; flex: 0 0 auto; width: auto; margin-left: auto; justify-content: flex-end; }
|
||||
.iwb-home-card-actions { display: flex; gap: var(--iwb-space-6); opacity: 0; transition: opacity .15s ease; flex: 0 0 auto; width: auto; margin-left: auto; justify-content: flex-end; }
|
||||
.iwb-home-card-foot .iwb-home-card-actions { width: auto; }
|
||||
|
||||
|
||||
|
||||
|
||||
/* 画布库:顶部导航与内容水平对齐(统一左 24px,撑满) */
|
||||
.iwb-product-nav { padding-left: 24px; padding-right: 24px; }
|
||||
|
||||
@@ -1261,27 +1215,26 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-overlay.iwb-view-home { background: var(--iwb-bg); }
|
||||
.iwb-overlay .iwb-home-panel { position: absolute; inset: 0; padding: 0; margin: 0; display: flex; flex-direction: row; background: var(--iwb-home-bg); overflow: hidden; }
|
||||
|
||||
.iwb-home-side { width: 280px; flex: 0 0 280px; height: 100%; display: flex; flex-direction: column; padding: 18px 14px; gap: 8px; border-right: 1px solid var(--iwb-hr); background: var(--iwb-home-bg); overflow: hidden; }
|
||||
.iwb-home-side-head { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; color: var(--iwb-text); padding: 6px 8px 14px; }
|
||||
.iwb-home-side { width: 280px; flex: 0 0 280px; height: 100%; display: flex; flex-direction: column; padding: var(--iwb-space-16) var(--iwb-space-12); gap: var(--iwb-space-8); border-right: 1px solid var(--iwb-hr); background: var(--iwb-home-bg); overflow: hidden; }
|
||||
.iwb-home-side-head { display: flex; align-items: center; gap: var(--iwb-space-8); font-size: var(--iwb-font-xl); font-weight: 700; color: var(--iwb-text); padding: var(--iwb-space-6) var(--iwb-space-8) var(--iwb-space-12); }
|
||||
.iwb-home-side-head .iwb-ic { color: var(--iwb-text); }
|
||||
.iwb-home-search { padding: 0 4px 8px; }
|
||||
.iwb-home-search { padding: 0 var(--iwb-space-4) var(--iwb-space-8); }
|
||||
.iwb-home-search .iwb-input { width: 100%; height: 36px; box-sizing: border-box; background: color-mix(in srgb, var(--iwb-panel) 50%, var(--iwb-home-bg) 50%); }
|
||||
.iwb-home-search .iwb-input:focus { border-color: var(--iwb-border2); box-shadow: 0 0 0 2px color-mix(in srgb, var(--iwb-tint) 15%, transparent); }
|
||||
.iwb-home-side-nav, .iwb-home-side-cats, .iwb-home-side-trash { display: flex; flex-direction: column; gap: 2px; }
|
||||
.iwb-home-side-nav, .iwb-home-side-cats, .iwb-home-side-trash { display: flex; flex-direction: column; gap: var(--iwb-space-2); }
|
||||
.iwb-home-side-cats { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
|
||||
.iwb-home-side-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--iwb-text2); font-size: 14px; cursor: pointer; text-align: left; box-sizing: border-box; }
|
||||
.iwb-home-side-item { display: flex; align-items: center; gap: var(--iwb-space-10); width: 100%; padding: var(--iwb-space-8) var(--iwb-space-10); border: 0; border-radius: 8px; background: transparent; color: var(--iwb-text2); font-size: var(--iwb-font-md); cursor: pointer; text-align: left; box-sizing: border-box; }
|
||||
.iwb-home-side-item .iwb-ic { color: var(--iwb-text2); }
|
||||
.iwb-home-side-item:hover { background: color-mix(in srgb, var(--iwb-panel) 45%, transparent); color: var(--iwb-text); }
|
||||
.iwb-home-side-item:focus-visible { outline: var(--iwb-focus-ring); outline-offset: -2px; }
|
||||
.iwb-home-side-item.active { background: color-mix(in srgb, var(--iwb-panel) 32%, transparent); color: var(--iwb-text); font-weight: 600; }
|
||||
.iwb-home-side-item.active .iwb-ic { color: var(--iwb-text); }
|
||||
.iwb-home-side-item.iwb-home-side-add { color: var(--iwb-text); font-size: 13px; }
|
||||
.iwb-home-side-trash { padding-top: 6px; }
|
||||
.iwb-home-side-foot { padding-top: 8px; border-top: 1px solid var(--iwb-hr); display: flex; flex-direction: column; gap: 2px; }
|
||||
.iwb-home-side-item.iwb-home-side-add { color: var(--iwb-text); font-size: var(--iwb-font-md); }
|
||||
.iwb-home-side-trash { padding-top: var(--iwb-space-6); }
|
||||
|
||||
.iwb-home-main { flex: 1 1 auto; height: 100%; padding: 26px 32px; overflow-y: auto; display: flex; flex-direction: column; min-width: 0; }
|
||||
.iwb-home-main-head { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--iwb-hr); flex-wrap: wrap; }
|
||||
.iwb-home-main-title { font-size: 26px; font-weight: 700; color: var(--iwb-text); }
|
||||
.iwb-home-main { flex: 1 1 auto; height: 100%; padding: var(--iwb-space-24) var(--iwb-space-32); overflow-y: auto; display: flex; flex-direction: column; min-width: 0; }
|
||||
.iwb-home-main-head { display: flex; align-items: center; gap: var(--iwb-space-12); padding-bottom: var(--iwb-space-16); border-bottom: 1px solid var(--iwb-hr); flex-wrap: wrap; }
|
||||
.iwb-home-main-title { font-size: var(--iwb-font-display); font-weight: 700; color: var(--iwb-text); }
|
||||
.iwb-drawer-spacer { flex: 1 1 auto; }
|
||||
.iwb-home-main-head .iwb-btn { min-height: 36px; background: color-mix(in srgb, var(--iwb-panel) 40%, var(--iwb-home-bg) 60%); }
|
||||
.iwb-home-main-head .iwb-btn-sm { background: transparent; border-color: transparent; }
|
||||
@@ -1289,29 +1242,28 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-home-main-head .iwb-btn:hover { background: color-mix(in srgb, var(--iwb-panel) 65%, var(--iwb-home-bg) 35%); }
|
||||
.iwb-home-main-head .iwb-btn-primary { background: var(--iwb-text2); border-color: var(--iwb-text2); color: #fff; }
|
||||
.iwb-home-main-head .iwb-btn-primary:hover { background: color-mix(in srgb, var(--iwb-text2) 80%, #000); border-color: color-mix(in srgb, var(--iwb-text2) 80%, #000); color: #fff; }
|
||||
.iwb-home-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); max-width: none; margin-top: 22px; width: 100%; }
|
||||
.iwb-home-grid { display: grid; gap: var(--iwb-space-20); grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); max-width: none; margin-top: var(--iwb-space-24); width: 100%; }
|
||||
|
||||
.iwb-home-empty { margin-top: 40px; color: var(--iwb-text2); font-size: 15px; text-align: center; padding: 40px 0; }
|
||||
.iwb-home-empty { margin-top: var(--iwb-space-40); color: var(--iwb-text2); font-size: var(--iwb-font-lg); text-align: center; padding: var(--iwb-space-40) 0; }
|
||||
|
||||
.iwb-home-card .iwb-home-card-top { padding: 20px 20px 0 20px; }
|
||||
.iwb-home-card .iwb-home-card-top { padding: var(--iwb-space-20) var(--iwb-space-20) 0 var(--iwb-space-20); }
|
||||
|
||||
.iwb-home-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: flex-end; gap: 12px; width: 100%; padding: 0 20px 18px 20px; }
|
||||
.iwb-home-card-star { border: 0; background: transparent; color: var(--iwb-text2); font-size: 18px; cursor: pointer; line-height: 1; padding: 0; }
|
||||
.iwb-home-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: flex-end; gap: var(--iwb-space-12); width: 100%; padding: 0 var(--iwb-space-20) var(--iwb-space-16) var(--iwb-space-20); }
|
||||
.iwb-home-card-star { border: 0; background: transparent; color: var(--iwb-text2); font-size: var(--iwb-font-xl); cursor: pointer; line-height: 1; padding: 0; }
|
||||
.iwb-home-card-star.on { color: var(--iwb-text); }
|
||||
.iwb-home-card-star:hover { color: var(--iwb-text); }
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.iwb-home-side { width: 220px; flex-basis: 220px; }
|
||||
.iwb-home-main { padding: 20px 18px; }
|
||||
.iwb-home-main { padding: var(--iwb-space-20) var(--iwb-space-16); }
|
||||
.iwb-home-main-head { flex-direction: column; align-items: flex-start; }
|
||||
}
|
||||
|
||||
/* 画布加载遮罩为纯视觉提示,不拦截指针(避免拖拽/平移被吃事件) */
|
||||
.iwb-overlay .iwb-enter-loading { pointer-events: none; }
|
||||
|
||||
|
||||
/* 左侧栏计数徽标 */
|
||||
.iwb-home-side-count { margin-left: auto; font-size: 12px; line-height: 1; color: var(--iwb-text2); padding: 0; min-width: 16px; text-align: center; box-sizing: border-box; }
|
||||
.iwb-home-side-count { margin-left: auto; font-size: var(--iwb-font-sm); line-height: 1; color: var(--iwb-text2); padding: 0; min-width: 16px; text-align: center; box-sizing: border-box; }
|
||||
.iwb-home-side-item.active .iwb-home-side-count { color: var(--iwb-text); background: transparent; }
|
||||
|
||||
/* 画布编辑顶栏返回箭头居中(SVG) */
|
||||
@@ -1327,7 +1279,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-home-card-actions .iwb-home-card-star.on { color: var(--iwb-text); }
|
||||
|
||||
/* 分类选择器(下拉) */
|
||||
.iwb-home-cat-select { border: 1px solid var(--iwb-border2); border-radius: 8px; padding: 3px 8px; font-size: 12px; color: var(--iwb-text); background: var(--iwb-panel); cursor: pointer; }
|
||||
.iwb-home-cat-select { border: 1px solid var(--iwb-border2); border-radius: 8px; padding: var(--iwb-space-4) var(--iwb-space-8); font-size: var(--iwb-font-sm); color: var(--iwb-text); background: var(--iwb-panel); cursor: pointer; }
|
||||
|
||||
/* 加载遮罩更明显,避免“打不开”的静止感 */
|
||||
.iwb-overlay .iwb-enter-loading { background: color-mix(in srgb, var(--iwb-bg) 97%, transparent); backdrop-filter: blur(4px); }
|
||||
@@ -1356,8 +1308,8 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,.05);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.iwb-home-card-meta { color: var(--iwb-text2); font-size: 13px; line-height: 1.5; display: flex; align-items: center; gap: 8px; text-align: left; padding-top: 10px; padding-left: 20px; padding-right: 20px; width: 100%; padding: 12px 20px 0 20px; min-height: 18px; }
|
||||
.iwb-home-card .iwb-home-card-foot { justify-content: space-between; gap: 10px; align-items: center; }
|
||||
.iwb-home-card-meta { color: var(--iwb-text2); font-size: var(--iwb-font-md); line-height: 1.5; display: flex; align-items: center; gap: var(--iwb-space-8); text-align: left; padding-top: var(--iwb-space-10); padding-left: var(--iwb-space-20); padding-right: var(--iwb-space-20); width: 100%; padding: var(--iwb-space-12) var(--iwb-space-20) 0 var(--iwb-space-20); min-height: 18px; }
|
||||
.iwb-home-card .iwb-home-card-foot { justify-content: space-between; gap: var(--iwb-space-10); align-items: center; }
|
||||
.iwb-home-card .iwb-home-card-foot .iwb-home-card-cat { flex: 0 0 auto; }
|
||||
|
||||
/* 画布标题后的版本小字 */
|
||||
@@ -1368,22 +1320,18 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-rename-input { width: 100%; box-sizing: border-box; height: 40px; font-size: 15px; }
|
||||
|
||||
/* 画布库侧栏 ≡ 菜单(图2样式:白卡片+图标+分隔线) */
|
||||
.iwb-home-menu-btn { width: 30px; height: 30px; margin-left: auto; flex: 0 0 auto; border: 1px solid var(--iwb-hr); border-radius: 8px; background: transparent; color: var(--iwb-text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
|
||||
.iwb-home-menu-btn:hover { background: var(--iwb-layer2); border-color: var(--iwb-border2); color: var(--iwb-text); }
|
||||
.iwb-home-menu-btn .iwb-ic { width: 18px; height: 18px; }
|
||||
.iwb-home-menu-mask { position: fixed; inset: 0; z-index: 200; }
|
||||
.iwb-home-menu { position: fixed; width: 220px; background: var(--iwb-panel); border: 1px solid var(--iwb-border); border-radius: var(--iwb-radius-panel); box-shadow: var(--iwb-elevation-2); padding: 6px; display: flex; flex-direction: column; gap: 2px; box-sizing: border-box; }
|
||||
.iwb-home-menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: transparent; color: var(--iwb-text); font-size: 14px; cursor: pointer; border-radius: 8px; text-align: left; width: 100%; box-sizing: border-box; }
|
||||
.iwb-home-menu { position: fixed; width: 220px; background: var(--iwb-panel); border: 1px solid var(--iwb-border); border-radius: var(--iwb-radius-panel); box-shadow: var(--iwb-elevation-2); padding: var(--iwb-space-6); display: flex; flex-direction: column; gap: var(--iwb-space-2); box-sizing: border-box; }
|
||||
.iwb-home-menu-item { display: flex; align-items: center; gap: var(--iwb-space-10); padding: var(--iwb-space-10) var(--iwb-space-12); border: 0; background: transparent; color: var(--iwb-text); font-size: var(--iwb-font-md); cursor: pointer; border-radius: 8px; text-align: left; width: 100%; box-sizing: border-box; }
|
||||
.iwb-home-menu-item:hover { background: var(--iwb-layer2); }
|
||||
.iwb-home-menu-item .iwb-ic { color: var(--iwb-text2); }
|
||||
.iwb-home-menu-item:hover .iwb-ic { color: var(--iwb-text); }
|
||||
.iwb-home-menu-sep { height: 1px; background: var(--iwb-border); margin: 4px 6px; }
|
||||
|
||||
/* 顶层弹层层级:菜单 & 放大图必须盖过画布/资源中心/遮罩 */
|
||||
.iwb-home-menu-mask { z-index: 1000; }
|
||||
.iwb-home-menu { z-index: 1001; }
|
||||
.iwb-imgpreview { z-index: var(--iwb-z-preview); }
|
||||
.iwb-home-menu-ver { display: block; padding: 8px 12px; font-size: 11px; color: var(--iwb-text2); text-align: left; border-top: 1px solid var(--iwb-border); margin-top: 4px; }
|
||||
.iwb-home-menu-ver { display: block; padding: var(--iwb-space-8) var(--iwb-space-12); font-size: var(--iwb-font-xs); color: var(--iwb-text2); text-align: left; border-top: 1px solid var(--iwb-border); margin-top: var(--iwb-space-4); }
|
||||
|
||||
/* 资源面板 4 角缩放手柄 */
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 37 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 37 KiB |
@@ -9,6 +9,8 @@ assert.ok(!source.includes("className: 'iwb-home-card-check'"))
|
||||
assert.ok(source.includes('const [homeSelectedWs, setHomeSelectedWs] = useState([])'))
|
||||
assert.ok(source.includes('homeSelectedWs.includes(w.id)'))
|
||||
assert.ok(source.includes("homeSelectedWs.forEach((id) => (homeView === 'trash' ? purgeWs(id) : trashWs(id)))"))
|
||||
assert.ok(css.includes('.iwb-home-head'))
|
||||
// v3.26.46(M4-B3):首页头部是「左侧栏 + 主区」两栏,旧的 .iwb-home-head 已无生产者(DOM 里 0 次),
|
||||
// 断言改为钉真正在用的布局类。
|
||||
assert.ok(css.includes('.iwb-home-side {') && css.includes('.iwb-home-main {'))
|
||||
assert.ok(css.includes('.iwb-home-card-actions'))
|
||||
console.log('home canvas library checks passed')
|
||||
@@ -47,7 +47,9 @@ assert.ok(!source.includes('Codex 未连接'))
|
||||
assert.ok(!css.includes('.iwb-res-tabs'), 'v3.27.1:资源中心旧页签已删除,统一到 .iwb-tab')
|
||||
assert.ok(!css.includes('.iwb-drawer-tab'), 'v3.27.1:抽屉页签已删除(已被停靠栏取代)')
|
||||
assert.ok(!css.includes('.iwb-rail-tab'), 'v3.27.1:右竖栏页签已删除(无生产者)')
|
||||
assert.ok(css.includes('.iwb-home-card-title strong { font-size: 15px;'))
|
||||
// v3.26.46(M4-B3):字号改钉「档位」而不是像素值 —— 之前钉 `font-size: 15px`,
|
||||
// 迁到 token 后这种断言会红,但它真正要保护的是「卡片标题用 lg 档」这个层级关系。
|
||||
assert.ok(/\.iwb-home-card-title strong \{[^}]*font-size: var\(--iwb-font-lg\)/.test(css), 'v3.26.46:卡片标题应为 font-lg 档')
|
||||
// v3.1.0 首页灰色系:蓝 accent 清零(激活项/胶囊/chip/星标全走墨色或灰阶)
|
||||
assert.ok(/\.iwb-tab-home\.iwb-tab-active \{[^}]*background: transparent/.test(css)) // 首页按钮无选中底色
|
||||
assert.ok(/\.iwb-home-card \{[^}]*background: var\(--iwb-bg-menu\)/.test(css)) // v3.26.44:卡片改用浮起层(亮=面板色,暗=比面板亮一档)
|
||||
@@ -94,8 +96,10 @@ assert.ok(source.includes("title: '显示 / 隐藏左栏'") && source.includes("
|
||||
assert.ok(css.includes('.iwb-landing-actions .iwb-btn { min-height: 42px;'))
|
||||
// 合并后规则变紧凑,用正则匹配(属性顺序/空白不敏感)
|
||||
assert.ok(/\.iwb-home-card-actions\s*\{[^}]*opacity:\s*0/.test(css))
|
||||
assert.ok(css.includes('.iwb-home-card.iwb-manage .iwb-home-card-check { display: inline-block; }'))
|
||||
// v3.26.46(M4-B3):批量管理早已改为「点卡片=选中」,复选框元素不再渲染,
|
||||
// 对应两条 .iwb-home-card-check 规则一并删除 —— 这里反向断言它不得复活。
|
||||
assert.ok(!css.includes('.iwb-home-card-check'), 'v3.26.46:复选框样式已删除(管理模式下点卡片即选中)')
|
||||
// 合并后规则变紧凑;且最终生效列宽是 230px(300px 的旧定义早已被覆盖)
|
||||
assert.ok(/\.iwb-home-grid\s*\{[^}]*repeat\(auto-fill,\s*minmax\(230px/.test(css))
|
||||
assert.ok(css.includes('.iwb-home-card-foot small { color: var(--iwb-text2); font-size: 12px; line-height: 1.4; white-space: nowrap;'))
|
||||
assert.ok(/\.iwb-home-card-foot small \{[^}]*color: var\(--iwb-text2\)[^}]*font-size: var\(--iwb-font-sm\)[^}]*line-height: 1\.4[^}]*white-space: nowrap/.test(css), 'v3.26.46:卡片脚注应走 font-sm 档 + 单行省略')
|
||||
console.log('page chrome regression checks passed')
|
||||
Reference in new issue
Block a user