feat(layout): 左右停靠栏(P1 布局 + P2 图标拖拽)v3.25.35

- 新增 src/ui-dock.js(IWBDockArea):左=节点组/浏览器/风格库,右=提示词库/图库;
  默认左浏览器、右图库;独立开合、宽度自由拖动(最小 100px、无上限)、状态持久化。
- 图标横排:点击切换 / 拖动排序 / 拖到另一栏按位置插入;每栏至少保留一个面板。
- 画布不动;工具栏/小地图/提示按 --iwb-dock-l/--iwb-dock-r 让位;停靠栏从顶栏下方开始。
- 顶部资源中心按钮与 Esc 继续控制右栏;右栏默认图库。
- 更新 boundary 快照、架构文档计数与 3 个外壳结构测试。
This commit is contained in:
qiqi committed 2026-11-19 22:32:56 +08:00
1 parent 640591fda3
commit 6e7c22123d
15 files changed
+535 -100

No files matched your search

+7 -4
View File
@@ -132,10 +132,13 @@ function hasClass(window, cls) {
await sleep(1800)
const res = liveClasses(window)
assert.ok(res.has('iwb-fullmask'), '打开资源中心后应出现 .iwb-fullmask(全屏遮罩),实际未出现')
assert.ok(res.has('iwb-res-tab'), '资源中心应有 .iwb-res-tab(页签:提示词库/节点组/图库),实际未出现')
assert.equal(window.document.querySelectorAll('.iwb-res-tab').length >= 1, true,
'资源中心页签数量应 ≥ 1')
assert.ok(res.has('iwb-dockarea'), '画布应渲染左右停靠栏容器 .iwb-dockarea,实际未出现')
assert.ok(res.has('iwb-dock'), '画布应渲染停靠面板 .iwb-dock,实际未出现')
const dockBtns = window.document.querySelectorAll('.iwb-dock-btn')
assert.ok(dockBtns.length >= 2, '停靠面板顶部应有面板图标(.iwb-dock-btn),实际 ' + dockBtns.length + ' 个')
// 旧的 .iwb-res-tab(资源中心页签)已由停靠栏顶部的图标取代
assert.equal(window.document.querySelectorAll('.iwb-res-tab').length, 0,
'停靠栏模式下不应再渲染旧资源中心页签 .iwb-res-tab')
// 资源中心里画布顶栏仍在(遮罩是叠在画布之上的)
assert.ok(res.has('iwb-canvas-topbar'), '资源中心打开时画布顶栏应仍在 DOM 中(遮罩浮层,不是替换视图)')