@michengai/dsh-codex-ui 2.2.5 → 2.2.7
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 +23 -0
- package/CHANGELOG.zh-CN.md +23 -0
- package/lib/client.js +264 -99
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.2.7] - 2026-11-17
|
|
4
|
+
|
|
5
|
+
- **Workspace Header Create Section Button & Inline Insertion (Issue #105)**:
|
|
6
|
+
- Added a dedicated "Create section" button to the workspace header in the sidebar, allowing new sections to be created instantly with an inline name input;
|
|
7
|
+
- Added a "Create section" option to the `···` more actions menu on existing section headers, making it easy to create peer sections directly at the desired location;
|
|
8
|
+
- Pressing Enter creates the section while Escape cancels it, seamlessly updating the layout without manual page refreshing.
|
|
9
|
+
- **Empty Section Creation & Sidebar Rail Interaction Safeguards (Issue #105)**:
|
|
10
|
+
- Fixed an issue where creating a new section directly below an empty section could cause the input box to lose focus prematurely;
|
|
11
|
+
- Ensured smooth section creation and positioning across both expanded and collapsed sidebar layouts, preventing input disruptions.
|
|
12
|
+
- **Third-Party Plugin Menu & Popover Theme Isolation (Issue #104)**:
|
|
13
|
+
- Refined theme scope selectors so that only the outermost popovers and dropdown wrappers carry plugin styles, preventing nested menus and native third-party plugin panels from unintended dark styling or clipped borders.
|
|
14
|
+
|
|
15
|
+
## [2.2.6] - 2026-11-16
|
|
16
|
+
|
|
17
|
+
- **Default "Projects" Section Supports Reordering Up and Down (Issue #103)**:
|
|
18
|
+
- Added a `···` more actions menu to the default "Projects" workspace section header with "Move up" and "Move down" options, allowing it to be repositioned freely among workspace sections;
|
|
19
|
+
- Boundary positions and fold states are automatically handled, instantly updating the sidebar and persisting across restarts.
|
|
20
|
+
- **Section Collapse Icons and Header Polish Aligned with Codex (Issue #103)**:
|
|
21
|
+
- Replaced the solid triangle collapse indicator with a subtle outlined Chevron icon with smooth rotation on toggle;
|
|
22
|
+
- Section header titles now feature medium font weight (500) and smooth 150ms hover transitions for background and text colors, improving visual hierarchy.
|
|
23
|
+
- **Light Theme Settings Card Fill Fix (Issue #102)**:
|
|
24
|
+
- Fixed an issue where settings cards would turn into a translucent dark gray when dialogs were open under light theme, keeping card backgrounds crisp white.
|
|
25
|
+
|
|
3
26
|
## [2.2.5] - 2026-11-15
|
|
4
27
|
|
|
5
28
|
- **Longer Generated Titles Are Kept Instead of Discarded (Issue #101)**:
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [2.2.7] - 2026-11-17
|
|
4
|
+
|
|
5
|
+
- **侧栏工作区顶栏新增新建分区按钮与就近插入(Issue #105)**:
|
|
6
|
+
- 在侧栏「工作区」顶栏右侧新增原生的「新建分区」操作按钮,点击后直接在列表中弹出名称输入框,输入后回车即可快速创建新分区;
|
|
7
|
+
- 在已有分区标题的 `···` 更多操作菜单中新增「新建分区」选项,支持在选定分区的下方就近插入同级新分区,免去创建后再反复上下移动的繁琐操作;
|
|
8
|
+
- 支持回车即时创建与 Escape 快捷取消,输入完成后侧栏布局即刻流畅更新。
|
|
9
|
+
- **空分区新建编辑与侧栏折叠状态交互防护(Issue #105)**:
|
|
10
|
+
- 修复了在空分区中触发新建时输入框意外失焦退出的问题,保证输入焦点稳定维持,防止打字中途输入框意外消失;
|
|
11
|
+
- 完善了侧栏收起导轨状态下的交互防护,避免在收起态下误触弹出编辑框影响界面布局。
|
|
12
|
+
- **第三方插件菜单与浮层主题隔离优化(Issue #104)**:
|
|
13
|
+
- 精确收窄了主题样式的作用范围,仅对最外层的浮层与下拉容器生效,避免第三方插件内部的嵌套菜单和对话框被误加上不必要的深色背景或边框异常。
|
|
14
|
+
|
|
15
|
+
## [2.2.6] - 2026-11-16
|
|
16
|
+
|
|
17
|
+
- **默认「项目」分区支持上下移动排序(Issue #103)**:
|
|
18
|
+
- 侧栏默认的「项目」分区标题右侧新增 `···` 更多操作菜单,提供「向上移动」与「向下移动」选项,支持像自定义分区一样自由调整在侧栏中的排列顺序;
|
|
19
|
+
- 移动后自动处理与前后分区的排列边界与折叠状态,界面即时刷新并持久化保存,重启应用后依然生效。
|
|
20
|
+
- **分区折叠箭头与标题视觉质感对齐 Codex(Issue #103)**:
|
|
21
|
+
- 分区展开/收起图标全面换用细线 Chevron 箭头,展开时顺畅旋转,消除原本粗黑实心三角形的突兀感;
|
|
22
|
+
- 分区标题字重调整为 Medium(500),悬停时背景底色与文字颜色加入 150ms 平滑过渡,视觉骨架感与层次更清晰。
|
|
23
|
+
- **浅色模式设置卡片背景颜色修复(Issue #102)**:
|
|
24
|
+
- 修复了在浅色模式且页面弹出对话框时,设置页卡片背景意外呈现暗灰色半透明的问题,确保在浅色外观下卡片始终保持干净利落的纯白底色。
|
|
25
|
+
|
|
3
26
|
## [2.2.5] - 2026-11-15
|
|
4
27
|
|
|
5
28
|
- **主题偏长的智能标题不再被整条丢弃(Issue #101)**:
|
package/lib/client.js
CHANGED
|
@@ -301,7 +301,7 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card {
|
|
|
301
301
|
* (item II — lazy CSS), so editing the stylesheet means editing
|
|
302
302
|
* glass.module.css and rebuilding.
|
|
303
303
|
*/
|
|
304
|
-
const GLASS_CSS_TEXT = "[data-dsh-glass] body{--dsh-glass-card:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(52% * var(--dsh-glass-frost,1)), transparent);--dsh-glass-card-raised:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(64% * var(--dsh-glass-frost,1)), transparent);--dsh-glass-card-hover:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(76% * var(--dsh-glass-frost,1)), transparent);--dsh-glass-rim:color-mix(in srgb, var(--dsw-alias-label-primary) 18%, transparent);--dsh-glass-rim-soft:color-mix(in srgb, var(--dsw-alias-label-primary) 12%, transparent);--dsh-glass-rim-strong:color-mix(in srgb, var(--dsw-alias-label-primary) 30%, transparent);--dsh-glass-edge:inset 0 1px 0 #ffffff6b;--dsh-glass-drop:0 10px 32px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 38%, transparent);--dsh-glass-input-shadow:0 1px 2px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 65%, transparent), 0 8px 24px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 80%, transparent);--dsh-glass-ground:color-mix(in srgb, color-mix(in srgb, var(--dsw-alias-bg-base), #fff calc(var(--dsh-glass-brightness-white,0) * 100%)), #000 calc(var(--dsh-glass-brightness-black,0) * 100%));--dsh-glass-ambience:calc(1 - var(--dsh-glass-brightness-white,0) - var(--dsh-glass-brightness-black,0));--dsh-glass-wash-tint:#fff;--dsh-glass-wash-mix:22%}[data-dsh-glass] body[data-ds-dark-theme]{--dsh-glass-rim:color-mix(in srgb, var(--dsw-alias-label-primary) 24%, transparent);--dsh-glass-rim-soft:color-mix(in srgb, var(--dsw-alias-label-primary) 16%, transparent);--dsh-glass-rim-strong:color-mix(in srgb, var(--dsw-alias-label-primary) 30%, transparent);--dsh-glass-edge:inset 0 1px 0 #ffffff14;--dsh-glass-drop:0 10px 32px #02060e73;--dsh-glass-input-shadow:0 1px 2px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 65%, transparent), 0 8px 24px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 80%, transparent);--dsh-glass-wash-tint:var(--dsw-alias-bg-layer-1);--dsh-glass-wash-mix:68%}[data-dsh-glass] body,[data-dsh-glass] [data-dsh-glass-ground-sample]{background: radial-gradient(calc(58% * var(--dsh-glass-glow-size,1)) calc(46% * var(--dsh-glass-glow-size,1)) at 18% 6%, color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) calc(12% * var(--dsh-glass-ambience) * var(--dsh-glass-glow,0) * var(--dsh-glass-glow-strength,1)), transparent), transparent 68%), radial-gradient(calc(48% * var(--dsh-glass-glow-size,1)) calc(42% * var(--dsh-glass-glow-size,1)) at 86% 14%, color-mix(in srgb, var(--dsw-alias-state-success-tertiary) calc(10% * var(--dsh-glass-ambience) * var(--dsh-glass-glow,0) * var(--dsh-glass-glow-strength,1)), transparent), transparent 62%), linear-gradient(165deg, color-mix(in srgb, var(--dsh-glass-ground), var(--dsh-glass-wash-tint) calc(var(--dsh-glass-wash-mix) * var(--dsh-glass-ambience))) 0%, var(--dsh-glass-ground) 55%, color-mix(in srgb, var(--dsh-glass-ground), #000 calc(5% * var(--dsh-glass-ambience))) 100%)}[data-dsh-glass] [data-dsh-glass-frame],[data-dsh-glass] [data-phase],[data-dsh-glass] [data-dsh-glass-details],[data-dsh-glass-float] [data-dsh-glass-frame]>[class*=centerCol]{background:0 0}[data-dsh-glass-float] [data-phase=active] header{z-index:8;position:relative}[data-dsh-glass-float] [class*=banner]{position:static}[data-dsh-glass-float] [data-phase=active] [data-conversation-scroll]{margin-top:-95px;padding-top:107px}[data-dsh-glass] [data-phase] [class*=composerSeat][class*=composerSeat]{background:0 0}[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[class*=dock],[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[data-composer-dock]{position:relative}[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[class*=dock]:before,[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[data-composer-dock]:before{content:\"\";left:calc(-1 * var(--dsh-composer-side-clearance,16px));right:calc(-1 * var(--dsh-composer-side-clearance,16px));z-index:-1;pointer-events:none;background:color-mix(in srgb, color-mix(in srgb, var(--dsh-glass-ground), #000 calc(5% * var(--dsh-glass-ambience))) calc(70% + 10% * var(--dsh-glass-frost,1)), transparent);height:calc(100% + 12px);backdrop-filter:blur(var(--dsh-glass-blur,14px));position:absolute;bottom:-4px;-webkit-mask-image:linear-gradient(#0000 0,#000 18px);mask-image:linear-gradient(#0000 0,#000 18px)}[data-dsh-glass] [data-dsh-glass-fade]{z-index:7;pointer-events:none;backdrop-filter:blur(5px);background:#ffffff2e;height:13px;position:fixed;left:0;right:0}[data-dsh-glass] body[data-ds-dark-theme] [data-dsh-glass-fade]{background:#00000024}[data-dsh-glass] [data-dsh-glass-fade=top]{top:0;-webkit-mask-image:linear-gradient(#000 0%,#0000 100%);mask-image:linear-gradient(#000 0%,#0000 100%)}[data-dsh-glass][data-windows-titlebar] [data-dsh-glass-fade=top]{display:none}[data-dsh-glass] [data-dsh-glass-fade=bottom]{bottom:0;-webkit-mask-image:linear-gradient(#0000 0%,#000 100%);mask-image:linear-gradient(#0000 0%,#000 100%)}[data-dsh-glass-float] [data-menu-material=translucent],[data-dsh-glass-float] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-float] [role=dialog],[data-dsh-glass-float] [role=alert],[data-dsh-glass-float] [data-trigger-menu],[data-dsh-glass-float] [data-dsh-glass-surface]{border-radius:14px}[data-dsh-glass-float] [role=menuitem],[data-dsh-glass-float] [role=tooltip],[data-dsh-glass-float] [class*=pill]{border-radius:8px}[data-dsh-glass-float] button[class*=button]{border-radius:10px}[data-dsh-glass-float] [class*=iconButton],[data-dsh-glass-float] [class*=searchButton]{border-radius:8px}[data-dsh-glass-float] [class*=block]{--dsl-code-block-border-radius:14px;--dsl-diff-radius:14px;--dsl-read-radius:14px;--dsl-terminal-radius:14px;--dsl-web-radius:14px;--dsl-search-radius:14px;border-radius:14px}[data-dsh-glass-float] [data-dsh-glass-add]{background:var(--dsh-glass-card-raised);border:1px solid var(--dsh-glass-rim);box-shadow:var(--dsh-glass-edge);backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] [data-dsh-glass-add]:hover:not(:disabled){background:var(--dsh-glass-card-hover)}[data-dsh-glass-float] [data-dsh-glass-surface]{background:var(--dsh-glass-card-raised);border:1px solid var(--dsh-glass-rim-soft);box-shadow:var(--dsh-glass-edge);backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] [data-dsh-glass-surface]:hover:not(:disabled){background:var(--dsh-glass-card-hover)}[data-dsh-glass-float] [data-conversation-scroll] [class*=bubble]{border:1px solid var(--dsh-glass-rim-soft);background:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(46% * var(--dsh-glass-frost,1)), transparent);border-radius:14px}[data-dsh-glass-float] [class*=card]{border-radius:14px}[data-dsh-glass-float] [data-reader-reasoning-card]:not([data-overflow=false][data-expanded=false]),[data-dsh-glass-compat] [data-reader-reasoning-card]:not([data-overflow=false][data-expanded=false]){background:color-mix(in srgb, var(--dsw-alias-bg-module-platform) calc(52% * var(--dsh-glass-frost,1)), transparent);border-color:var(--dsh-glass-rim-soft);border-radius:14px}html[data-dsh-glass-float] [data-changed-files],html[data-dsh-glass-float] [data-presented-file]{--changes-fill:var(--dsh-glass-card);--deliverable-fill:var(--dsh-glass-card);border-color:var(--dsh-glass-rim-soft);border-radius:14px}html[data-dsh-glass-float] [data-presented-file],html[data-dsh-glass-float] [data-changed-files]{background:var(--dsh-glass-card)}html[data-dsh-glass-float] [data-changed-files]>:first-child,html[data-dsh-glass-float] [data-changed-files] ul>li>:first-child,html[data-dsh-glass-float] [data-changed-files] ul{background:0 0}html[data-dsh-glass-float] [data-changed-files] ul{border-top:.5px solid var(--dsh-glass-rim-soft)}html[data-dsh-glass-float] [data-changed-files]>:first-child>:first-child,html[data-dsh-glass-float] [data-presented-file]>:first-child{background:var(--dsh-glass-card-raised)}html[data-dsh-glass-float] [data-turn-trigger]{background:var(--dsh-glass-card);border-color:var(--dsh-glass-rim-soft);border-radius:14px}html[data-dsh-glass-float] [data-turn-trigger]:hover{background:var(--dsh-glass-card-hover)}[data-dsh-glass] [data-dsh-glass-settings]{--dsh-glass-settings-raised:calc(38% + 38% * var(--dsh-glass-frost,1));--dsh-glass-settings-soft:calc(30% + 30% * var(--dsh-glass-frost,1));--dsw-alias-bg-module-platform:color-mix(in srgb, var(--dsw-static-neutral-bluish-800) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-3:color-mix(in srgb, var(--dsw-static-neutral-bluish-800) var(--dsh-glass-settings-soft), transparent);--dsw-alias-bg-layer-2:color-mix(in srgb, var(--dsw-static-neutral-bluish-850) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-1:color-mix(in srgb, var(--dsw-static-neutral-bluish-850) var(--dsh-glass-settings-soft), transparent);--dsw-specific-sidebar-nav-item-active:color-mix(in srgb, var(--dsw-static-neutral-bluish-750) var(--dsh-glass-settings-raised), transparent);--dsw-specific-sidebar-nav-item-hover:color-mix(in srgb, var(--dsw-static-neutral-bluish-850) var(--dsh-glass-settings-soft), transparent)}[data-dsh-glass] body:not([data-ds-dark-theme]) [data-dsh-glass-settings]{--dsw-alias-bg-module-platform:color-mix(in srgb, var(--dsw-static-neutral-bluish-60) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-3:color-mix(in srgb, var(--dsw-static-neutral-bluish-00) var(--dsh-glass-settings-soft), transparent);--dsw-alias-bg-layer-2:color-mix(in srgb, var(--dsw-static-neutral-bluish-00) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-1:color-mix(in srgb, var(--dsw-static-neutral-bluish-00) var(--dsh-glass-settings-soft), transparent);--dsw-specific-sidebar-nav-item-active:color-mix(in srgb, var(--dsw-static-neutral-bluish-100) var(--dsh-glass-settings-raised), transparent);--dsw-specific-sidebar-nav-item-hover:color-mix(in srgb, var(--dsw-static-neutral-bluish-75) var(--dsh-glass-settings-soft), transparent)}[data-dsh-glass-float] [data-phase] header:not([class*=headerBlank]){width:100%;margin:var(--dsh-glass-gap,12px) auto 0;max-width:min(calc(var(--dsh-chat-user-width,clamp(680px, calc(var(--dsh-conversation-column-width,1500px) * .64), 920px)) + 32px), calc(100% - 32px));border:1px solid var(--dsh-glass-rim);background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);backdrop-filter:blur(var(--dsh-glass-blur,14px));border-radius:20px;padding:10px 16px 8px}[data-dsh-glass-float] [data-phase] header:not([class*=headerBlank]):after{display:none}[data-dsh-glass-float] [data-dsh-glass-frame][data-sidebar-collapsed] [data-phase] header:not([class*=headerBlank]){width:auto;margin-left:calc(var(--dsh-glass-gap,12px) + 16px);max-width:none;margin-right:16px}[data-dsh-glass-float] [class*=sidebarCol]{--dsw-specific-sidebar-fill:transparent;z-index:9;margin:var(--dsh-glass-gap,12px);border:1px solid var(--dsh-glass-rim-soft);box-shadow:var(--dsh-glass-drop);border-radius:20px;padding:10px 12px 14px;position:relative;overflow:hidden}[data-dsh-glass-float] [class*=sidebarCol]:before{content:\"\";border-radius:inherit;background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge);z-index:-1;pointer-events:none;transition:border-radius .15s var(--ds-ease-in-out);position:absolute;inset:0}[data-dsh-glass-float] body{--dsw-specific-sidebar-fill:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(52% * var(--dsh-glass-frost,1)), color-mix(in srgb, var(--dsh-glass-ground), var(--dsh-glass-wash-tint) calc(var(--dsh-glass-wash-mix) * var(--dsh-glass-ambience))))!important}[data-dsh-glass-float] [data-dsh-glass-frame][data-sidebar-collapsed] [class*=sidebarCol]{margin:var(--dsh-glass-gap,12px) calc(-1 * min(var(--dsh-glass-gap,12px), 16px)) var(--dsh-glass-gap,12px) var(--dsh-glass-gap,12px);transition:margin .15s var(--ds-ease-in-out), border-radius .15s var(--ds-ease-in-out);border-radius:16px;padding:0}[data-dsh-glass-float] [data-dsh-glass-frame]:not([data-sidebar-collapsed]) [data-dsh-glass-sidebar-root]{width:100%!important}[data-dsh-glass-float] [data-dsh-glass-trajectory]{margin:8px auto var(--dsh-glass-gap,12px);width:calc(100% - 32px);max-width:min(calc(var(--dsh-chat-user-width,clamp(680px, calc(var(--dsh-conversation-column-width,1500px) * .64), 920px)) + 32px), calc(100% - 32px));height:calc(100% - 8px - var(--dsh-glass-gap,12px));border:1px solid var(--dsh-glass-rim);background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);border-radius:20px;overflow:hidden}[data-dsh-glass-float] [data-dsh-glass-trajectory] [role=toolbar],[data-dsh-glass-float] [data-dsh-glass-trajectory] section[aria-label=Trajectory\\ timeline]{background:0 0}[data-dsh-glass-float] [data-composer-card],[data-dsh-glass-float] [data-composer-card]:after{border-radius:24px}[data-dsh-glass-float] [data-composer-card]{z-index:8;isolation:isolate;border:1px solid var(--dsh-glass-rim-strong);box-shadow:var(--dsh-glass-input-shadow);background:0 0;position:relative}[data-dsh-glass-float] [data-composer-card]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge);backdrop-filter:blur(var(--dsh-glass-blur,14px));pointer-events:none;position:absolute;inset:0}[data-dsh-glass-float] [data-dsh-glass-inputbar]:not([class*=hero]):not(:has([data-dsh-glass-stats])){padding-bottom:var(--dsh-glass-gap,12px)}[data-dsh-glass-float] [role=treeitem][aria-selected=true]{background:var(--dsw-alias-interactive-bg-hover)}[data-dsh-glass-float] button[class*=button]:hover:not(:disabled),[data-dsh-glass-float] [role=menuitem]:hover:not(:disabled){box-shadow:0 0 12px color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 20%, transparent)}[data-dsh-glass-float] [data-menu-material=translucent]:not(:focus-visible){--dsw-menu-surface-fill:var(--dsh-glass-card-raised);--dsw-menu-backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] body[data-ds-dark-theme] [data-menu-material=translucent]:not(:focus-visible){outline:1px solid var(--dsh-glass-rim-soft);outline-offset:-1px}[data-dsh-glass-float] [role=menu]:not([data-menu-material]):not([data-menu-material] *){background:var(--dsh-glass-card-raised);border:1px solid var(--dsh-glass-rim-soft);backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] [data-menu-material=translucent]:has([role=group]>[role=menuitemradio]){--dsw-menu-surface-fill:color-mix(in srgb, var(--dsw-alias-bg-layer-2) 70%, transparent)}[data-dsh-glass-float] [data-menu-group]:has(>[role=menuitemradio])>[data-menu-group-heading]{background:var(--dsh-glass-card-raised);backdrop-filter:blur(var(--dsh-glass-blur,14px));border-radius:999px;align-items:center;width:fit-content;margin:3px 0 5px 6px;padding:3px 10px;display:inline-flex}[data-dsh-glass-float] [role=presentation]>[role=dialog][aria-modal=true]{isolation:isolate;backdrop-filter:none;border:1px solid var(--dsh-glass-rim);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);background:0 0;border-radius:20px;position:relative}[data-dsh-glass-float] [role=presentation]>[role=dialog][aria-modal=true]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card-raised);backdrop-filter:blur(var(--dsh-glass-blur,14px));pointer-events:none;position:absolute;inset:0}[data-dsh-glass] [data-conversation-scroll]{text-shadow:0 0 1px #ffffff80}[data-dsh-glass] body[data-ds-dark-theme] [data-conversation-scroll]{text-shadow:0 0 1px #0006}[data-dsh-glass-float] [data-dsh-glass-inputbar] [data-slot]{color:var(--dsw-alias-label-secondary)}[data-dsh-glass]{--dsh-glass-entry-scale:1}[data-dsh-glass-compat]{--dsh-glass-entry-scale:0}[data-dsh-glass] [data-testid^=view-]{animation:dsh-glass-in calc(.26s * var(--dsh-glass-entry-scale,1)) var(--ds-ease-in-out)}[data-dsh-glass] [data-tool]{animation:dsh-glass-rise calc(.3s * var(--dsh-glass-entry-scale,1)) var(--ds-ease-in-out) both}[data-dsh-glass] [role=dialog]{animation:dsh-glass-dialog-in calc(.24s * var(--dsh-glass-entry-scale,1)) var(--ds-ease-in-out)}@keyframes dsh-glass-in{0%{opacity:0}}@keyframes dsh-glass-rise{0%{opacity:0;transform:translateY(6px)}}@keyframes dsh-glass-dialog-in{0%{opacity:0}}[data-dsh-glass] :focus-visible{outline:2px solid color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 85%, transparent);outline-offset:1px}[data-dsh-glass] ::selection{background:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 35%, transparent)}[data-dsh-glass-compat] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-compat] [class*=popover],[data-dsh-glass-compat] [class*=dropdown]{backdrop-filter:blur(12px)}[data-dsh-glass-compat] [data-menu-material=translucent]:not(:focus-visible){--dsw-menu-surface-fill:var(--dsh-glass-card-raised);--dsw-menu-backdrop-filter:blur(12px)}/* 有意移除:平铺玻璃模式下右侧栏外壳的 backdrop-filter 会在展开/全屏切换时造成背景透出、收起后白屏(df5eb68 修复,勿随上游基线同步带回) */[data-dsh-glass-compat] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-compat] [class*=popover],[data-dsh-glass-compat] [class*=dropdown]{background:var(--dsh-glass-card-raised)}[data-dsh-glass-compat] [data-composer-card]{isolation:isolate;backdrop-filter:none;background:0 0;position:relative}[data-dsh-glass-compat] [data-composer-card]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card-raised);backdrop-filter:blur(12px);pointer-events:none;position:absolute;inset:0}[data-dsh-glass-compat] [role=menu]:not([data-menu-material]):not([data-menu-material] *):not(:focus-visible),[data-dsh-glass-compat] [data-composer-card]:not(:focus-visible),[data-dsh-glass-compat] [class*=popover]:not(:focus-visible),[data-dsh-glass-compat] [class*=dropdown]:not(:focus-visible){outline:1px solid var(--dsh-glass-rim);outline-offset:-1px}[data-dsh-glass-compat] [role=presentation]>[role=dialog][aria-modal=true]{isolation:isolate;backdrop-filter:none;border:1px solid var(--dsh-glass-rim);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);background:0 0;position:relative}[data-dsh-glass-compat] [role=presentation]>[role=dialog][aria-modal=true]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card-raised);backdrop-filter:blur(var(--dsh-glass-blur,12px));pointer-events:none;position:absolute;inset:0}[data-dsh-glass-settings] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-settings] .dsm-select-menu{background:color-mix(in srgb, var(--dsh-glass-ground) 92%, transparent);backdrop-filter:blur(12px);box-shadow:var(--dsh-glass-drop)}[data-dsh-glass-settings] .dsm-panel-head{isolation:isolate;outline:1px solid var(--dsh-glass-rim-soft);outline-offset:-1px;background:0 0;border-radius:14px;padding:6px 12px 4px}[data-dsh-glass-settings] .dsm-panel-head:before{content:\"\";z-index:-1;border-radius:inherit;background:color-mix(in srgb, var(--dsh-glass-ground) 78%, transparent);backdrop-filter:blur(12px);pointer-events:none;position:absolute;inset:0}@media (prefers-reduced-motion:reduce){[data-dsh-glass] [data-testid^=view-],[data-dsh-glass] [data-tool],[data-dsh-glass] [role=dialog]{animation:none}}";
|
|
304
|
+
const GLASS_CSS_TEXT = "[data-dsh-glass] body{--dsh-glass-card:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(52% * var(--dsh-glass-frost,1)), transparent);--dsh-glass-card-raised:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(64% * var(--dsh-glass-frost,1)), transparent);--dsh-glass-card-hover:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(76% * var(--dsh-glass-frost,1)), transparent);--dsh-glass-rim:color-mix(in srgb, var(--dsw-alias-label-primary) 18%, transparent);--dsh-glass-rim-soft:color-mix(in srgb, var(--dsw-alias-label-primary) 12%, transparent);--dsh-glass-rim-strong:color-mix(in srgb, var(--dsw-alias-label-primary) 30%, transparent);--dsh-glass-edge:inset 0 1px 0 #ffffff6b;--dsh-glass-drop:0 10px 32px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 38%, transparent);--dsh-glass-input-shadow:0 1px 2px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 65%, transparent), 0 8px 24px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 80%, transparent);--dsh-glass-ground:color-mix(in srgb, color-mix(in srgb, var(--dsw-alias-bg-base), #fff calc(var(--dsh-glass-brightness-white,0) * 100%)), #000 calc(var(--dsh-glass-brightness-black,0) * 100%));--dsh-glass-ambience:calc(1 - var(--dsh-glass-brightness-white,0) - var(--dsh-glass-brightness-black,0));--dsh-glass-wash-tint:#fff;--dsh-glass-wash-mix:22%}[data-dsh-glass] body[data-ds-dark-theme]{--dsh-glass-rim:color-mix(in srgb, var(--dsw-alias-label-primary) 24%, transparent);--dsh-glass-rim-soft:color-mix(in srgb, var(--dsw-alias-label-primary) 16%, transparent);--dsh-glass-rim-strong:color-mix(in srgb, var(--dsw-alias-label-primary) 30%, transparent);--dsh-glass-edge:inset 0 1px 0 #ffffff14;--dsh-glass-drop:0 10px 32px #02060e73;--dsh-glass-input-shadow:0 1px 2px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 65%, transparent), 0 8px 24px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 80%, transparent);--dsh-glass-wash-tint:var(--dsw-alias-bg-layer-1);--dsh-glass-wash-mix:68%}[data-dsh-glass] body,[data-dsh-glass] [data-dsh-glass-ground-sample]{background: radial-gradient(calc(58% * var(--dsh-glass-glow-size,1)) calc(46% * var(--dsh-glass-glow-size,1)) at 18% 6%, color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) calc(12% * var(--dsh-glass-ambience) * var(--dsh-glass-glow,0) * var(--dsh-glass-glow-strength,1)), transparent), transparent 68%), radial-gradient(calc(48% * var(--dsh-glass-glow-size,1)) calc(42% * var(--dsh-glass-glow-size,1)) at 86% 14%, color-mix(in srgb, var(--dsw-alias-state-success-tertiary) calc(10% * var(--dsh-glass-ambience) * var(--dsh-glass-glow,0) * var(--dsh-glass-glow-strength,1)), transparent), transparent 62%), linear-gradient(165deg, color-mix(in srgb, var(--dsh-glass-ground), var(--dsh-glass-wash-tint) calc(var(--dsh-glass-wash-mix) * var(--dsh-glass-ambience))) 0%, var(--dsh-glass-ground) 55%, color-mix(in srgb, var(--dsh-glass-ground), #000 calc(5% * var(--dsh-glass-ambience))) 100%)}[data-dsh-glass] [data-dsh-glass-frame],[data-dsh-glass] [data-phase],[data-dsh-glass] [data-dsh-glass-details],[data-dsh-glass-float] [data-dsh-glass-frame]>[class*=centerCol]{background:0 0}[data-dsh-glass-float] [data-phase=active] header{z-index:8;position:relative}[data-dsh-glass-float] [class*=banner]{position:static}[data-dsh-glass-float] [data-phase=active] [data-conversation-scroll]{margin-top:-95px;padding-top:107px}[data-dsh-glass] [data-phase] [class*=composerSeat][class*=composerSeat]{background:0 0}[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[class*=dock],[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[data-composer-dock]{position:relative}[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[class*=dock]:before,[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[data-composer-dock]:before{content:\"\";left:calc(-1 * var(--dsh-composer-side-clearance,16px));right:calc(-1 * var(--dsh-composer-side-clearance,16px));z-index:-1;pointer-events:none;background:color-mix(in srgb, color-mix(in srgb, var(--dsh-glass-ground), #000 calc(5% * var(--dsh-glass-ambience))) calc(70% + 10% * var(--dsh-glass-frost,1)), transparent);height:calc(100% + 12px);backdrop-filter:blur(var(--dsh-glass-blur,14px));position:absolute;bottom:-4px;-webkit-mask-image:linear-gradient(#0000 0,#000 18px);mask-image:linear-gradient(#0000 0,#000 18px)}[data-dsh-glass] [data-dsh-glass-fade]{z-index:7;pointer-events:none;backdrop-filter:blur(5px);background:#ffffff2e;height:13px;position:fixed;left:0;right:0}[data-dsh-glass] body[data-ds-dark-theme] [data-dsh-glass-fade]{background:#00000024}[data-dsh-glass] [data-dsh-glass-fade=top]{top:0;-webkit-mask-image:linear-gradient(#000 0%,#0000 100%);mask-image:linear-gradient(#000 0%,#0000 100%)}[data-dsh-glass][data-windows-titlebar] [data-dsh-glass-fade=top]{display:none}[data-dsh-glass] [data-dsh-glass-fade=bottom]{bottom:0;-webkit-mask-image:linear-gradient(#0000 0%,#000 100%);mask-image:linear-gradient(#0000 0%,#000 100%)}[data-dsh-glass-float] [data-menu-material=translucent],[data-dsh-glass-float] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-float] [role=dialog],[data-dsh-glass-float] [role=alert],[data-dsh-glass-float] [data-trigger-menu],[data-dsh-glass-float] [data-dsh-glass-surface]{border-radius:14px}[data-dsh-glass-float] [role=menuitem],[data-dsh-glass-float] [role=tooltip],[data-dsh-glass-float] [class*=pill]{border-radius:8px}[data-dsh-glass-float] button[class*=button]{border-radius:10px}[data-dsh-glass-float] [class*=iconButton],[data-dsh-glass-float] [class*=searchButton]{border-radius:8px}[data-dsh-glass-float] [class*=block]{--dsl-code-block-border-radius:14px;--dsl-diff-radius:14px;--dsl-read-radius:14px;--dsl-terminal-radius:14px;--dsl-web-radius:14px;--dsl-search-radius:14px;border-radius:14px}[data-dsh-glass-float] [data-dsh-glass-add]{background:var(--dsh-glass-card-raised);border:1px solid var(--dsh-glass-rim);box-shadow:var(--dsh-glass-edge);backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] [data-dsh-glass-add]:hover:not(:disabled){background:var(--dsh-glass-card-hover)}[data-dsh-glass-float] [data-dsh-glass-surface]{background:var(--dsh-glass-card-raised);border:1px solid var(--dsh-glass-rim-soft);box-shadow:var(--dsh-glass-edge);backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] [data-dsh-glass-surface]:hover:not(:disabled){background:var(--dsh-glass-card-hover)}[data-dsh-glass-float] [data-conversation-scroll] [class*=bubble]{border:1px solid var(--dsh-glass-rim-soft);background:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(46% * var(--dsh-glass-frost,1)), transparent);border-radius:14px}[data-dsh-glass-float] [class*=card]{border-radius:14px}[data-dsh-glass-float] [data-reader-reasoning-card]:not([data-overflow=false][data-expanded=false]),[data-dsh-glass-compat] [data-reader-reasoning-card]:not([data-overflow=false][data-expanded=false]){background:color-mix(in srgb, var(--dsw-alias-bg-module-platform) calc(52% * var(--dsh-glass-frost,1)), transparent);border-color:var(--dsh-glass-rim-soft);border-radius:14px}html[data-dsh-glass-float] [data-changed-files],html[data-dsh-glass-float] [data-presented-file]{--changes-fill:var(--dsh-glass-card);--deliverable-fill:var(--dsh-glass-card);border-color:var(--dsh-glass-rim-soft);border-radius:14px}html[data-dsh-glass-float] [data-presented-file],html[data-dsh-glass-float] [data-changed-files]{background:var(--dsh-glass-card)}html[data-dsh-glass-float] [data-changed-files]>:first-child,html[data-dsh-glass-float] [data-changed-files] ul>li>:first-child,html[data-dsh-glass-float] [data-changed-files] ul{background:0 0}html[data-dsh-glass-float] [data-changed-files] ul{border-top:.5px solid var(--dsh-glass-rim-soft)}html[data-dsh-glass-float] [data-changed-files]>:first-child>:first-child,html[data-dsh-glass-float] [data-presented-file]>:first-child{background:var(--dsh-glass-card-raised)}html[data-dsh-glass-float] [data-turn-trigger]{background:var(--dsh-glass-card);border-color:var(--dsh-glass-rim-soft);border-radius:14px}html[data-dsh-glass-float] [data-turn-trigger]:hover{background:var(--dsh-glass-card-hover)}[data-dsh-glass] [data-dsh-glass-settings]{--dsh-glass-settings-raised:calc(38% + 38% * var(--dsh-glass-frost,1));--dsh-glass-settings-soft:calc(30% + 30% * var(--dsh-glass-frost,1));--dsw-alias-bg-module-platform:color-mix(in srgb, var(--dsw-static-neutral-bluish-800) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-3:color-mix(in srgb, var(--dsw-static-neutral-bluish-800) var(--dsh-glass-settings-soft), transparent);--dsw-alias-bg-layer-2:color-mix(in srgb, var(--dsw-static-neutral-bluish-850) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-1:color-mix(in srgb, var(--dsw-static-neutral-bluish-850) var(--dsh-glass-settings-soft), transparent);--dsw-specific-sidebar-nav-item-active:color-mix(in srgb, var(--dsw-static-neutral-bluish-750) var(--dsh-glass-settings-raised), transparent);--dsw-specific-sidebar-nav-item-hover:color-mix(in srgb, var(--dsw-static-neutral-bluish-850) var(--dsh-glass-settings-soft), transparent)}[data-dsh-glass] body:not([data-ds-dark-theme]) [data-dsh-glass-settings],[data-dsh-glass] body:not([data-ds-dark-theme])[data-dsh-glass-settings]{--dsw-alias-bg-module-platform:color-mix(in srgb, var(--dsw-static-neutral-bluish-60) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-3:color-mix(in srgb, var(--dsw-static-neutral-bluish-00) var(--dsh-glass-settings-soft), transparent);--dsw-alias-bg-layer-2:color-mix(in srgb, var(--dsw-static-neutral-bluish-00) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-1:color-mix(in srgb, var(--dsw-static-neutral-bluish-00) var(--dsh-glass-settings-soft), transparent);--dsw-specific-sidebar-nav-item-active:color-mix(in srgb, var(--dsw-static-neutral-bluish-100) var(--dsh-glass-settings-raised), transparent);--dsw-specific-sidebar-nav-item-hover:color-mix(in srgb, var(--dsw-static-neutral-bluish-75) var(--dsh-glass-settings-soft), transparent)}[data-dsh-glass-float] [data-phase] header:not([class*=headerBlank]){width:100%;margin:var(--dsh-glass-gap,12px) auto 0;max-width:min(calc(var(--dsh-chat-user-width,clamp(680px, calc(var(--dsh-conversation-column-width,1500px) * .64), 920px)) + 32px), calc(100% - 32px));border:1px solid var(--dsh-glass-rim);background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);backdrop-filter:blur(var(--dsh-glass-blur,14px));border-radius:20px;padding:10px 16px 8px}[data-dsh-glass-float] [data-phase] header:not([class*=headerBlank]):after{display:none}[data-dsh-glass-float] [data-dsh-glass-frame][data-sidebar-collapsed] [data-phase] header:not([class*=headerBlank]){width:auto;margin-left:calc(var(--dsh-glass-gap,12px) + 16px);max-width:none;margin-right:16px}[data-dsh-glass-float] [class*=sidebarCol]{--dsw-specific-sidebar-fill:transparent;z-index:9;margin:var(--dsh-glass-gap,12px);border:1px solid var(--dsh-glass-rim-soft);box-shadow:var(--dsh-glass-drop);border-radius:20px;padding:10px 12px 14px;position:relative;overflow:hidden}[data-dsh-glass-float] [class*=sidebarCol]:before{content:\"\";border-radius:inherit;background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge);z-index:-1;pointer-events:none;transition:border-radius .15s var(--ds-ease-in-out);position:absolute;inset:0}[data-dsh-glass-float] body{--dsw-specific-sidebar-fill:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(52% * var(--dsh-glass-frost,1)), color-mix(in srgb, var(--dsh-glass-ground), var(--dsh-glass-wash-tint) calc(var(--dsh-glass-wash-mix) * var(--dsh-glass-ambience))))!important}[data-dsh-glass-float] [data-dsh-glass-frame][data-sidebar-collapsed] [class*=sidebarCol]{margin:var(--dsh-glass-gap,12px) calc(-1 * min(var(--dsh-glass-gap,12px), 16px)) var(--dsh-glass-gap,12px) var(--dsh-glass-gap,12px);transition:margin .15s var(--ds-ease-in-out), border-radius .15s var(--ds-ease-in-out);border-radius:16px;padding:0}[data-dsh-glass-float] [data-dsh-glass-frame]:not([data-sidebar-collapsed]) [data-dsh-glass-sidebar-root]{width:100%!important}[data-dsh-glass-float] [data-dsh-glass-trajectory]{margin:8px auto var(--dsh-glass-gap,12px);width:calc(100% - 32px);max-width:min(calc(var(--dsh-chat-user-width,clamp(680px, calc(var(--dsh-conversation-column-width,1500px) * .64), 920px)) + 32px), calc(100% - 32px));height:calc(100% - 8px - var(--dsh-glass-gap,12px));border:1px solid var(--dsh-glass-rim);background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);border-radius:20px;overflow:hidden}[data-dsh-glass-float] [data-dsh-glass-trajectory] [role=toolbar],[data-dsh-glass-float] [data-dsh-glass-trajectory] section[aria-label=Trajectory\\ timeline]{background:0 0}[data-dsh-glass-float] [data-composer-card],[data-dsh-glass-float] [data-composer-card]:after{border-radius:24px}[data-dsh-glass-float] [data-composer-card]{z-index:8;isolation:isolate;border:1px solid var(--dsh-glass-rim-strong);box-shadow:var(--dsh-glass-input-shadow);background:0 0;position:relative}[data-dsh-glass-float] [data-composer-card]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge);backdrop-filter:blur(var(--dsh-glass-blur,14px));pointer-events:none;position:absolute;inset:0}[data-dsh-glass-float] [data-dsh-glass-inputbar]:not([class*=hero]):not(:has([data-dsh-glass-stats])){padding-bottom:var(--dsh-glass-gap,12px)}[data-dsh-glass-float] [role=treeitem][aria-selected=true]{background:var(--dsw-alias-interactive-bg-hover)}[data-dsh-glass-float] button[class*=button]:hover:not(:disabled),[data-dsh-glass-float] [role=menuitem]:hover:not(:disabled){box-shadow:0 0 12px color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 20%, transparent)}[data-dsh-glass-float] [data-menu-material=translucent]:not(:focus-visible){--dsw-menu-surface-fill:var(--dsh-glass-card-raised);--dsw-menu-backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] body[data-ds-dark-theme] [data-menu-material=translucent]:not(:focus-visible){outline:1px solid var(--dsh-glass-rim-soft);outline-offset:-1px}[data-dsh-glass-float] [role=menu]:not([data-menu-material]):not([data-menu-material] *){background:var(--dsh-glass-card-raised);border:1px solid var(--dsh-glass-rim-soft);backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] [data-menu-material=translucent]:has([role=group]>[role=menuitemradio]){--dsw-menu-surface-fill:color-mix(in srgb, var(--dsw-alias-bg-layer-2) 70%, transparent)}[data-dsh-glass-float] [data-menu-group]:has(>[role=menuitemradio])>[data-menu-group-heading]{background:var(--dsh-glass-card-raised);backdrop-filter:blur(var(--dsh-glass-blur,14px));border-radius:999px;align-items:center;width:fit-content;margin:3px 0 5px 6px;padding:3px 10px;display:inline-flex}[data-dsh-glass-float] [role=presentation]>[role=dialog][aria-modal=true]{isolation:isolate;backdrop-filter:none;border:1px solid var(--dsh-glass-rim);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);background:0 0;border-radius:20px;position:relative}[data-dsh-glass-float] [role=presentation]>[role=dialog][aria-modal=true]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card-raised);backdrop-filter:blur(var(--dsh-glass-blur,14px));pointer-events:none;position:absolute;inset:0}[data-dsh-glass] [data-conversation-scroll]{text-shadow:0 0 1px #ffffff80}[data-dsh-glass] body[data-ds-dark-theme] [data-conversation-scroll]{text-shadow:0 0 1px #0006}[data-dsh-glass-float] [data-dsh-glass-inputbar] [data-slot]{color:var(--dsw-alias-label-secondary)}[data-dsh-glass]{--dsh-glass-entry-scale:1}[data-dsh-glass-compat]{--dsh-glass-entry-scale:0}[data-dsh-glass] [data-testid^=view-]{animation:dsh-glass-in calc(.26s * var(--dsh-glass-entry-scale,1)) var(--ds-ease-in-out)}[data-dsh-glass] [data-tool]{animation:dsh-glass-rise calc(.3s * var(--dsh-glass-entry-scale,1)) var(--ds-ease-in-out) both}[data-dsh-glass] [role=dialog]{animation:dsh-glass-dialog-in calc(.24s * var(--dsh-glass-entry-scale,1)) var(--ds-ease-in-out)}@keyframes dsh-glass-in{0%{opacity:0}}@keyframes dsh-glass-rise{0%{opacity:0;transform:translateY(6px)}}@keyframes dsh-glass-dialog-in{0%{opacity:0}}[data-dsh-glass] :focus-visible{outline:2px solid color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 85%, transparent);outline-offset:1px}[data-dsh-glass] ::selection{background:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 35%, transparent)}[data-dsh-glass-compat] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-compat] [class*=popover]:not([data-menu-material]):not(:is([class*=popover],[class*=dropdown],[data-menu-material],[role=menu]) *),[data-dsh-glass-compat] [class*=dropdown]:not([data-menu-material]):not(:is([class*=popover],[class*=dropdown],[data-menu-material],[role=menu]) *){backdrop-filter:blur(12px)}[data-dsh-glass-compat] [data-menu-material=translucent]:not(:focus-visible){--dsw-menu-surface-fill:var(--dsh-glass-card-raised);--dsw-menu-backdrop-filter:blur(12px)}/* 有意移除:平铺玻璃模式下右侧栏外壳的 backdrop-filter 会在展开/全屏切换时造成背景透出、收起后白屏(df5eb68 修复,勿随上游基线同步带回) */[data-dsh-glass-compat] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-compat] [class*=popover]:not([data-menu-material]):not(:is([class*=popover],[class*=dropdown],[data-menu-material],[role=menu]) *),[data-dsh-glass-compat] [class*=dropdown]:not([data-menu-material]):not(:is([class*=popover],[class*=dropdown],[data-menu-material],[role=menu]) *){background:var(--dsh-glass-card-raised)}[data-dsh-glass-compat] [data-composer-card]{isolation:isolate;backdrop-filter:none;background:0 0;position:relative}[data-dsh-glass-compat] [data-composer-card]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card-raised);backdrop-filter:blur(12px);pointer-events:none;position:absolute;inset:0}[data-dsh-glass-compat] [role=menu]:not([data-menu-material]):not([data-menu-material] *):not(:focus-visible),[data-dsh-glass-compat] [data-composer-card]:not(:focus-visible),[data-dsh-glass-compat] [class*=popover]:not([data-menu-material]):not(:is([class*=popover],[class*=dropdown],[data-menu-material],[role=menu]) *):not(:focus-visible),[data-dsh-glass-compat] [class*=dropdown]:not([data-menu-material]):not(:is([class*=popover],[class*=dropdown],[data-menu-material],[role=menu]) *):not(:focus-visible){outline:1px solid var(--dsh-glass-rim);outline-offset:-1px}[data-dsh-glass-compat] [role=presentation]>[role=dialog][aria-modal=true]{isolation:isolate;backdrop-filter:none;border:1px solid var(--dsh-glass-rim);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);background:0 0;position:relative}[data-dsh-glass-compat] [role=presentation]>[role=dialog][aria-modal=true]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card-raised);backdrop-filter:blur(var(--dsh-glass-blur,12px));pointer-events:none;position:absolute;inset:0}[data-dsh-glass-settings] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-settings] .dsm-select-menu{background:color-mix(in srgb, var(--dsh-glass-ground) 92%, transparent);backdrop-filter:blur(12px);box-shadow:var(--dsh-glass-drop)}[data-dsh-glass-settings] .dsm-panel-head{isolation:isolate;outline:1px solid var(--dsh-glass-rim-soft);outline-offset:-1px;background:0 0;border-radius:14px;padding:6px 12px 4px}[data-dsh-glass-settings] .dsm-panel-head:before{content:\"\";z-index:-1;border-radius:inherit;background:color-mix(in srgb, var(--dsh-glass-ground) 78%, transparent);backdrop-filter:blur(12px);pointer-events:none;position:absolute;inset:0}@media (prefers-reduced-motion:reduce){[data-dsh-glass] [data-testid^=view-],[data-dsh-glass] [data-tool],[data-dsh-glass] [role=dialog]{animation:none}}";
|
|
305
305
|
//#endregion
|
|
306
306
|
//#region src/client/theme/glass-seams.ts
|
|
307
307
|
const SEAMS = [
|
|
@@ -341,16 +341,16 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card {
|
|
|
341
341
|
},
|
|
342
342
|
{
|
|
343
343
|
attribute: "data-dsh-glass-settings",
|
|
344
|
-
selector: ":has(> [role=\"dialog\"][aria-modal=\"true\"])"
|
|
344
|
+
selector: ":not(body):has(> [role=\"dialog\"][aria-modal=\"true\"])"
|
|
345
345
|
}
|
|
346
346
|
];
|
|
347
347
|
function stamp(seam) {
|
|
348
348
|
if (seam.first) {
|
|
349
349
|
const el = document.querySelector(seam.selector);
|
|
350
|
-
if (el !== null && !el.hasAttribute(seam.attribute)) el.setAttribute(seam.attribute, "");
|
|
350
|
+
if (el !== null && el !== document.body && !el.hasAttribute(seam.attribute)) el.setAttribute(seam.attribute, "");
|
|
351
351
|
return;
|
|
352
352
|
}
|
|
353
|
-
for (const el of document.querySelectorAll(seam.selector)) if (!el.hasAttribute(seam.attribute)) el.setAttribute(seam.attribute, "");
|
|
353
|
+
for (const el of document.querySelectorAll(seam.selector)) if (el !== document.body && !el.hasAttribute(seam.attribute)) el.setAttribute(seam.attribute, "");
|
|
354
354
|
}
|
|
355
355
|
const COMPOSER_SURFACE_ATTRIBUTE = "data-dcu-glass-composer-surface";
|
|
356
356
|
function stampAll() {
|
|
@@ -533,6 +533,14 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card {
|
|
|
533
533
|
outline: 1px solid var(--dsh-glass-rim-soft, rgba(255, 255, 255, 0.12));
|
|
534
534
|
outline-offset: -1px;
|
|
535
535
|
}
|
|
536
|
+
|
|
537
|
+
/* 浅色模式设置卡片与背景防御(Issue #102):
|
|
538
|
+
防止 --dsw-alias-bg-layer-2 或 --dsw-alias-settings-card-fill 被暗色规则或异常标记污染为深灰(#808081) */
|
|
539
|
+
[data-dsh-glass] body:not([data-ds-dark-theme]) [data-dsh-glass-settings],
|
|
540
|
+
[data-dsh-glass] body:not([data-ds-dark-theme])[data-dsh-glass-settings] {
|
|
541
|
+
--dsw-alias-bg-layer-2: color-mix(in srgb, var(--dsw-static-neutral-bluish-00) var(--dsh-glass-settings-raised), transparent) !important;
|
|
542
|
+
--dsw-alias-settings-card-fill: var(--dsw-alias-bg-layer-2, #ffffff) !important;
|
|
543
|
+
}
|
|
536
544
|
`;
|
|
537
545
|
let styleTag = null;
|
|
538
546
|
let seamDisposer;
|
|
@@ -12946,12 +12954,12 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
12946
12954
|
*
|
|
12947
12955
|
* 不变式:
|
|
12948
12956
|
* - 始终包含内置分区 `pinned`(置顶)与兜底分区 `default`(项目),且各只有一份;
|
|
12949
|
-
* - `
|
|
12957
|
+
* - `pinned` 固定排在最前面,`default`(项目)与自定义分区均可自由上下调整顺序;
|
|
12950
12958
|
* - 一个工作区最多出现在一个分区里,未知工作区在归一化时被丢弃。
|
|
12951
12959
|
*/
|
|
12952
|
-
/** 内置「置顶」分区 id
|
|
12960
|
+
/** 内置「置顶」分区 id:固定最前,可改名但不可删除或移动。 */
|
|
12953
12961
|
const PINNED_SECTION_ID = "pinned";
|
|
12954
|
-
/** 兜底「项目」分区 id
|
|
12962
|
+
/** 兜底「项目」分区 id:不可删除或改名,但支持上下移动与自定义排序。 */
|
|
12955
12963
|
const DEFAULT_SECTION_ID = "default";
|
|
12956
12964
|
/** 新建用户的默认分区结构:置顶 + 项目,没有自定义分区。 */
|
|
12957
12965
|
function createSectionsState() {
|
|
@@ -13006,7 +13014,7 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
13006
13014
|
/**
|
|
13007
13015
|
* 用当前实际存在的工作区集合校正分区结构:
|
|
13008
13016
|
* - 丢弃已删除的工作区、跨分区重复项(保留首次出现)与重复分区 id;
|
|
13009
|
-
* - 补齐缺失的内置分区,`default`
|
|
13017
|
+
* - 补齐缺失的内置分区,`default` 缺失时追加到末尾(已有则保留用户排序位置);
|
|
13010
13018
|
* - 名称空白的内置分区回退默认名。
|
|
13011
13019
|
*
|
|
13012
13020
|
* @param state - 待校正的结构。
|
|
@@ -13041,16 +13049,18 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
13041
13049
|
name: defaultNameFor(PINNED_SECTION_ID),
|
|
13042
13050
|
ids: []
|
|
13043
13051
|
});
|
|
13044
|
-
|
|
13045
|
-
|
|
13052
|
+
else {
|
|
13053
|
+
const pinnedIndex = sections.findIndex((section) => section.id === PINNED_SECTION_ID);
|
|
13054
|
+
if (pinnedIndex > 0) {
|
|
13055
|
+
const [pinned] = sections.splice(pinnedIndex, 1);
|
|
13056
|
+
sections.unshift(pinned);
|
|
13057
|
+
}
|
|
13058
|
+
}
|
|
13059
|
+
if (sections.findIndex((section) => section.id === "default") === -1) sections.push({
|
|
13046
13060
|
id: DEFAULT_SECTION_ID,
|
|
13047
13061
|
name: defaultNameFor(DEFAULT_SECTION_ID),
|
|
13048
13062
|
ids: []
|
|
13049
13063
|
});
|
|
13050
|
-
else if (defaultIndex !== sections.length - 1) {
|
|
13051
|
-
const [fallback] = sections.splice(defaultIndex, 1);
|
|
13052
|
-
sections.push(fallback);
|
|
13053
|
-
}
|
|
13054
13064
|
return { sections };
|
|
13055
13065
|
}
|
|
13056
13066
|
/** 内置分区的默认名称。 */
|
|
@@ -13090,14 +13100,26 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
13090
13100
|
next.ids.splice(at, 0, workspaceId);
|
|
13091
13101
|
return { sections };
|
|
13092
13102
|
}
|
|
13093
|
-
/**
|
|
13094
|
-
function createSection(state, id, name) {
|
|
13103
|
+
/** 新建自定义分区,默认插到兜底分区之前;若指定 relativeToSectionId,则插在该分区之后(平级新建)。 */
|
|
13104
|
+
function createSection(state, id, name, relativeToSectionId) {
|
|
13095
13105
|
const sections = state.sections.map((section) => ({
|
|
13096
13106
|
...section,
|
|
13097
13107
|
ids: section.ids.slice()
|
|
13098
13108
|
}));
|
|
13099
|
-
|
|
13100
|
-
|
|
13109
|
+
let at;
|
|
13110
|
+
if (relativeToSectionId !== void 0) {
|
|
13111
|
+
const idx = sections.findIndex((section) => section.id === relativeToSectionId);
|
|
13112
|
+
if (idx !== -1) at = idx + 1;
|
|
13113
|
+
else {
|
|
13114
|
+
const defaultIndex = sections.findIndex((section) => section.id === DEFAULT_SECTION_ID);
|
|
13115
|
+
at = defaultIndex === -1 ? sections.length : defaultIndex;
|
|
13116
|
+
}
|
|
13117
|
+
} else {
|
|
13118
|
+
const defaultIndex = sections.findIndex((section) => section.id === DEFAULT_SECTION_ID);
|
|
13119
|
+
at = defaultIndex === -1 ? sections.length : defaultIndex;
|
|
13120
|
+
}
|
|
13121
|
+
const pinnedIndex = sections.findIndex((section) => section.id === PINNED_SECTION_ID);
|
|
13122
|
+
if (pinnedIndex !== -1 && at <= pinnedIndex) at = pinnedIndex + 1;
|
|
13101
13123
|
sections.splice(at, 0, {
|
|
13102
13124
|
id,
|
|
13103
13125
|
name,
|
|
@@ -13136,15 +13158,15 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
13136
13158
|
* 调整分区顺序。
|
|
13137
13159
|
*
|
|
13138
13160
|
* @param state - 当前结构。
|
|
13139
|
-
* @param sectionId -
|
|
13140
|
-
* @param beforeSectionId - 插入到该分区之前;`null`
|
|
13141
|
-
* @returns
|
|
13161
|
+
* @param sectionId - 被移动的分区(除置顶外的任意分区,包括项目分区)。
|
|
13162
|
+
* @param beforeSectionId - 插入到该分区之前;`null` 表示排到最后。不能为置顶分区。
|
|
13163
|
+
* @returns 新的结构;置顶分区不可移动,非法目标原样返回。
|
|
13142
13164
|
*/
|
|
13143
13165
|
function moveSection(state, sectionId, beforeSectionId) {
|
|
13144
|
-
if (sectionId === "
|
|
13166
|
+
if (sectionId === "pinned" || beforeSectionId === "pinned") return state;
|
|
13167
|
+
if (beforeSectionId === sectionId) return state;
|
|
13145
13168
|
const moving = state.sections.find((section) => section.id === sectionId);
|
|
13146
13169
|
if (moving === void 0) return state;
|
|
13147
|
-
if (beforeSectionId === "default" || beforeSectionId === sectionId) return state;
|
|
13148
13170
|
const rest = state.sections.filter((section) => section.id !== sectionId);
|
|
13149
13171
|
let at = rest.length;
|
|
13150
13172
|
if (beforeSectionId !== null) {
|
|
@@ -13153,38 +13175,38 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
13153
13175
|
at = index;
|
|
13154
13176
|
}
|
|
13155
13177
|
rest.splice(at, 0, moving);
|
|
13156
|
-
const
|
|
13157
|
-
if (
|
|
13158
|
-
const [
|
|
13159
|
-
rest.
|
|
13178
|
+
const pinnedIndex = rest.findIndex((section) => section.id === PINNED_SECTION_ID);
|
|
13179
|
+
if (pinnedIndex > 0) {
|
|
13180
|
+
const [pinned] = rest.splice(pinnedIndex, 1);
|
|
13181
|
+
rest.unshift(pinned);
|
|
13160
13182
|
}
|
|
13161
13183
|
return { sections: rest };
|
|
13162
13184
|
}
|
|
13163
|
-
/**
|
|
13185
|
+
/** 判断某个分区是否可以向上移动(除置顶外,且上方还有其他可移动分区)。 */
|
|
13164
13186
|
function canMoveSectionUp(state, sectionId) {
|
|
13165
|
-
if (
|
|
13166
|
-
return state.sections.filter((s) =>
|
|
13187
|
+
if (sectionId === "pinned") return false;
|
|
13188
|
+
return state.sections.filter((s) => s.id !== PINNED_SECTION_ID).findIndex((s) => s.id === sectionId) > 0;
|
|
13167
13189
|
}
|
|
13168
|
-
/**
|
|
13190
|
+
/** 判断某个分区是否可以向下移动(除置顶外,且下方还有其他可移动分区)。 */
|
|
13169
13191
|
function canMoveSectionDown(state, sectionId) {
|
|
13170
|
-
if (
|
|
13171
|
-
const
|
|
13172
|
-
const index =
|
|
13173
|
-
return index !== -1 && index <
|
|
13192
|
+
if (sectionId === "pinned") return false;
|
|
13193
|
+
const movable = state.sections.filter((s) => s.id !== PINNED_SECTION_ID);
|
|
13194
|
+
const index = movable.findIndex((s) => s.id === sectionId);
|
|
13195
|
+
return index !== -1 && index < movable.length - 1;
|
|
13174
13196
|
}
|
|
13175
|
-
/**
|
|
13197
|
+
/** 向上移动分区(与上方相邻的分区交换位置)。 */
|
|
13176
13198
|
function moveSectionUp(state, sectionId) {
|
|
13177
13199
|
if (!canMoveSectionUp(state, sectionId)) return state;
|
|
13178
|
-
const
|
|
13179
|
-
const prev =
|
|
13200
|
+
const movable = state.sections.filter((s) => s.id !== PINNED_SECTION_ID);
|
|
13201
|
+
const prev = movable[movable.findIndex((s) => s.id === sectionId) - 1];
|
|
13180
13202
|
return moveSection(state, sectionId, prev.id);
|
|
13181
13203
|
}
|
|
13182
|
-
/**
|
|
13204
|
+
/** 向下移动分区(与下方相邻的分区交换位置)。 */
|
|
13183
13205
|
function moveSectionDown(state, sectionId) {
|
|
13184
13206
|
if (!canMoveSectionDown(state, sectionId)) return state;
|
|
13185
|
-
const
|
|
13186
|
-
const index =
|
|
13187
|
-
return moveSection(state, sectionId, index + 2 <
|
|
13207
|
+
const movable = state.sections.filter((s) => s.id !== PINNED_SECTION_ID);
|
|
13208
|
+
const index = movable.findIndex((s) => s.id === sectionId);
|
|
13209
|
+
return moveSection(state, sectionId, index + 2 < movable.length ? movable[index + 2].id : null);
|
|
13188
13210
|
}
|
|
13189
13211
|
/**
|
|
13190
13212
|
* 用宿主的最新顺序校正归属(用户在原生树上直接拖动项目后调用)。
|
|
@@ -13392,6 +13414,8 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
13392
13414
|
//#region src/client/sidebar/sections/index.ts
|
|
13393
13415
|
/** 分区标题行的标记属性,样式与测试都靠它定位。 */
|
|
13394
13416
|
const SECTION_HEADER_ATTR = "data-dcu-ws-section";
|
|
13417
|
+
/** 顶部工作区横栏注入的新建分区操作标识。 */
|
|
13418
|
+
const CREATE_SECTION_ACTION = "create-section";
|
|
13395
13419
|
/** 追加在项目行菜单里的入口标记。 */
|
|
13396
13420
|
const MENU_ITEM_ATTR = "data-dcu-ws-section-item";
|
|
13397
13421
|
const HEADER_CLASS = "dcu-ws-section";
|
|
@@ -13403,11 +13427,12 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
13403
13427
|
* 只吃宿主主题变量,随明暗与主题切换自动跟随;宿主变量缺失时回退中性色。
|
|
13404
13428
|
*/
|
|
13405
13429
|
const SECTIONS_CSS = `
|
|
13406
|
-
.dcu-ws-section{display:flex;align-items:center;gap:4px;height:30px;margin:8px 2px 2px;padding:0 4px 0 var(--dcu-section-lead,6px);font-size:12px;letter-spacing:.2px;color:var(--dsw-alias-label-tertiary,rgba(127,127,127,.95));-webkit-app-region:no-drag;cursor:pointer;border-radius:6px}
|
|
13407
|
-
.dcu-ws-section:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.10))}
|
|
13430
|
+
.dcu-ws-section{display:flex;align-items:center;gap:4px;height:30px;margin:8px 2px 2px;padding:0 4px 0 var(--dcu-section-lead,6px);font-size:12px;font-weight:500;letter-spacing:.2px;color:var(--dsw-alias-label-tertiary,rgba(127,127,127,.95));-webkit-app-region:no-drag;cursor:pointer;border-radius:6px;transition:background 150ms ease,color 150ms ease}
|
|
13431
|
+
.dcu-ws-section:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.10));color:var(--dsw-alias-label-secondary,var(--dsw-alias-label-primary,inherit))}
|
|
13408
13432
|
.dcu-ws-section-label{flex:0 0 auto;max-width:70%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
13409
|
-
/*
|
|
13410
|
-
.dcu-ws-section-chevron{display:inline-flex;align-items:center;justify-content:center;flex:none;width:16px;height:20px;color:var(--dsw-alias-label-caption,var(--dsw-alias-label-tertiary,#888))}
|
|
13433
|
+
/* 展开/收起箭头:16×20 的 slot,里面是细线 Chevron,展开旋转 90°。 */
|
|
13434
|
+
.dcu-ws-section-chevron{display:inline-flex;align-items:center;justify-content:center;flex:none;width:16px;height:20px;color:var(--dsw-alias-label-caption,var(--dsw-alias-label-tertiary,#888));transition:color 150ms ease}
|
|
13435
|
+
.dcu-ws-section:hover .dcu-ws-section-chevron{color:var(--dsw-alias-label-secondary,var(--dsw-alias-label-primary,inherit))}
|
|
13411
13436
|
.dcu-ws-section-chevron svg{display:block;transition:transform .15s var(--ds-ease-in-out,cubic-bezier(.2,0,0,1))}
|
|
13412
13437
|
.dcu-ws-section[data-open='true'] .dcu-ws-section-chevron svg{transform:rotate(90deg)}
|
|
13413
13438
|
.dcu-ws-section-grow{flex:1 1 auto}
|
|
@@ -13447,6 +13472,12 @@ body[data-dcu-drag-blocked='true'] [class*="workspaceDropBefore"]::before,
|
|
|
13447
13472
|
body[data-dcu-drag-blocked='true'] [class*="workspaceDropAfter"]::after,
|
|
13448
13473
|
body[data-dcu-drag-blocked='true'] [class*="dropBefore"]::before,
|
|
13449
13474
|
body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !important}
|
|
13475
|
+
/* 顶部工作区横栏操作区扩展:原生宿主 max-width 为 60px 仅预留两颗按钮;注入新建分区后需放宽到 96px,
|
|
13476
|
+
未展开搜索时正常展示 3 颗按钮,当宿主展开搜索(添加 headerActionsHidden)时依然平滑折叠至 0 */
|
|
13477
|
+
[data-sidebar-workspace-header] [class*="headerActions"]:not([class*="headerActionsHidden"]),
|
|
13478
|
+
[class*="sectionHeader"] [class*="headerActions"]:not([class*="headerActionsHidden"]) {
|
|
13479
|
+
max-width: 96px;
|
|
13480
|
+
}
|
|
13450
13481
|
|
|
13451
13482
|
`;
|
|
13452
13483
|
/** 注入分区样式;已存在时复用(样式与组件生命周期解耦,卸载不摘除)。 */
|
|
@@ -13471,11 +13502,16 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
13471
13502
|
const id = key.slice(10);
|
|
13472
13503
|
return id === "" ? void 0 : id;
|
|
13473
13504
|
}
|
|
13505
|
+
/** 宿主侧栏是否处于收起(56px 导轨 / rail)形态。 */
|
|
13506
|
+
function isSidebarCollapsed() {
|
|
13507
|
+
return document.querySelector("[data-sidebar-collapsed=\"true\"]") !== null;
|
|
13508
|
+
}
|
|
13474
13509
|
/**
|
|
13475
13510
|
* 列表是否属于侧栏的「工作区」区块。
|
|
13476
13511
|
*
|
|
13477
|
-
*
|
|
13478
|
-
*
|
|
13512
|
+
* 频道、定时等页签下也会出现树形列表,只有同时满足下面条件才算工作区,避免把分区标题塞进别的列表:
|
|
13513
|
+
* 同一区域的区块标题带有操作按钮(展开态 2 颗或收起态/无目录流 1 颗)、列表里确有工作区行。
|
|
13514
|
+
* 收起形态由 CSS 及 isSidebarCollapsed 守卫隐藏标题和按钮,此处负责结构判定。
|
|
13479
13515
|
*/
|
|
13480
13516
|
function isWorkspaceRegion(list) {
|
|
13481
13517
|
if (list.querySelector("[data-row-key^=\"workspace:\"]") === null) return false;
|
|
@@ -13484,7 +13520,7 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
13484
13520
|
const header = node.querySelector("[class*=\"sectionHeader\"]");
|
|
13485
13521
|
if (header !== null) {
|
|
13486
13522
|
const actions = header.querySelector("[class*=\"headerActions\"]");
|
|
13487
|
-
if (actions !== null && actions.querySelectorAll("button").length >=
|
|
13523
|
+
if (actions !== null && actions.querySelectorAll("button").length >= 1) return true;
|
|
13488
13524
|
}
|
|
13489
13525
|
node = node.parentElement;
|
|
13490
13526
|
}
|
|
@@ -13760,6 +13796,36 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
13760
13796
|
pendingTargetSectionId = void 0;
|
|
13761
13797
|
}, 9e4);
|
|
13762
13798
|
}
|
|
13799
|
+
/** 在途的新建分区编辑行,供组件卸载(dispose)时清理残留的输入行 DOM。 */
|
|
13800
|
+
let activeCreatingRow = null;
|
|
13801
|
+
function positionCreatingRow(row, host, relativeToSectionId) {
|
|
13802
|
+
let ref = null;
|
|
13803
|
+
if (relativeToSectionId !== void 0) {
|
|
13804
|
+
const targetHeader = headers.get(relativeToSectionId);
|
|
13805
|
+
if (targetHeader !== void 0 && targetHeader.parentElement === host) {
|
|
13806
|
+
const memberIds = state.sections.find((s) => s.id === relativeToSectionId)?.ids ?? [];
|
|
13807
|
+
let lastMemberEl = null;
|
|
13808
|
+
for (const mId of memberIds) {
|
|
13809
|
+
const el = host.querySelector(`[data-row-key="workspace:${mId}"]`);
|
|
13810
|
+
if (el !== null) {
|
|
13811
|
+
const block = blockOf(el, host);
|
|
13812
|
+
if (block !== null && block.parentElement === host) lastMemberEl = block;
|
|
13813
|
+
}
|
|
13814
|
+
}
|
|
13815
|
+
ref = lastMemberEl !== null ? lastMemberEl.nextSibling : targetHeader.nextSibling;
|
|
13816
|
+
if (row.parentElement !== host || row.nextSibling !== ref) host.insertBefore(row, ref);
|
|
13817
|
+
return;
|
|
13818
|
+
}
|
|
13819
|
+
}
|
|
13820
|
+
const defaultHeader = headers.get(DEFAULT_SECTION_ID);
|
|
13821
|
+
if (defaultHeader !== void 0 && defaultHeader.parentElement === host) ref = defaultHeader;
|
|
13822
|
+
else {
|
|
13823
|
+
const lastHeader = Array.from(headers.values()).at(-1);
|
|
13824
|
+
if (lastHeader !== void 0 && lastHeader.parentElement === host) ref = lastHeader.nextSibling;
|
|
13825
|
+
else ref = host.firstChild;
|
|
13826
|
+
}
|
|
13827
|
+
if (row.parentElement !== host || row.nextSibling !== ref) host.insertBefore(row, ref);
|
|
13828
|
+
}
|
|
13763
13829
|
/**
|
|
13764
13830
|
* 宿主顶栏/侧栏头部原生「添加工作区」按钮的 8 门精确文案(同步自宿主 `workspace.add`)。
|
|
13765
13831
|
* 仅做精确全等匹配:既能绕开宿主工作区行右键菜单(`工作区“…”的操作`)与带省略号的菜单项(`添加工作区…`),
|
|
@@ -13789,6 +13855,71 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
13789
13855
|
for (const btn of candidates) if (isHostAddWorkspaceButton(btn)) return btn;
|
|
13790
13856
|
return null;
|
|
13791
13857
|
}
|
|
13858
|
+
function findHostHeaderActions(targetList = list) {
|
|
13859
|
+
const hostAddBtn = findHostAddWorkspaceButton();
|
|
13860
|
+
if (hostAddBtn !== null) {
|
|
13861
|
+
const parentActions = hostAddBtn.closest("[class*=\"headerActions\"]");
|
|
13862
|
+
if (parentActions !== null) return parentActions;
|
|
13863
|
+
}
|
|
13864
|
+
const byHeader = document.querySelector("[data-sidebar-workspace-header] [class*=\"headerActions\"], [class*=\"sectionHeader\"] [class*=\"headerActions\"]");
|
|
13865
|
+
if (byHeader !== null) return byHeader;
|
|
13866
|
+
const listEl = targetList ?? findWorkspaceList(document);
|
|
13867
|
+
if (listEl !== void 0) {
|
|
13868
|
+
const container = listEl.closest("[class*=\"root\"]") ?? listEl.parentElement?.parentElement;
|
|
13869
|
+
if (container !== null && container !== void 0) {
|
|
13870
|
+
const actions = container.querySelector("[class*=\"headerActions\"]");
|
|
13871
|
+
if (actions !== null) return actions;
|
|
13872
|
+
}
|
|
13873
|
+
}
|
|
13874
|
+
return null;
|
|
13875
|
+
}
|
|
13876
|
+
function syncHostCreateSectionButton(targetList = list) {
|
|
13877
|
+
if (disposed) return;
|
|
13878
|
+
if (!sectionsLoaded || targetList === void 0 || isSidebarCollapsed()) {
|
|
13879
|
+
removeHostCreateSectionButton();
|
|
13880
|
+
return;
|
|
13881
|
+
}
|
|
13882
|
+
const actionsContainer = findHostHeaderActions(targetList);
|
|
13883
|
+
if (actionsContainer === null) return;
|
|
13884
|
+
let btn = actionsContainer.querySelector(`button[data-dcu-action="${CREATE_SECTION_ACTION}"]`);
|
|
13885
|
+
if (btn === null) {
|
|
13886
|
+
const templateBtn = actionsContainer.querySelector("button");
|
|
13887
|
+
if (templateBtn !== null) btn = templateBtn.cloneNode(false);
|
|
13888
|
+
else {
|
|
13889
|
+
btn = document.createElement("button");
|
|
13890
|
+
btn.className = `${HEADER_CLASS}-action`;
|
|
13891
|
+
}
|
|
13892
|
+
btn.setAttribute("type", "button");
|
|
13893
|
+
btn.setAttribute("data-dcu-action", CREATE_SECTION_ACTION);
|
|
13894
|
+
btn.removeAttribute("aria-keyshortcuts");
|
|
13895
|
+
btn.removeAttribute("tabindex");
|
|
13896
|
+
btn.removeAttribute("aria-haspopup");
|
|
13897
|
+
btn.removeAttribute("aria-expanded");
|
|
13898
|
+
btn.removeAttribute("data-context-menu-trigger");
|
|
13899
|
+
btn.innerHTML = iconPlus();
|
|
13900
|
+
const label = text("sections.new", "新建分区");
|
|
13901
|
+
btn.setAttribute("aria-label", label);
|
|
13902
|
+
btn.setAttribute("title", label);
|
|
13903
|
+
btn.addEventListener("click", (event) => {
|
|
13904
|
+
event.preventDefault();
|
|
13905
|
+
event.stopPropagation();
|
|
13906
|
+
startCreateSection();
|
|
13907
|
+
});
|
|
13908
|
+
let insertAnchor = findHostAddWorkspaceButton();
|
|
13909
|
+
while (insertAnchor !== null && insertAnchor.parentElement !== actionsContainer) insertAnchor = insertAnchor.parentElement;
|
|
13910
|
+
if (insertAnchor !== null && insertAnchor.parentElement === actionsContainer) actionsContainer.insertBefore(btn, insertAnchor);
|
|
13911
|
+
else actionsContainer.appendChild(btn);
|
|
13912
|
+
} else {
|
|
13913
|
+
const label = text("sections.new", "新建分区");
|
|
13914
|
+
if (btn.getAttribute("aria-label") !== label) {
|
|
13915
|
+
btn.setAttribute("aria-label", label);
|
|
13916
|
+
btn.setAttribute("title", label);
|
|
13917
|
+
}
|
|
13918
|
+
}
|
|
13919
|
+
}
|
|
13920
|
+
function removeHostCreateSectionButton() {
|
|
13921
|
+
for (const btn of Array.from(document.querySelectorAll(`button[data-dcu-action="${CREATE_SECTION_ACTION}"]`))) btn.remove();
|
|
13922
|
+
}
|
|
13792
13923
|
function triggerHostAddWorkspace() {
|
|
13793
13924
|
triggeringHostAdd = true;
|
|
13794
13925
|
try {
|
|
@@ -14076,6 +14207,15 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
14076
14207
|
}
|
|
14077
14208
|
/** 上一次算对齐时的(标题数+列宽)组合,避免每帧量 rect。 */
|
|
14078
14209
|
let lastAlignKey = "";
|
|
14210
|
+
/**
|
|
14211
|
+
* 获取逻辑上的下一个结构兄弟元素,跳过在途的新建分区编辑行(.dcu-ws-section-editing)。
|
|
14212
|
+
* 编辑行是临时行内输入层,对分区标题的结构定位完全透明,避免 sync 重排误将空分区标题搬到编辑行后面。
|
|
14213
|
+
*/
|
|
14214
|
+
function nextStructuralSibling(node) {
|
|
14215
|
+
let cur = node?.nextElementSibling ?? null;
|
|
14216
|
+
while (cur !== null && cur.classList.contains(`${HEADER_CLASS}-editing`)) cur = cur.nextElementSibling;
|
|
14217
|
+
return cur;
|
|
14218
|
+
}
|
|
14079
14219
|
/** 把标题按分区顺序放到各自第一个分组块前面;空分区贴着下一个分区显示。 */
|
|
14080
14220
|
function placeHeaders(blocks, layoutState = state) {
|
|
14081
14221
|
if (blocks.length === 0) {
|
|
@@ -14092,15 +14232,15 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
14092
14232
|
}
|
|
14093
14233
|
const target = blocks[0].block.parentElement;
|
|
14094
14234
|
if (target === null) return;
|
|
14235
|
+
const isDefaultLast = layoutState.sections.length > 0 && layoutState.sections[layoutState.sections.length - 1]?.id === "default";
|
|
14095
14236
|
const ungrouped = Array.from(list?.querySelectorAll("[data-row-key=\"workspace:\"]") ?? []).map((row) => row instanceof HTMLElement ? blockOf(row, list) : null).find((block) => block !== null);
|
|
14096
14237
|
const byId = new Map(blocks.map((item) => [item.workspaceId, item.block]));
|
|
14097
14238
|
const visibleById = relocatingIds.size === 0 ? byId : new Map(blocks.filter((item) => !relocatingIds.has(item.workspaceId)).map((item) => [item.workspaceId, item.block]));
|
|
14098
|
-
let reference = null;
|
|
14239
|
+
let reference = ungrouped ?? null;
|
|
14099
14240
|
for (let index = layoutState.sections.length - 1; index >= 0; index -= 1) {
|
|
14100
14241
|
const section = layoutState.sections[index];
|
|
14101
14242
|
const first = section.ids.map((id) => visibleById.get(id)).find((block) => block !== void 0);
|
|
14102
14243
|
if (first !== void 0) reference = first;
|
|
14103
|
-
else if (section.id === "default" && ungrouped !== void 0) reference = ungrouped;
|
|
14104
14244
|
if (section.id === "pinned" && section.ids.length === 0) {
|
|
14105
14245
|
const stale = headers.get(PINNED_SECTION_ID);
|
|
14106
14246
|
if (stale !== void 0) {
|
|
@@ -14114,7 +14254,7 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
14114
14254
|
continue;
|
|
14115
14255
|
}
|
|
14116
14256
|
const header = ensureHeader(section.id, section.name);
|
|
14117
|
-
if (header.parentElement !== target || header
|
|
14257
|
+
if (header.parentElement !== target || nextStructuralSibling(header) !== reference) target.insertBefore(header, reference);
|
|
14118
14258
|
reference = header;
|
|
14119
14259
|
}
|
|
14120
14260
|
const memberOf = /* @__PURE__ */ new Map();
|
|
@@ -14147,15 +14287,23 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
14147
14287
|
for (const header of headers.values()) header.style.setProperty("--dcu-section-lead", `${lead}px`);
|
|
14148
14288
|
}
|
|
14149
14289
|
if (ungrouped !== void 0) {
|
|
14150
|
-
|
|
14151
|
-
|
|
14152
|
-
if (
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
|
|
14290
|
+
if (isDefaultLast) {
|
|
14291
|
+
ungrouped.setAttribute("data-dcu-section-member", DEFAULT_SECTION_ID);
|
|
14292
|
+
if (!animatingSections.has("default")) {
|
|
14293
|
+
if (headers.get("default")?.dataset.open === "false") ungrouped.setAttribute("data-dcu-section-hidden", "true");
|
|
14294
|
+
else {
|
|
14295
|
+
ungrouped.removeAttribute("data-dcu-section-hidden");
|
|
14296
|
+
ungrouped.style.removeProperty("max-height");
|
|
14297
|
+
ungrouped.style.removeProperty("overflow");
|
|
14298
|
+
ungrouped.style.removeProperty("opacity");
|
|
14299
|
+
}
|
|
14158
14300
|
}
|
|
14301
|
+
} else {
|
|
14302
|
+
ungrouped.removeAttribute("data-dcu-section-member");
|
|
14303
|
+
ungrouped.removeAttribute("data-dcu-section-hidden");
|
|
14304
|
+
ungrouped.style.removeProperty("max-height");
|
|
14305
|
+
ungrouped.style.removeProperty("overflow");
|
|
14306
|
+
ungrouped.style.removeProperty("opacity");
|
|
14159
14307
|
}
|
|
14160
14308
|
}
|
|
14161
14309
|
for (const [id, header] of Array.from(headers.entries())) if (!layoutState.sections.some((section) => section.id === id)) {
|
|
@@ -14164,7 +14312,7 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
14164
14312
|
}
|
|
14165
14313
|
scheduleStickyUpdate();
|
|
14166
14314
|
}
|
|
14167
|
-
/**
|
|
14315
|
+
/** 列表不在工作区视图(切换至频道、定时等非工作区页签)时摘掉标题,避免串到别的列表里。 */
|
|
14168
14316
|
function detachHeaders() {
|
|
14169
14317
|
for (const header of headers.values()) header.remove();
|
|
14170
14318
|
headers.clear();
|
|
@@ -14364,38 +14512,36 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
14364
14512
|
if (section === void 0) return;
|
|
14365
14513
|
const builtin = sectionId === "pinned" || sectionId === "default";
|
|
14366
14514
|
const items = [];
|
|
14367
|
-
if (!builtin) {
|
|
14368
|
-
|
|
14369
|
-
|
|
14370
|
-
|
|
14371
|
-
|
|
14372
|
-
|
|
14373
|
-
|
|
14374
|
-
|
|
14375
|
-
|
|
14376
|
-
|
|
14377
|
-
|
|
14378
|
-
|
|
14379
|
-
|
|
14380
|
-
|
|
14381
|
-
|
|
14382
|
-
|
|
14383
|
-
|
|
14384
|
-
|
|
14385
|
-
|
|
14386
|
-
|
|
14387
|
-
|
|
14388
|
-
|
|
14389
|
-
|
|
14390
|
-
|
|
14391
|
-
});
|
|
14392
|
-
}
|
|
14515
|
+
if (!builtin) items.push({
|
|
14516
|
+
label: text("sections.rename", "重命名"),
|
|
14517
|
+
icon: iconEdit(),
|
|
14518
|
+
onSelect: () => {
|
|
14519
|
+
closeSectionMenu();
|
|
14520
|
+
startRename(sectionId);
|
|
14521
|
+
}
|
|
14522
|
+
});
|
|
14523
|
+
if (canMoveSectionUp(state, sectionId)) items.push({
|
|
14524
|
+
label: text("sections.moveUp", "向上移动"),
|
|
14525
|
+
icon: iconUp(),
|
|
14526
|
+
onSelect: () => {
|
|
14527
|
+
closeSectionMenu();
|
|
14528
|
+
commitExplicit(moveSectionUp(state, sectionId), section.ids);
|
|
14529
|
+
}
|
|
14530
|
+
});
|
|
14531
|
+
if (canMoveSectionDown(state, sectionId)) items.push({
|
|
14532
|
+
label: text("sections.moveDown", "向下移动"),
|
|
14533
|
+
icon: iconDown(),
|
|
14534
|
+
onSelect: () => {
|
|
14535
|
+
closeSectionMenu();
|
|
14536
|
+
commitExplicit(moveSectionDown(state, sectionId), section.ids);
|
|
14537
|
+
}
|
|
14538
|
+
});
|
|
14393
14539
|
items.push({
|
|
14394
14540
|
label: text("sections.new", "新建分区"),
|
|
14395
14541
|
icon: iconPlus(),
|
|
14396
14542
|
onSelect: () => {
|
|
14397
14543
|
closeSectionMenu();
|
|
14398
|
-
startCreateSection();
|
|
14544
|
+
startCreateSection(sectionId);
|
|
14399
14545
|
}
|
|
14400
14546
|
});
|
|
14401
14547
|
if (!builtin) items.push({
|
|
@@ -14448,8 +14594,9 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
14448
14594
|
input.addEventListener("blur", () => finish(true));
|
|
14449
14595
|
}
|
|
14450
14596
|
/** 新建分区:在列表里插一行输入框,回车创建(宿主 web 里 window.prompt 被禁用,所以不用 prompt)。 */
|
|
14451
|
-
function startCreateSection(workspaceId) {
|
|
14452
|
-
|
|
14597
|
+
function startCreateSection(relativeToSectionId, workspaceId) {
|
|
14598
|
+
if (isSidebarCollapsed()) return;
|
|
14599
|
+
const host = list ?? findWorkspaceList(document);
|
|
14453
14600
|
if (host === void 0) return;
|
|
14454
14601
|
const row = document.createElement("div");
|
|
14455
14602
|
row.className = `${HEADER_CLASS} ${HEADER_CLASS}-editing`;
|
|
@@ -14458,19 +14605,20 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
14458
14605
|
input.placeholder = text("sections.newName", "新分区名称");
|
|
14459
14606
|
input.maxLength = 24;
|
|
14460
14607
|
row.appendChild(input);
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
else host.insertBefore(row, host.firstChild);
|
|
14608
|
+
positionCreatingRow(row, host, relativeToSectionId);
|
|
14609
|
+
activeCreatingRow = row;
|
|
14464
14610
|
input.focus();
|
|
14611
|
+
input.scrollIntoView?.({ block: "nearest" });
|
|
14465
14612
|
let done = false;
|
|
14466
14613
|
const finish = (commitValue) => {
|
|
14467
14614
|
if (done) return;
|
|
14468
14615
|
done = true;
|
|
14616
|
+
activeCreatingRow = null;
|
|
14469
14617
|
const value = input.value.trim();
|
|
14470
14618
|
row.remove();
|
|
14471
14619
|
if (!commitValue || value === "") return;
|
|
14472
14620
|
const id = `s${Date.now().toString(36)}`;
|
|
14473
|
-
const created = createSection(state, id, value);
|
|
14621
|
+
const created = createSection(state, id, value, relativeToSectionId);
|
|
14474
14622
|
if (workspaceId === void 0) commit(created);
|
|
14475
14623
|
else commitExplicit(assignWorkspace(created, workspaceId, id), [workspaceId]);
|
|
14476
14624
|
};
|
|
@@ -14720,7 +14868,7 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
14720
14868
|
* 图标全部取自宿主 primitives(RC 版本就有这些名字,别再自己画、也别依赖 sprite):
|
|
14721
14869
|
* `IconPinOutlineRegular` / `IconPinFillRegular` / `IconChecklistOutlineRegular` /
|
|
14722
14870
|
* `IconCheckOutlineRegular` / `IconPlusOutlineRegular` / `IconEditOutlineRegular` /
|
|
14723
|
-
* `IconCloseOutlineRegular` / `
|
|
14871
|
+
* `IconCloseOutlineRegular` / `IconChevronRightOutlineRegular`。
|
|
14724
14872
|
*/
|
|
14725
14873
|
const iconPin = () => hostIconMarkup("IconPinOutlineRegular");
|
|
14726
14874
|
const iconPinned = () => hostIconMarkup("IconPinFillRegular");
|
|
@@ -14732,8 +14880,12 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
14732
14880
|
const markup = hostIconMarkup("IconProjectAddOutlineRegular", 16);
|
|
14733
14881
|
return markup !== "" ? markup : FALLBACK_PROJECT_ADD_SVG;
|
|
14734
14882
|
};
|
|
14735
|
-
|
|
14736
|
-
|
|
14883
|
+
const FALLBACK_CHEVRON_SVG = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" fill=\"none\" stroke-width=\"1.2\"><path d=\"M6 12L9.29289 8.70711C9.68342 8.31658 9.68342 7.68342 9.29289 7.29289L6 4\" stroke=\"currentColor\"/></svg>";
|
|
14884
|
+
/** 分区展开箭头:对齐原生细线折叠 Chevron 原语(IconChevronRightOutlineRegular),展开时旋转 90°。 */
|
|
14885
|
+
const iconChevron = () => {
|
|
14886
|
+
const markup = hostIconMarkup("IconChevronRightOutlineRegular", 14);
|
|
14887
|
+
return markup !== "" ? markup : FALLBACK_CHEVRON_SVG;
|
|
14888
|
+
};
|
|
14737
14889
|
const iconEdit = () => hostIconMarkup("IconEditOutlineRegular");
|
|
14738
14890
|
const iconUp = () => hostIconMarkup("IconChevronUpOutlineRegular");
|
|
14739
14891
|
const iconDown = () => hostIconMarkup("IconChevronDownOutlineRegular");
|
|
@@ -14901,7 +15053,7 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
14901
15053
|
onSelect: () => {
|
|
14902
15054
|
closeSectionMenu();
|
|
14903
15055
|
closeMenusByEscape();
|
|
14904
|
-
startCreateSection(workspaceId);
|
|
15056
|
+
startCreateSection(void 0, workspaceId);
|
|
14905
15057
|
}
|
|
14906
15058
|
});
|
|
14907
15059
|
openHostPanel(anchor, items, parentMenu);
|
|
@@ -15006,9 +15158,11 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
15006
15158
|
const next = findWorkspaceList(document);
|
|
15007
15159
|
if (next === void 0) {
|
|
15008
15160
|
detachHeaders();
|
|
15161
|
+
removeHostCreateSectionButton();
|
|
15009
15162
|
return;
|
|
15010
15163
|
}
|
|
15011
15164
|
list = next;
|
|
15165
|
+
syncHostCreateSectionButton(next);
|
|
15012
15166
|
if (!wired) {
|
|
15013
15167
|
wired = true;
|
|
15014
15168
|
subscribeWorkspaces();
|
|
@@ -15154,6 +15308,10 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
15154
15308
|
}
|
|
15155
15309
|
let touched = false;
|
|
15156
15310
|
for (const mutation of mutations) {
|
|
15311
|
+
if (mutation.type === "attributes" && mutation.attributeName === "data-sidebar-collapsed") {
|
|
15312
|
+
touched = true;
|
|
15313
|
+
break;
|
|
15314
|
+
}
|
|
15157
15315
|
for (const node of Array.from(mutation.addedNodes)) {
|
|
15158
15316
|
if (node instanceof Element && node.closest(`.${HEADER_CLASS}`) !== null) continue;
|
|
15159
15317
|
touched = true;
|
|
@@ -15175,7 +15333,9 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
15175
15333
|
});
|
|
15176
15334
|
observer.observe(document.body, {
|
|
15177
15335
|
childList: true,
|
|
15178
|
-
subtree: true
|
|
15336
|
+
subtree: true,
|
|
15337
|
+
attributes: true,
|
|
15338
|
+
attributeFilter: ["data-sidebar-collapsed"]
|
|
15179
15339
|
});
|
|
15180
15340
|
}
|
|
15181
15341
|
function subscribeWorkspaces() {
|
|
@@ -15226,6 +15386,11 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
15226
15386
|
if (stickyRaf !== 0) window.cancelAnimationFrame(stickyRaf);
|
|
15227
15387
|
unsubscribeDirectoryFlow?.();
|
|
15228
15388
|
unsubscribe?.();
|
|
15389
|
+
if (activeCreatingRow !== null) {
|
|
15390
|
+
activeCreatingRow.remove();
|
|
15391
|
+
activeCreatingRow = null;
|
|
15392
|
+
}
|
|
15393
|
+
removeHostCreateSectionButton();
|
|
15229
15394
|
closeSectionMenu();
|
|
15230
15395
|
flushSectionsSave();
|
|
15231
15396
|
for (const header of headers.values()) header.remove();
|
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.7",
|
|
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": {
|