@michengai/dsh-codex-ui 2.2.3 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/CHANGELOG.zh-CN.md +6 -0
- package/lib/client.js +59 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.2.4] - 2026-11-15
|
|
4
|
+
|
|
5
|
+
- **Section Headers Stay Pinned While Scrolling (Issue #100)**:
|
|
6
|
+
- Scrolling the sidebar list no longer pushes the current section header (Pinned, Projects or a custom section) out of view: the header of the section you are reading sticks to the top of the list and hands the spot over to the next section as it comes up;
|
|
7
|
+
- Section headers no longer disappear together with the workspace rows, so it stays clear which group the visible rows belong to.
|
|
8
|
+
|
|
3
9
|
## [2.2.3] - 2026-11-14
|
|
4
10
|
|
|
5
11
|
- **Custom Workspace Section Reordering via Actions Menu (Issue #99)**:
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [2.2.4] - 2026-11-15
|
|
4
|
+
|
|
5
|
+
- **滚动时分区标题保持吸顶(Issue #100)**:
|
|
6
|
+
- 在侧栏列表里滚动时,当前分区(「置顶」「项目」或自定义分区)的标题不再被滚出视野:正在查看的那个分区的标题会贴在列表顶部,滚到下一个分区时自动交给下一个标题;
|
|
7
|
+
- 分区标题不再跟着工作区行一起消失,随时能看出可见的行属于哪个分组。
|
|
8
|
+
|
|
3
9
|
## [2.2.3] - 2026-11-14
|
|
4
10
|
|
|
5
11
|
- **自定义工作区分区支持菜单调整排序(Issue #99)**:
|
package/lib/client.js
CHANGED
|
@@ -13425,6 +13425,11 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
13425
13425
|
.dcu-ws-section-action{width:24px;height:24px;margin:-4px;padding:0;border:0;border-radius:var(--dsw-radius-xs,4px);background:transparent;color:var(--dsw-alias-label-tertiary,inherit);font:inherit;font-size:12px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
|
|
13426
13426
|
.dcu-ws-section-action:hover{color:var(--dsw-alias-label-primary,inherit);background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.16))}
|
|
13427
13427
|
[data-sidebar-collapsed='true'] .dcu-ws-section{display:none !important}
|
|
13428
|
+
/* 滚轮滚动时只让「当前分区」的标题吸顶(判定见 updateStickyHeaders),其余标题留在文档流里,
|
|
13429
|
+
否则多行标题会一起钉在顶部叠字。吸顶时把 8px 上外边距换成等量上内边距:标题占位总高不变,
|
|
13430
|
+
但贴住上沿后上方不会再留一条能看见滚动内容的空缝。背景吃侧栏填充色并补一层模糊,
|
|
13431
|
+
滚过去的会话行不会从标题后面透出来。 */
|
|
13432
|
+
.dcu-ws-section[data-dcu-sticky='true']{position:sticky;top:0;z-index:3;box-sizing:border-box;margin-top:0;padding-top:8px;height:38px;background:var(--dsw-specific-sidebar-fill,var(--dsw-alias-bg-layer-1,#121214));backdrop-filter:blur(12px)}
|
|
13428
13433
|
/* z-index 取宿主顶级浮层的量级:分区标题 ··· 这条路径把面板挂在 body 上,宿主侧边栏/工作区树自己是
|
|
13429
13434
|
更大的层级,1000 会让侧边栏的行文字压在面板上(表现为「菜单跑到侧边栏后面」)。
|
|
13430
13435
|
面板本体由宿主 MenuSurface 原语渲染(表面 + material 磨砂层),这里只补壳外的几何与文字颜色,
|
|
@@ -14157,12 +14162,64 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
14157
14162
|
header.remove();
|
|
14158
14163
|
headers.delete(id);
|
|
14159
14164
|
}
|
|
14165
|
+
scheduleStickyUpdate();
|
|
14160
14166
|
}
|
|
14161
14167
|
/** 列表不在工作区视图(频道、定时、rail 收起)时摘掉标题,避免串到别的列表里。 */
|
|
14162
14168
|
function detachHeaders() {
|
|
14163
14169
|
for (const header of headers.values()) header.remove();
|
|
14164
14170
|
headers.clear();
|
|
14165
14171
|
}
|
|
14172
|
+
/** 标题上的吸顶标记:只有「当前分区」的那一个带它,样式见 SECTIONS_CSS。 */
|
|
14173
|
+
const STICKY_ATTR = "data-dcu-sticky";
|
|
14174
|
+
let stickyRaf = 0;
|
|
14175
|
+
/** 从列表向上找真正的滚动容器(宿主的 `.listArea`),找不到时退化成文档滚动。 */
|
|
14176
|
+
function findStickyScroller(from) {
|
|
14177
|
+
if (from === void 0) return null;
|
|
14178
|
+
let node = from.parentElement;
|
|
14179
|
+
while (node !== null && node !== document.body) {
|
|
14180
|
+
const overflowY = getComputedStyle(node).overflowY;
|
|
14181
|
+
if (overflowY === "auto" || overflowY === "scroll" || overflowY === "overlay") return node;
|
|
14182
|
+
node = node.parentElement;
|
|
14183
|
+
}
|
|
14184
|
+
return null;
|
|
14185
|
+
}
|
|
14186
|
+
/**
|
|
14187
|
+
* 只给「当前分区」的标题打吸顶标记。
|
|
14188
|
+
*
|
|
14189
|
+
* 多个标题同时 sticky 会一起钉在顶部叠字(后一个盖住前一个),所以取「已经越过滚动口上沿、
|
|
14190
|
+
* 且最靠下」的那个标题作为当前分区;换区时上一个标题退回文档流,随内容一起滚走。
|
|
14191
|
+
* 吸顶中的标题 border-box 正好贴上沿,因此用 `<= 上沿 + 1px` 判定它仍属于当前分区。
|
|
14192
|
+
*/
|
|
14193
|
+
function updateStickyHeaders() {
|
|
14194
|
+
stickyRaf = 0;
|
|
14195
|
+
if (disposed) return;
|
|
14196
|
+
const connected = Array.from(headers.values()).filter((header) => header.isConnected);
|
|
14197
|
+
if (connected.length === 0) return;
|
|
14198
|
+
const scroller = findStickyScroller(list);
|
|
14199
|
+
const edge = scroller === null ? 0 : scroller.getBoundingClientRect().top;
|
|
14200
|
+
let active = null;
|
|
14201
|
+
const ordered = connected.slice().sort((left, right) => left.compareDocumentPosition(right) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1);
|
|
14202
|
+
for (const header of ordered) if (header.getBoundingClientRect().top <= edge + 1) active = header;
|
|
14203
|
+
for (const header of connected) if (header === active) {
|
|
14204
|
+
if (!header.hasAttribute(STICKY_ATTR)) header.setAttribute(STICKY_ATTR, "true");
|
|
14205
|
+
} else if (header.hasAttribute(STICKY_ATTR)) header.removeAttribute(STICKY_ATTR);
|
|
14206
|
+
}
|
|
14207
|
+
function scheduleStickyUpdate() {
|
|
14208
|
+
if (stickyRaf !== 0 || disposed) return;
|
|
14209
|
+
stickyRaf = window.requestAnimationFrame(updateStickyHeaders);
|
|
14210
|
+
}
|
|
14211
|
+
/** 滚动事件不冒泡,只能在捕获阶段拿;只要是列表的滚动祖先就重算一次。 */
|
|
14212
|
+
function onScrollForSticky(event) {
|
|
14213
|
+
const target = event.target;
|
|
14214
|
+
if (target instanceof Document) {
|
|
14215
|
+
scheduleStickyUpdate();
|
|
14216
|
+
return;
|
|
14217
|
+
}
|
|
14218
|
+
if (!(target instanceof Element) || list === void 0) return;
|
|
14219
|
+
if (!target.contains(list)) return;
|
|
14220
|
+
scheduleStickyUpdate();
|
|
14221
|
+
}
|
|
14222
|
+
document.addEventListener("scroll", onScrollForSticky, true);
|
|
14166
14223
|
/** 清理「内部 pointerout 截断」监听(每次开面板重新挂,closeSectionMenu 里释放)。 */
|
|
14167
14224
|
let flyoutExitCleanup;
|
|
14168
14225
|
/**
|
|
@@ -15165,6 +15222,8 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
15165
15222
|
document.removeEventListener("click", onDocumentClickClearPending, true);
|
|
15166
15223
|
document.removeEventListener("keydown", onDocumentKeydownClearPending, true);
|
|
15167
15224
|
document.removeEventListener("contextmenu", onContextMenuToPrepareMenu, true);
|
|
15225
|
+
document.removeEventListener("scroll", onScrollForSticky, true);
|
|
15226
|
+
if (stickyRaf !== 0) window.cancelAnimationFrame(stickyRaf);
|
|
15168
15227
|
unsubscribeDirectoryFlow?.();
|
|
15169
15228
|
unsubscribe?.();
|
|
15170
15229
|
closeSectionMenu();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michengai/dsh-codex-ui",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4",
|
|
4
4
|
"description": "DSH Codex UI — 为 DeepSeek Harness 提供极速历史召回、全屏设置皮肤、原生物理毛玻璃换肤、模块化侧栏与桌面原生窗口菜单 · Input enhancement, settings skin, native glass theme, modular sidebar, and desktop titlebar menu for DSH",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"publishConfig": {
|