dsh-session-superagent 0.9.263 → 0.9.265
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 +71 -0
- package/README.md +3 -3
- package/client.js +192 -123
- package/docs/README.md +1 -0
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,77 @@
|
|
|
2
2
|
|
|
3
3
|
格式参照 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
4
4
|
|
|
5
|
+
## [0.9.265] - 2026-11-05 —— 确认统一走 Modal,判定日志改 DecisionLine
|
|
6
|
+
|
|
7
|
+
### ConfirmButton:一次触发,一次确认
|
|
8
|
+
|
|
9
|
+
主面板与卫星环共用同一动线:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
点「删除」→ Modal(说明 + 取消/确认)→ 确认后才发请求
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- 取消、Escape、背板关闭都不执行;
|
|
16
|
+
- `busyRef + busy` 双锁防重复;
|
|
17
|
+
- 成功才关闭,刷新失败不会把删除成功误报为失败;
|
|
18
|
+
- Modal 补 `description / footer / className`,`onClose` 放 ref,轮询重渲染不重置焦点 effect;
|
|
19
|
+
- 不再叠加原生确认框。
|
|
20
|
+
|
|
21
|
+
### 判定日志按官方 DecisionLine 渲染
|
|
22
|
+
|
|
23
|
+
每天独立 `Section + ul.dt-list`,每条记录是 `li.dt-row.dt-link.dt-ticket`:
|
|
24
|
+
状态、仓库、编号、原因和 `<time datetime>` 各归其位。
|
|
25
|
+
日期标题不再与事件混作同类 `li`;Trace 与运行时事件仍保持 `ol.dt-timeline`,不混用结构。
|
|
26
|
+
|
|
27
|
+
### 证据
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
test/ui-l84-records-confirm.test.mjs → 9/9
|
|
31
|
+
test/ui-l84-acceptance.test.mjs(主线独立验收)→ 2/2
|
|
32
|
+
npm test → 459/459
|
|
33
|
+
scripts/ui-audit.mjs → 11/11,100 分
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
真实浏览器的 Tab/Escape/焦点归还仍列入走查,不用测试桩冒充肉眼验收。
|
|
37
|
+
|
|
38
|
+
补充:`docs/ui-decomp/04-host-primitives-smoke.md` 实测 290 个宿主 exports、8/8 调用 smoke,
|
|
39
|
+
给下一批 Toast/Tooltip/Orbit 迁移划定边界;DecisionLine 的浅色文字对比度修正后为 15 组 ≤ 基线 16。
|
|
40
|
+
|
|
41
|
+
## [0.9.264] - 2026-11-05 —— UI 直接复用官方结构与素材,不再手画一套
|
|
42
|
+
|
|
43
|
+
### 官方 UI 解构与逐页差距
|
|
44
|
+
|
|
45
|
+
新增 `docs/ui-decomp/` 三份文档:
|
|
46
|
+
|
|
47
|
+
- `01-dsh-ui-tree.md`:DSH 宿主组件、token、主题、素材与挂载边界(449 行);
|
|
48
|
+
- `02-superagent-assets.md`:superagent 可直接复用的控件、CSS 与 TraceTimeline 映射(301 行);
|
|
49
|
+
- `03-gap-map.md`:主理鱼全部页面、二三级界面、弹层与空错态逐项差距(199 行)。
|
|
50
|
+
|
|
51
|
+
唯一素材基线是 `$DSH_HOME/dsh-ui-official/`,不重复拆 asar、不凭截图造结构。
|
|
52
|
+
|
|
53
|
+
### 直接复用官方 SVG 图元
|
|
54
|
+
|
|
55
|
+
搜索、加号、时钟、关闭、设置、左右/上下箭头改用官方 16×16 path:
|
|
56
|
+
保留独立 path 和正确 viewBox,不把两条图元合并成一条,也不拿 24×24 坐标系缩放。
|
|
57
|
+
主库没有的上箭头明确标 derived;刷新/暂停等保留原有 derived 图标。
|
|
58
|
+
|
|
59
|
+
### 时间线与确认动线
|
|
60
|
+
|
|
61
|
+
- Trace 每个时间戳一个 `li.dt-event`,正文使用官方 `dt-event-text`;
|
|
62
|
+
- 运行时事件从 `div.dt-rows` 改为 `ol.dt-timeline`;
|
|
63
|
+
- 删除只走 ConfirmBtn 二段确认,不再叠原生确认框;
|
|
64
|
+
- 设置按钮直达对应分区(凭证 / 诊断 / 更新),不再只切 Tab;
|
|
65
|
+
- 更新检查失败显示「检查失败」,不再误报「已是最新」;
|
|
66
|
+
- 诊断复制失败不再假报「已复制」。
|
|
67
|
+
|
|
68
|
+
### 证据
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
npm test → 448/448(新增:官方 SVG/坐标系、时间线结构、设置路由、更新错误态)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
剩余大项(WatcherForm、ConfirmButton+Modal、DecisionLine、弹层定位原语)登记 L84,未宣称全部完成。
|
|
75
|
+
|
|
5
76
|
## [0.9.263] - 2026-11-05 —— 官方 Thread 详情并入「判定」,不再只发 Toast
|
|
6
77
|
|
|
7
78
|
### `/trace` 同时返回结构化数据
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<img src="assets/icon-180.png" width="88" height="88" alt="">
|
|
4
4
|
|
|
5
5
|
[](LICENSE)
|
|
6
|
-
[](https://github.com/MYCF711/dsh-session-superagent/releases)
|
|
7
7
|
[](https://www.npmjs.com/package/dsh-session-superagent)
|
|
8
8
|
[](https://github.com/topics/dsh-plugin)
|
|
9
9
|
[](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)
|
|
@@ -146,7 +146,7 @@ Gitee 私有仓库要在「设置 → 凭证」填私人令牌;公开仓库不
|
|
|
146
146
|
## 开发
|
|
147
147
|
|
|
148
148
|
```sh
|
|
149
|
-
npm test #
|
|
149
|
+
npm test # 459 项单测(带离线开关;裸 node --test 会真去 spawn gh,两分半)
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
### 工具输出:文本给人和 agent,JSON 给程序
|
|
@@ -206,7 +206,7 @@ dsh plugin --profile <profile> add dsh-session-superagent@latest
|
|
|
206
206
|
|
|
207
207
|
|
|
208
208
|
```bash
|
|
209
|
-
npm test #
|
|
209
|
+
npm test # 459 项单测(带离线开关,约 1.6 秒)
|
|
210
210
|
node scripts/ui-audit.mjs # 11 项 UI 指标(写死颜色 / 自造 token / 官方结构采用 …)
|
|
211
211
|
node scripts/preflight.mjs # 41 项门禁(含上面两条,外加 profile 一致性、路由面、包内容)
|
|
212
212
|
node scripts/render-preview.mjs preview.html # 双主题静态预览,直接浏览器打开
|
package/client.js
CHANGED
|
@@ -14,7 +14,7 @@ window.__ModuleLoader__.load({
|
|
|
14
14
|
const { useCallback, useEffect, useRef, useState } = React
|
|
15
15
|
|
|
16
16
|
// 客户端版本探针:每次模块加载写一次,用来确认浏览器里跑的是哪一版
|
|
17
|
-
const CLIENT_VERSION = '0.9.
|
|
17
|
+
const CLIENT_VERSION = '0.9.265'
|
|
18
18
|
let BASE = '/session-superagent'
|
|
19
19
|
/**
|
|
20
20
|
* 挑「最新的那个服务端实例」。
|
|
@@ -117,7 +117,7 @@ window.__ModuleLoader__.load({
|
|
|
117
117
|
// 官方 GUI 的 376 条选择器 / 40KB 样式原样搬过来,类名统一 `dt-` 前缀,不污染宿主。
|
|
118
118
|
// 两个表单都有这个开关:文案只写一份,改的时候不会漏掉另一处
|
|
119
119
|
const ISOLATED_HINT = '隔离执行(每次唤醒开一个临时副本;在副本里改,用完自动回收)'
|
|
120
|
-
const PORTED_CSS = "/* Panel layout and local UI controls styled with DSH `--dsw-alias-*` design tokens; one rule per line. */\n.dt-page { box-sizing: border-box; height: 100%; overflow: auto; scrollbar-gutter: stable; scroll-padding: 48px 0 72px; container-type: inline-size; padding: 28px clamp(24px, 4vw, 48px) 0; color: var(--dsw-alias-label-primary); }\n/* Deployment page rendered inside DSH Plugin Manager, which owns scrolling and padding. */\n.dt-embedded { container-type: inline-size; color: var(--dsw-alias-label-primary); }\n/* Disable sticky positioning inside DSH Plugin Manager, where the host container owns scrolling and bottom padding. */\n.dt-embedded .dt-savebar { position: static; }\n.dt-page > * + * { margin-top: 16px; }\n.dt-page > .dt-column { max-width: 960px; margin: 0 auto; padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }\n.dt-head { position: relative; z-index: 3; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }\n.dt-search { position: relative; width: 240px; max-width: 100%; }\n.dt-search-results { position: absolute; top: calc(100% + 6px); right: 0; width: min(560px, 90cqw); max-height: 60vh; overflow: auto; padding: 8px 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 12px; background: var(--dsw-alias-bg-layer-2); box-shadow: var(--dsw-elevation-prominent); z-index: 5; display: flex; flex-direction: column; gap: 8px; }\n.dt-mark { background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 25%, transparent); color: inherit; border-radius: 2px; }\n[data-platform='darwin'] .dt-page .dt-head { padding-top: var(--dsh-frame-top-clearance, 0px); }\n.dt-title { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--dsw-alias-label-secondary); }\n.dt-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }\n.dt-page .dt-tabs { overflow-x: auto; display: flex; gap: 20px; max-width: none; padding: 0; border-radius: 0; background: none; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-segmented { width: 100%; max-width: 420px; box-sizing: border-box; display: inline-grid; gap: 2px; padding: 3px; border-radius: 9px; background: var(--dsw-alias-interactive-bg-hover); }\n.dt-form.dt-block { padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 16px; gap: 16px; }\n.dt-block-title { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }\n.dt-section { display: flex; flex-direction: column; gap: 8px; min-width: 0; }\n.dt-section-title { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; line-height: 22px; font-weight: 600; color: var(--dsw-alias-label-primary); }\n.dt-section-name { white-space: nowrap; }\n.dt-count { font-size: 14px; color: var(--dsw-alias-label-caption); font-variant-numeric: tabular-nums; font-weight: 400; } .dt-section-sub { font-size: 12px; line-height: 18px; font-weight: 400; color: var(--dsw-alias-label-caption); }\n.dt-hint { margin: 0; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-tertiary); }\n.dt-error { margin: 0; font-size: 13px; line-height: 20px; color: var(--dsw-alias-state-error-primary); }\n.dt-banner { margin: 0; padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 20px; background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 10%, transparent); overflow-wrap: anywhere; }\n.dt-banner.dt-danger { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent); color: var(--dsw-alias-state-error-primary); }\n.dt-list { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; gap: 2px; }\n.dt-row { position: relative; min-width: 0; border-radius: 12px; padding: 10px 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: flex-start; }\n.dt-row.dt-link:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-row-main { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }\n.dt-disclosure-body .dt-row-main { flex-basis: 0; }\n.dt-row-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; line-height: 20px; font-weight: 500; }\n.dt-open { max-width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; line-height: 20px; font-weight: 500; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-open::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }\n.dt-open:focus-visible { outline: none; }\n.dt-open-wrap { white-space: normal; }\n.dt-open:focus-visible::after { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-caption); overflow-wrap: anywhere; }\n.dt-row-quote { font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }\n/* Transparent block borders preserve vertical spacing when line clamping clips padding. */\n.dt-banner:is(.dt-clamp, .dt-clamp-8) { padding-block: 0; border-block: 8px solid transparent; }\n.dt-banner-label { font-weight: 500; }\n.dt-banner .dt-md { display: inline; }\n.dt-banner .dt-md > p:first-child { display: inline; }\n.dt-row-buttons { position: relative; z-index: 1; gap: 8px; margin-top: 4px; }\n.dt-row-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; font-size: 13px; line-height: 20px; }\n.dt-dot { flex: none; margin-top: 5px; }\n.dt-inline-link { position: relative; z-index: 1; color: var(--dsw-alias-link); text-decoration: none; }\n.dt-inline-link:hover { text-decoration: underline; }\n.dt-textlink { padding: 0; border: 0; background: none; font: inherit; color: var(--dsw-alias-link); cursor: pointer; text-align: left; }\n.dt-textlink:hover { text-decoration: underline; }\n.dt-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; line-height: 20px; }\n.dt-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 13px; line-height: 20px; }\n.dt-kv dt { color: var(--dsw-alias-label-tertiary); }\n.dt-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }\n@container (max-width: 640px) { .dt-kv dt { margin-top: 4px; } .dt-kv dt:first-of-type { margin-top: 0; } }\n.dt-timeline-day { position: sticky; top: 0; z-index: 1; padding: 6px 0 2px; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-caption); font-weight: 500; list-style: none; background: var(--dsw-alias-bg-base); }\n.dt-event-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }\n.dt-event-head .dt-event-time { margin-left: auto; flex: none; font-size: 12px; color: var(--dsw-alias-label-caption); font-variant-numeric: tabular-nums; }\n.dt-event-nums { color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }\n.dt-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }\n.dt-event { padding: 12px 0; border-bottom: 0.5px solid var(--dsw-alias-border-l2); display: flex; flex-direction: column; gap: 6px; min-width: 0; }\n.dt-event:last-child { border-bottom: 0; }\n.dt-event.dt-highlight { background: var(--dsw-alias-interactive-bg-hover); border-radius: 8px; padding-inline: 8px; margin-inline: -8px; }\n.dt-event-text { margin: 0; font-size: 13px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }\n.dt-event-actor { font-weight: 500; color: var(--dsw-alias-label-secondary); }\n.dt-event-quiet .dt-event-text { color: var(--dsw-alias-label-tertiary); }\n.dt-flow { margin: 0; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); }\n.dt-clamp-8 { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }\n.dt-more { align-self: flex-start; font-size: 12px; }\n.dt-reveal { opacity: 0; }\n.dt-event:hover .dt-reveal, .dt-reveal:focus-visible { opacity: 1; }\n@media (hover: none) {\n .dt-reveal { opacity: 1; }\n}\n.dt-event-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-tertiary); }\n.dt-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }\n.dt-filters .dt-search { margin-left: auto; }\n.dt-form { display: flex; flex-direction: column; gap: 24px; }\n.dt-fieldset { display: flex; flex-direction: column; gap: inherit; min-width: 0; margin: 0; padding: 0; border: 0; }\n.dt-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 20px; min-width: 0; }\n.dt-field small { color: var(--dsw-alias-label-caption); font-size: 12px; }\n.dt-textarea { box-sizing: border-box; width: 100%; min-width: 0; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-1, transparent); resize: vertical; }\n.dt-select { box-sizing: border-box; width: 100%; min-width: 0; height: 32px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: 8px; padding: 0 28px 0 8px; text-overflow: ellipsis; font: inherit; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-1, transparent); }\n.dt-textarea:focus-visible, .dt-select:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-mono { font-family: var(--ds-font-family-code, Menlo, monospace); font-size: 12px; overflow-wrap: anywhere; }\n.dt-detail { margin-top: 2px; color: var(--dsw-alias-label-secondary); }\n.dt-savebar .dt-error { white-space: pre-line; }\n.dt-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; font-size: 13px; }\n.dt-subhead-actions { display: inline-flex; align-items: center; gap: 4px; }\n.dt-btn-busy .dt-btn-icon svg { animation: dt-spin 1s linear infinite; }\n.dt-subhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); }\n.dt-rules, .dt-changes { list-style: none; margin: 0; padding: 0; }\n.dt-field-head { display: inline-flex; align-items: center; gap: 4px; color: var(--dsw-alias-label-secondary); }\n.dt-info { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; padding: 0; border: 0; background: none; color: var(--dsw-alias-label-caption); cursor: help; }\n.dt-info:hover, .dt-info:focus-visible { color: var(--dsw-alias-label-secondary); }\n.dt-info:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; border-radius: 50%; }\n.dt-tooltip { position: fixed; z-index: 1100; width: max-content; max-width: min(320px, calc(100vw - 24px)); padding: 3px 7px; border-radius: 8px; background: var(--dsw-alias-tooltip-bg); color: var(--dsw-static-neutral-bluish-00); font-size: 13px; line-height: 20px; overflow-wrap: break-word; pointer-events: none; animation: dt-tooltip-in 150ms ease-in-out; }\n@keyframes dt-tooltip-in { from { opacity: 0; } }\n.dt-rules { border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-rule { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; border-bottom: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-rule > :first-child { flex: 1; min-width: 0; }\n.dt-rule-preview { flex: 1; min-width: 0; margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--dsw-alias-label-caption); }\n.dt-rule-switch { margin-top: 2px; flex: none; }\n.dt-rule-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dsw-alias-label-caption); }\n.dt-rule-dot[data-enabled] { background: var(--dsw-alias-brand-primary); }\n.dt-rule-body { display: flex; flex-direction: column; gap: 12px; padding: 8px 0 8px 28px; }\n.dt-model { display: flex; flex-direction: column; gap: 6px; }\n.dt-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }\n.dt-changes { display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 20px; }\n.dt-changes li::before { content: '· '; color: var(--dsw-alias-label-caption); }\n.dt-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }\n.dt-modal.dt-glossary-modal { width: min(680px, 100%); }\n.dt-nav-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; text-align: left; cursor: pointer; }\n.dt-nav-item:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-nav-item[aria-current='true'] { background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-primary); font-weight: 500; }\n.dt-nav-item:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: -2px; }\n.dt-changed-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dsw-alias-brand-primary); flex: none; }\n.dt-add-skill { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-prompt-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }\n.dt-editor { min-height: 360px; }\n.dt-inline-select { width: auto; }\n.dt-preview-part { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 2px 12px; border-left: 2px solid var(--dsw-alias-border-l3); }\n.dt-preview-head { font-size: 13px; line-height: 20px; display: flex; align-items: baseline; gap: 8px; }\ndiv.dt-preview-head { color: var(--dsw-alias-label-secondary); }\n.dt-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 16px; min-width: 0; }\n.dt-card-head { display: flex; align-items: center; gap: 12px; min-height: 28px; }\n.dt-card-head .dt-row-main { flex: 1 1 0; min-width: 64px; }\n.dt-card-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-row-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }\n.dt-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }\n.dt-rows-item { display: grid; grid-template-columns: repeat(var(--dt-columns), minmax(0, 1fr)) auto; gap: 8px; align-items: center; }\n.dt-filter-gap { flex: 1; }\n.dt-page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; width: 100%; }\n.dt-page-head > div:first-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }\n.dt-page-head .dt-toolbar { flex: 0 1 auto; margin-left: auto; }\n.dt-page-head > .dt-btn { margin-left: -10px; }\n.dt-page-title { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; width: 100%; }\n.dt-page-title h2 { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 20px; line-height: 28px; font-weight: 500; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\n.dt-status-line { margin-top: -16px; }\n.dt-plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 20px; }\n.dt-plain-list > li { position: relative; padding-left: 12px; }\n.dt-plain-list > li::before { content: ''; position: absolute; left: 0; top: 5px; bottom: 5px; width: 2px; border-radius: 1px; background: currentColor; opacity: 0.45; }\n.dt-details { display: flex; flex-direction: column; gap: 2px; border-top: 0.5px solid var(--dsw-alias-border-l2); padding-top: 8px; }\n.dt-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-danger-zone .dt-btn { color: var(--dsw-alias-state-error-primary); }\n.dt-md { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }\n.dt-md p, .dt-md ul, .dt-md ol { margin: 0; }\n.dt-md ul, .dt-md ol { padding-left: 20px; display: flex; flex-direction: column; gap: 2px; }\n.dt-md-heading { font-weight: 500; }\n.dt-code { font-family: var(--ds-font-family-code, Menlo, monospace); font-size: 12px; padding: 0 4px; border-radius: 4px; background: var(--dsw-alias-bg-module-platform); }\n.dt-dot-wrap { display: inline-flex; flex: none; }\n.dt-search-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }\n.dt-ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }\n.dt-legend-title { margin: 16px 0 6px; font-size: 13px; color: var(--dsw-alias-label-tertiary); }\n.dt-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }\n.dt-legend li { display: flex; align-items: center; gap: 6px; }\n.dt-legend .dt-dot { margin-top: 0; }\n.dt-savebar { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 0; background: var(--dsw-alias-bg-base, var(--dsw-alias-bg-layer-1)); border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-savebar .dt-hint { margin-right: auto; }\n.dt-card > .dt-savebar, .dt-block > .dt-savebar { margin: 0 -16px -16px; padding: 12px 16px; border-radius: 0 0 16px 16px; }\n.dt-glossary { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 20px; }\n.dt-glossary th, .dt-glossary td { text-align: left; padding: 6px 8px; border-bottom: 0.5px solid var(--dsw-alias-border-l2); vertical-align: top; }\n.dt-glossary th { color: var(--dsw-alias-label-tertiary); font-weight: 400; }\n.dt-glossary th.dt-glossary-group { color: var(--dsw-alias-label-secondary); font-weight: 600; padding-top: 14px; }\n.dt-glossary th:nth-child(-n+2), .dt-glossary td:nth-child(-n+2) { white-space: nowrap; }\n.dt-values { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0 0; font-size: 13px; }\n.dt-values dt { color: var(--dsw-alias-label-tertiary); }\n.dt-values dd { margin: 0; }\n.dt-pre { margin: 0; padding: 12px; border-radius: 10px; background: var(--dsw-alias-bg-module-platform); font-family: var(--ds-font-family-code, Menlo, monospace); font-size: 12px; line-height: 18px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 480px; overflow: auto; }\n.dt-pre ins { background: color-mix(in srgb, var(--dsw-alias-state-success-primary, green) 18%, transparent); text-decoration: none; }\n.dt-pre del { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 18%, transparent); text-decoration: none; }\n.dt-prompt { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }\n.dt-prompt-nav { display: flex; flex-direction: column; gap: 2px; }\n.dt-prompt-nav button { justify-content: flex-start; }\n.dt-disclosure-body { padding: 8px 0 8px 28px; display: flex; flex-direction: column; gap: 8px; }\n@container (max-width: 640px) {\n .dt-tab { padding: 0 8px; font-size: 13px; }\n .dt-segment { padding: 0 10px; }\n .dt-head { align-items: center; }\n .dt-search-results { right: auto; left: 0; width: 100%; }\n .dt-page-title h2 { font-size: 17px; line-height: 24px; }\n .dt-status-line { margin-top: -12px; }\n .dt-page .dt-tabs { display: flex; flex-wrap: nowrap; scrollbar-width: thin; }\n .dt-page .dt-tab { flex: none; }\n .dt-page .dt-tabs[data-more='end'] { mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }\n .dt-page .dt-tabs[data-more='start'] { mask-image: linear-gradient(to right, transparent, #000 40px); }\n .dt-page .dt-tabs[data-more='both'] { mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }\n .dt-kv { grid-template-columns: 1fr; gap: 6px; }\n .dt-grid3, .dt-prompt { grid-template-columns: 1fr; }\n .dt-search { width: 100%; }\n .dt-filters .dt-search { margin-left: 0; }\n}\n/* Local UI primitive styles (see controls.tsx). */\n.dt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: none; border-radius: 18px; cursor: pointer; font: inherit; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); background: transparent; padding: 0 14px; white-space: nowrap; }\n.dt-btn:disabled { cursor: not-allowed; opacity: 0.4; }\n.dt-btn:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-btn-md { height: 36px; }\n.dt-btn-sm { height: 28px; font-size: 12px; line-height: 18px; padding: 0 10px; border-radius: 14px; }\n/* 主按钮:深色下 label-primary-foreground(深色)压绿底只有 4.09 —— 深色主题里前景该是浅的。 */\n/* 往白色混 70%:浅色下仍是浅字(4.5+),深色下变浅(>4.5),两边都过。 */\n.dt-btn-primary { background: var(--dsw-alias-button-primary-fill); color: color-mix(in srgb, var(--dsw-alias-label-primary-foreground) 30%, #ffffff); }\n.dt-btn-primary:hover:not(:disabled) { background: var(--dsw-alias-button-primary-hover); }\n.dt-btn-ghost { background: transparent; border: 0.5px solid var(--dsw-alias-border-l3); color: var(--dsw-alias-label-secondary); }\n.dt-btn-ghost:hover:not(:disabled), .dt-btn-outline:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-btn-ghost:active:not(:disabled) { background: var(--dsw-alias-interactive-bg-active); }\n.dt-btn-outline { border: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-btn-icon { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; }\n.dt-tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 1px 8px; font-size: 11px; line-height: 17px; font-weight: 500; white-space: nowrap; }\n.dt-tag[data-tone='outline'] { border: 0.5px solid var(--dsw-alias-border-l4); color: var(--dsw-alias-label-tertiary); }\n.dt-tag[data-tone='neutral'] { background: var(--dsw-alias-bg-module-platform); color: var(--dsw-alias-label-secondary); }\n.dt-tag[data-tone='quiet'] { color: var(--dsw-alias-label-tertiary); }\n.dt-tag[data-tone='success'] { background: color-mix(in srgb, var(--dsw-alias-state-success-primary) 10%, transparent); color: color-mix(in srgb, var(--dsw-alias-state-success-primary) 72%, var(--dsw-alias-label-primary)); }\n.dt-tag[data-tone='info'] { background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 10%, transparent); color: var(--dsw-alias-state-business-primary); }\n/* 胶囊是「暂停/退避/判断」唯一的状态色:文字与 12% 同色底叠起来,浅色下警告只有 4.17。 */\n/* 往 label-primary 混 28%:浅色变深、深色变浅,两档都留出余量。 */\n.dt-tag[data-tone='warning'] { background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 12%, transparent); color: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 72%, var(--dsw-alias-label-primary)); }\n.dt-tag[data-tone='danger'] { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent); color: color-mix(in srgb, var(--dsw-alias-state-error-primary) 76%, var(--dsw-alias-label-primary)); }\n.dt-pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border: none; border-radius: 12px; font: inherit; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); background: var(--dsw-alias-bg-layer-2); cursor: pointer; }\n.dt-pill:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-pill-active, .dt-pill-active:hover { color: var(--dsw-alias-label-primary); background: var(--dsw-alias-button-ghost-active-fill); box-shadow: inset 0 0 0 1px var(--dsw-alias-button-ghost-active-border); }\n.dt-tabs { display: grid; padding: 4px; border-radius: 12px; background: var(--dsw-alias-bg-module-platform); }\n.dt-tab { box-sizing: border-box; height: 34px; padding: 0 12px; border: 0.5px solid transparent; border-radius: 8px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 14px; line-height: 20px; white-space: nowrap; cursor: pointer; transition: color 180ms ease, background 180ms ease; }\n.dt-tab:hover { color: var(--dsw-alias-label-primary); }\n.dt-tab[aria-selected='true'] { color: var(--dsw-alias-label-primary); font-weight: 600; background: var(--dsw-alias-bg-layer-3); border-color: var(--dsw-alias-border-l3); }\n.dt-tab:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 4px; }\n.dt-segment { height: 28px; padding: 0 16px; border: 0; border-radius: 7px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color 120ms ease, background 160ms ease; }\n.dt-segment:hover:not(:disabled), .dt-segment[aria-selected='true'] { color: var(--dsw-alias-label-primary); }\n.dt-segment[aria-selected='true'] { background: var(--dsw-alias-bg-layer-1); box-shadow: var(--dsw-elevation-soft); }\n.dt-segment:disabled { cursor: default; opacity: 0.4; }\n.dt-segment:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: -2px; }\n.dt-input { box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; height: 32px; min-width: 0; padding: 0 8px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: 8px; background: var(--dsw-alias-bg-layer-1); }\n.dt-input:focus-within { border-color: var(--dsw-alias-brand-primary); }\n.dt-input-icon { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; color: var(--dsw-alias-label-tertiary); }\n.dt-input input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); }\n.dt-input input/* 占位符:label-dimmed 在浅色下只有 2.17(深色 3.81),必须能读出来才叫占位符。 */\n/* 往 label-tertiary 混 60%:浅色变深、深色变浅,两档都过 4.5。 */\n::placeholder { color: color-mix(in srgb, var(--dsw-alias-label-dimmed) 40%, var(--dsw-alias-label-tertiary)); }\n.dt-input input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }\n.dt-field .dt-input, .dt-search .dt-input, .dt-add-skill .dt-input { display: flex; width: 100%; }\n.dt-switch { box-sizing: border-box; flex: 0 0 auto; width: 36px; height: 20px; padding: 2px; border: 0; border-radius: 10px; background: var(--dsw-alias-border-l3); cursor: pointer; }\n.dt-switch[aria-checked='true'] { background: var(--dsw-alias-brand-primary); }\n.dt-switch:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-switch-thumb { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--dsw-alias-label-primary-foreground); transition: transform 120ms ease; }\n.dt-switch[aria-checked='true'] .dt-switch-thumb { transform: translateX(16px); }\n.dt-state-dot { position: relative; display: inline-block; flex: none; width: 10px; height: 10px; color: var(--dsw-alias-state-idle-primary); }\n.dt-state-dot::after { content: ''; position: absolute; inset: 20%; border-radius: 50%; background: currentColor; }\n.dt-state-dot[data-state='done'] { color: var(--dsw-alias-state-success-primary); }\n.dt-state-dot[data-state='warning'] { color: var(--dsw-alias-state-warn-primary); }\n.dt-state-dot[data-state='error'] { color: var(--dsw-alias-state-error-primary); }\n.dt-spinner { flex: none; color: var(--dsw-alias-label-tertiary); }\n.dt-spinner g { transform-origin: center; animation: dt-spin 1.5s linear infinite; }\n.dt-spinner circle { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }\n.dt-spinner circle:first-child { opacity: 0.25; }\n.dt-spinner circle:last-child { stroke-dasharray: 18 150; }\n@keyframes dt-spin { to { transform: rotate(360deg); } }\n.dt-disclosure-row { display: flex; align-items: center; gap: 4px; min-height: 28px; min-width: 0; border-radius: 8px; cursor: pointer; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); }\n.dt-disclosure-row:hover { color: var(--dsw-alias-label-primary); }\n.dt-disclosure-row:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-disclosure-lead { position: relative; display: inline-flex; flex: none; width: 24px; height: 24px; align-items: center; justify-content: center; }\n.dt-disclosure-icon { display: inline-flex; align-items: center; justify-content: center; }\n.dt-disclosure-chevron { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }\n.dt-disclosure-row:hover .dt-disclosure-icon, .dt-disclosure[data-open] .dt-disclosure-icon { visibility: hidden; }\n.dt-disclosure-row:hover .dt-disclosure-chevron, .dt-disclosure[data-open] .dt-disclosure-chevron { display: inline-flex; }\n.dt-disclosure-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-modal-root { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: max(24px, var(--dsh-frame-top-clearance, 24px)) 24px; }\n.dt-modal-mask { position: absolute; inset: 0; background: var(--dsw-alias-bg-mask-1); backdrop-filter: var(--dsw-mask-blur); }\n.dt-modal { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 20px; width: min(380px, 100%); max-height: 100%; padding: 0 0 24px; overflow: hidden; border-radius: 24px; background: var(--dsw-alias-bg-layer-2); box-shadow: var(--dsw-elevation-prominent); color: var(--dsw-alias-label-primary); outline: none; }\n.dt-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 22px 14px 0 24px; }\n.dt-modal-header h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }\n.dt-modal-close { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: none; border-radius: 8px; background: transparent; cursor: pointer; color: var(--dsw-alias-label-secondary); }\n.dt-modal-close:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-modal-description { margin: -8px 0 0; padding: 0 24px; font-size: 14px; line-height: 22px; }\n.dt-modal-body { min-width: 0; min-height: 0; overflow: auto; padding: 0 24px; }\n.dt-modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 24px; }\n.dt-toast { position: fixed; top: 40px; left: 50%; z-index: 1100; pointer-events: none; width: max-content; max-width: min(640px, calc(100vw - 48px)); padding: 12px 16px; border-radius: 14px; background: var(--dsw-alias-toast-bg); color: var(--dsw-static-neutral-bluish-00); font-size: 14px; line-height: 22px; box-shadow: var(--dsw-shadow-lv3); transform: translateX(-50%); animation: dt-toast-in 160ms ease-out, dt-toast-fade 1000ms ease var(--dt-toast-hold, 3000ms) forwards; }\n@keyframes dt-toast-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }\n@keyframes dt-toast-fade { to { opacity: 0; visibility: hidden; } }\n@media (prefers-reduced-motion: reduce) {\n .dt-tab, .dt-segment, .dt-switch-thumb, .dt-spinner g, .dt-btn-busy .dt-btn-icon svg, .dt-tooltip { transition: none; animation: none; }\n .dt-toast { animation: dt-toast-fade 1000ms ease var(--dt-toast-hold, 3000ms) forwards; }\n}\n.dt-page .dt-tab { height: 34px; padding: 0 2px; border: 0; border-radius: 0; color: var(--dsw-alias-label-tertiary); font-size: 14px; }\n.dt-page .dt-tab[aria-selected='true'] { background: none; color: var(--dsw-alias-label-primary); font-weight: 500; box-shadow: inset 0 -1.5px 0 var(--dsw-alias-label-primary); }\n.dt-status-head { display: flex; align-items: center; gap: 8px; }\n.dt-status-title { margin: 0; flex: 1; display: flex; align-items: center; gap: 4px; font-size: 15px; line-height: 22px; font-weight: 600; }\n.dt-status-text { margin-left: auto; flex: none; font-size: 12px; font-weight: 400; color: var(--dsw-alias-label-secondary); }\n.dt-status-line .dt-status-text { margin-left: 0; }\n.dt-status-text[data-state='warning'] { color: var(--dsw-alias-state-warn-primary); }\n.dt-status-text[data-state='error'] { color: var(--dsw-alias-state-error-primary); }\n.dt-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }\n.dt-lv { white-space: nowrap; }\n.dt-lv-label { color: var(--dsw-alias-label-caption); }\n.dt-lv-value { color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }\n.dt-chip { display: inline-flex; flex-wrap: wrap; max-width: 100%; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 6px; overflow: hidden; font-size: 11px; line-height: 18px; color: var(--dsw-alias-label-secondary); }\n.dt-chip-source { padding: 0 6px; color: var(--dsw-alias-label-tertiary); background: var(--dsw-alias-bg-module-platform); }\n.dt-chip-fact { padding: 0 6px; border-left: 0.5px solid var(--dsw-alias-border-l3); white-space: nowrap; }\n.dt-chip-label { margin-right: 4px; color: var(--dsw-alias-label-caption); }\n.dt-chip-link { position: relative; z-index: 1; text-decoration: none; cursor: pointer; transition: border-color 120ms ease; }\n.dt-chip-link:hover { border-color: var(--dsw-alias-brand-primary); }\n.dt-chip-link:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-chip-open { display: inline-flex; align-items: center; padding: 0 5px; border-left: 0.5px solid var(--dsw-alias-border-l3); color: var(--dsw-alias-brand-primary); }\n.dt-chip-problem, .dt-chip-problem .dt-chip-label { color: var(--dsw-alias-state-error-primary); }\n.dt-cards { gap: 8px; }\n.dt-att .dt-inline-link { font-size: 13px; font-weight: 500; }\n.dt-list > .dt-att { margin: 2px 8px; }\n.dt-att { padding: 10px 12px 10px 16px; border: 0; border-radius: 0; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-att::before { content: ''; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; border-radius: 1px; background: var(--dsw-alias-state-warn-primary); opacity: 0.7; }\n.dt-att-error::before { background: var(--dsw-alias-state-error-primary); }\n.dt-att-what { font-size: 12px; line-height: 18px; font-weight: 500; color: var(--dsw-alias-state-warn-primary); }\n.dt-att-error .dt-att-what, .dt-att-error .dt-att-what .dt-open { color: var(--dsw-alias-state-error-primary); }\n.dt-stats { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 10px 14px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 12px; background: var(--dsw-alias-bg-module-platform); }\n.dt-stat { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--dsw-alias-label-caption); }\n/* 可点的统计数字:去掉原生按钮外观,保留文字排版;选中时用浅底提示 */\n.dt-stat-btn { border: 0; background: none; padding: 2px 6px; margin: -2px -6px; border-radius: 8px; font: inherit; color: inherit; cursor: pointer; }\n.dt-stat-btn:hover { background: var(--dsw-alias-interactive-bg-hover); }\n/* 浅色下 interactive-bg-hover 与白底只差 1.03:点了统计数字在按筛选,零视觉反馈。 */\n/* 换成品牌色 12% 底 + 0.5px 品牌色描边(两个主题都分得开)。 */\n.dt-stat-btn[aria-pressed='true'] { background: color-mix(in srgb, var(--dsw-alias-brand-primary) 12%, transparent); box-shadow: inset 0 0 0 0.5px var(--dsw-alias-brand-primary); }\n.dt-stat-btn:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n/* 统计条单位:按钮上的 color:inherit 会把单位染成数字色,所以单位单独一档。 */\n/* 浅色下 caption(#818b98)在白底只有 3.14–3.45,深色下同一档 4.34–5.07。 */\n/* 往 label-primary 混 30%:浅色变深、深色变浅,两个主题的对比度同时变好(不用新 token)。 */\n/* 注意选择器**不带** .dt-stat-btn 前缀 —— 带前缀就只作用于可点的格子,不可点的仍是旧色(真机踩过)。 */\n.dt-stat-unit { color: color-mix(in srgb, var(--dsw-alias-label-caption) 70%, var(--dsw-alias-label-primary)); }\n/* 选中的统计格:品牌色 12% 底会把单位压到 4.20,再往主色多混 10% 拉回来。 */\n.dt-stat-btn[aria-pressed='true'] .dt-stat-unit { color: color-mix(in srgb, var(--dsw-alias-label-caption) 58%, var(--dsw-alias-label-primary)); }\n.dt-stat-value { font-size: 14px; font-weight: 500; color: var(--dsw-alias-label-primary); font-variant-numeric: tabular-nums; }\n.dt-more-link { font-size: 12px; font-weight: 400; }\n.dt-settings { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; align-items: start; }\n.dt-settings-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }\n.dt-settings-link { padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; text-align: left; cursor: pointer; }\n.dt-settings-link:hover { color: var(--dsw-alias-label-primary); }\n.dt-settings-link[aria-current='page'] { background: var(--dsw-alias-bg-module-platform); color: var(--dsw-alias-label-primary); font-weight: 500; }\n.dt-settings-link[data-stage] + .dt-settings-link:not([data-stage]) { margin-top: 10px; }\n.dt-settings-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 16px; background: var(--dsw-alias-bg-layer-1); }\n.dt-settings-title { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; }\n.dt-settings-body .dt-section-title { font-size: 15px; line-height: 22px; }\n.dt-subtabs { display: flex; gap: 16px; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-subtab { padding: 0 0 6px; border: 0; background: none; color: var(--dsw-alias-label-tertiary); font: inherit; font-size: 13px; cursor: pointer; }\n.dt-subtab[aria-selected='true'] { color: var(--dsw-alias-label-primary); font-weight: 500; box-shadow: inset 0 -1.5px 0 var(--dsw-alias-label-primary); }\n.dt-part { display: flex; flex-direction: column; gap: 12px; }\n.dt-rows-summary { text-align: left; color: var(--dsw-alias-label-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }\n.dt-table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 18px; }\n.dt-table th { text-align: left; font-weight: 400; color: var(--dsw-alias-label-caption); padding: 2px 8px 2px 0; }\n.dt-table td { padding: 4px 8px 4px 0; border-top: 0.5px solid var(--dsw-alias-border-l3); vertical-align: top; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }\n@container (max-width: 640px) {\n .dt-settings { grid-template-columns: 1fr; gap: 12px; }\n .dt-settings-nav { position: static; flex-direction: row; flex-wrap: wrap; }\n .dt-settings-link[data-stage] + .dt-settings-link:not([data-stage]) { margin-top: 0; }\n .dt-page .dt-tabs { gap: 14px; }\n}\n.dt-list > .dt-ticket { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 12px; align-items: start; margin: 0; padding: 12px 8px 12px 18px; border-radius: 0; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-list > .dt-ticket[data-state]::before { content: ''; position: absolute; left: 6px; top: 12px; bottom: 12px; width: 2px; border-radius: 1px; background: var(--dsw-alias-state-warn-primary); opacity: 0.7; }\n.dt-list > .dt-ticket[data-state='error']::before { background: var(--dsw-alias-state-error-primary); }\n.dt-ticket-stage { align-self: stretch; padding-top: 1px; border-right: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-ticket-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }\n.dt-ticket-body .dt-row-title .dt-open { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-ticket-meta { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }\n.dt-ticket-meta .dt-chip { flex: none; }\n.dt-ticket-meta .dt-ticket-actions { margin-top: 0; margin-left: auto; min-height: 0; flex-wrap: nowrap; }\n@container (max-width: 640px) { .dt-ticket-meta { flex-wrap: wrap; white-space: normal; } .dt-ticket-meta .dt-ticket-actions { flex-wrap: wrap; } }\n.dt-ticket-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--dsw-alias-label-primary); }\n.dt-ticket-note-error { color: var(--dsw-alias-state-error-primary); }\n.dt-ticket-note-pause { font-weight: 500; color: var(--dsw-alias-state-warn-primary); }\n.dt-ticket-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; min-height: 30px; margin-top: 2px; }\n/* Pass pointer events through action containers to the row link, keeping only child controls interactive. */\n.dt-ticket-actions, .dt-row-buttons, .dt-row-actions { pointer-events: none; }\n.dt-ticket-actions > *, .dt-row-buttons > *, .dt-row-actions > * { pointer-events: auto; }\n.dt-line { min-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.dt-row-meta.dt-line { flex-wrap: nowrap; }\n.dt-line-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-error-text { color: var(--dsw-alias-state-error-primary); }\n.dt-stage { display: inline-flex; align-items: flex-start; gap: 5px; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--dsw-alias-label-secondary); }\n.dt-stage svg { flex: none; margin-top: 2px; }\n.dt-stage[data-state='warning'] { color: var(--dsw-alias-state-warn-primary); }\n.dt-stage[data-state='error'] { color: var(--dsw-alias-state-error-primary); }\n.dt-stage[data-state='ongoing'] { color: var(--dsw-alias-state-business-primary); }\n.dt-icon-link { display: inline-flex; align-items: center; gap: 4px; }\na.dt-btn, a.dt-btn:hover { text-decoration: none; }\n.dt-section-icon { display: inline-flex; align-self: center; color: var(--dsw-alias-label-tertiary); }\n.dt-trigger-link { display: flex; flex-direction: column; gap: 2px; width: 100%; margin: -4px 0 -4px -8px; padding: 4px 8px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }\n.dt-trigger-link:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-trigger-link:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-trigger-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }\n.dt-kv-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }\n.dt-banner-actions { margin-top: 6px; }\n@container (max-width: 640px) {\n .dt-list > .dt-ticket { grid-template-columns: 1fr; row-gap: 4px; }\n .dt-ticket-stage { border-right: 0; }\n}\n.dt-nav-group { margin: 10px 10px 2px; font-size: 12px; font-weight: 600; color: var(--dsw-alias-label-secondary); }\n.dt-nav-group:first-child { margin-top: 0; }\n.dt-prompt-nav .dt-nav-item { flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }\n.dt-nav-item > span { display: inline-flex; align-items: center; gap: 6px; }\n.dt-nav-item small { font-size: 12px; line-height: 18px; font-weight: 400; color: var(--dsw-alias-label-caption); }\n.dt-preview-part[data-editable] { border-left-color: var(--dsw-alias-brand-primary); }\n.dt-preview-head b { font-weight: 500; }\n.dt-preview-head > span { font-size: 12px; color: var(--dsw-alias-label-caption); }\n.dt-changed-tag { margin-left: 6px; padding: 0 5px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 4px; font-size: 11px; line-height: 16px; font-weight: 400; color: var(--dsw-alias-label-secondary); }\n.dt-updated-tag { border-color: var(--dsw-alias-state-warn-primary); color: var(--dsw-alias-state-warn-primary); }\n.dt-default-updated { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 2px 12px; border-left: 2px solid var(--dsw-alias-state-warn-primary); }\n.dt-diff-fold { color: var(--dsw-alias-label-caption); font-style: italic; }\n.dt-compare { margin-left: auto; }\n.dt-admission th { white-space: nowrap; }\n.dt-admission thead tr:first-child th:not(:first-child) { color: var(--dsw-alias-label-secondary); font-weight: 500; }\n.dt-admission td { vertical-align: middle; }\n.dt-admission-scope { color: var(--dsw-alias-label-primary); font-size: 13px; }\n.dt-admission-scope small { display: block; font-size: 11px; color: var(--dsw-alias-label-caption); }\n.dt-admission-na { color: var(--dsw-alias-label-caption); }\n.dt-admission-cell { display: flex; align-items: center; gap: 4px; }\n.dt-admission-cell .dt-select { flex: 1; min-width: 0; }\n.dt-admission-slot { display: inline-flex; flex: none; width: 16px; }\n.dt-info-warn { color: var(--dsw-alias-state-warn-primary); }\n.dt-field-segmented { max-width: 240px; }\n/* 活跃时段:两个原生 time 选择器 + 全天按钮 */\n/* 表单控件不必满宽:短数字撑到 900px 只会显得空 */\n.dt-form > .dt-field > .dt-input { max-width: 480px; }\n.dt-error-card { border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary) 35%, var(--dsw-alias-border-l3)); }\n.dt-error-card .dt-card-title { color: var(--dsw-alias-state-error-primary); }\n/* 空态引导:圆形步骤号 + 标题 + 说明,替代「① + 列表符号」的重复 */\n.dt-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: none; }\n.dt-step { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }\n.dt-step-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--dsw-alias-bg-module-platform); color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 1; font-variant-numeric: tabular-nums; }\n.dt-step-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }\n.dt-step-title { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--dsw-alias-label-primary); }\n.dt-empty { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 12px; }\n.dt-step-detail { font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-tertiary); }\n.dt-hours { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }\n.dt-time { box-sizing: border-box; height: 32px; padding: 0 8px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: 8px; background: var(--dsw-alias-bg-layer-1); color: var(--dsw-alias-label-primary); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; }\n.dt-time:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-hours-sep { color: var(--dsw-alias-label-tertiary); }\n.dt-hours-hint { font-size: 12px; color: var(--dsw-alias-label-caption); }\n/* 分诊信号表(设置 → 诊断):左列「名字 + 两个标签」成组,右列 `+N 分` 定宽贴右、数字等宽。只挂局部类,全局 .dt-row-title 一行没动 —— 别的列表还在用它。 */\n.dt-signal-title { display: grid; grid-template-columns: minmax(0, 1fr) 4.5em; align-items: baseline; column-gap: 12px; }\n.dt-signal-lead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }\n.dt-signal-meta { display: block; justify-self: stretch; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }\n/* 同一个维度(默认开/关)的两档要等权:`默认关` 原本是 49×19 的裸字,`默认开` 是 51×21 的描边胶囊。 */\n.dt-signal-lead .dt-tag[data-tone='quiet'] { border: 0.5px solid var(--dsw-alias-border-l4); }\n";
|
|
120
|
+
const PORTED_CSS = "/* Panel layout and local UI controls styled with DSH `--dsw-alias-*` design tokens; one rule per line. */\n.dt-page { box-sizing: border-box; height: 100%; overflow: auto; scrollbar-gutter: stable; scroll-padding: 48px 0 72px; container-type: inline-size; padding: 28px clamp(24px, 4vw, 48px) 0; color: var(--dsw-alias-label-primary); }\n/* Deployment page rendered inside DSH Plugin Manager, which owns scrolling and padding. */\n.dt-embedded { container-type: inline-size; color: var(--dsw-alias-label-primary); }\n/* Disable sticky positioning inside DSH Plugin Manager, where the host container owns scrolling and bottom padding. */\n.dt-embedded .dt-savebar { position: static; }\n.dt-page > * + * { margin-top: 16px; }\n.dt-page > .dt-column { max-width: 960px; margin: 0 auto; padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }\n.dt-head { position: relative; z-index: 3; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }\n.dt-search { position: relative; width: 240px; max-width: 100%; }\n.dt-search-results { position: absolute; top: calc(100% + 6px); right: 0; width: min(560px, 90cqw); max-height: 60vh; overflow: auto; padding: 8px 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 12px; background: var(--dsw-alias-bg-layer-2); box-shadow: var(--dsw-elevation-prominent); z-index: 5; display: flex; flex-direction: column; gap: 8px; }\n.dt-mark { background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 25%, transparent); color: inherit; border-radius: 2px; }\n[data-platform='darwin'] .dt-page .dt-head { padding-top: var(--dsh-frame-top-clearance, 0px); }\n.dt-title { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--dsw-alias-label-secondary); }\n.dt-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }\n.dt-page .dt-tabs { overflow-x: auto; display: flex; gap: 20px; max-width: none; padding: 0; border-radius: 0; background: none; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-segmented { width: 100%; max-width: 420px; box-sizing: border-box; display: inline-grid; gap: 2px; padding: 3px; border-radius: 9px; background: var(--dsw-alias-interactive-bg-hover); }\n.dt-form.dt-block { padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 16px; gap: 16px; }\n.dt-block-title { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }\n.dt-section { display: flex; flex-direction: column; gap: 8px; min-width: 0; }\n.dt-section-title { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; line-height: 22px; font-weight: 600; color: var(--dsw-alias-label-primary); }\n.dt-section-name { white-space: nowrap; }\n.dt-count { font-size: 14px; color: var(--dsw-alias-label-caption); font-variant-numeric: tabular-nums; font-weight: 400; } .dt-section-sub { font-size: 12px; line-height: 18px; font-weight: 400; color: var(--dsw-alias-label-caption); }\n.dt-hint { margin: 0; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-tertiary); }\n.dt-error { margin: 0; font-size: 13px; line-height: 20px; color: var(--dsw-alias-state-error-primary); }\n.dt-banner { margin: 0; padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 20px; background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 10%, transparent); overflow-wrap: anywhere; }\n.dt-banner.dt-danger { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent); color: var(--dsw-alias-state-error-primary); }\n.dt-list { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; gap: 2px; }\n.dt-row { position: relative; min-width: 0; border-radius: 12px; padding: 10px 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: flex-start; }\n.dt-row.dt-link:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-row-main { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }\n.dt-disclosure-body .dt-row-main { flex-basis: 0; }\n.dt-row-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; line-height: 20px; font-weight: 500; }\n.dt-open { max-width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; line-height: 20px; font-weight: 500; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-open::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }\n.dt-open:focus-visible { outline: none; }\n.dt-open-wrap { white-space: normal; }\n.dt-open:focus-visible::after { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-caption); overflow-wrap: anywhere; }\n.dt-row-quote { font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }\n/* Transparent block borders preserve vertical spacing when line clamping clips padding. */\n.dt-banner:is(.dt-clamp, .dt-clamp-8) { padding-block: 0; border-block: 8px solid transparent; }\n.dt-banner-label { font-weight: 500; }\n.dt-banner .dt-md { display: inline; }\n.dt-banner .dt-md > p:first-child { display: inline; }\n.dt-row-buttons { position: relative; z-index: 1; gap: 8px; margin-top: 4px; }\n.dt-row-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; font-size: 13px; line-height: 20px; }\n.dt-dot { flex: none; margin-top: 5px; }\n.dt-inline-link { position: relative; z-index: 1; color: var(--dsw-alias-link); text-decoration: none; }\n.dt-inline-link:hover { text-decoration: underline; }\n.dt-textlink { padding: 0; border: 0; background: none; font: inherit; color: var(--dsw-alias-link); cursor: pointer; text-align: left; }\n.dt-textlink:hover { text-decoration: underline; }\n.dt-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; line-height: 20px; }\n.dt-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 13px; line-height: 20px; }\n.dt-kv dt { color: var(--dsw-alias-label-tertiary); }\n.dt-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }\n@container (max-width: 640px) { .dt-kv dt { margin-top: 4px; } .dt-kv dt:first-of-type { margin-top: 0; } }\n.dt-timeline-day { position: sticky; top: 0; z-index: 1; padding: 6px 0 2px; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); font-weight: 500; list-style: none; background: var(--dsw-alias-bg-base); }\n.dt-event-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }\n.dt-event-head .dt-event-time { margin-left: auto; flex: none; font-size: 12px; color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }\n.dt-event-nums { color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }\n.dt-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }\n.dt-event { padding: 12px 0; border-bottom: 0.5px solid var(--dsw-alias-border-l2); display: flex; flex-direction: column; gap: 6px; min-width: 0; }\n.dt-event:last-child { border-bottom: 0; }\n.dt-event.dt-highlight { background: var(--dsw-alias-interactive-bg-hover); border-radius: 8px; padding-inline: 8px; margin-inline: -8px; }\n.dt-event-text { margin: 0; font-size: 13px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }\n.dt-event-actor { font-weight: 500; color: var(--dsw-alias-label-secondary); }\n.dt-event-quiet .dt-event-text { color: var(--dsw-alias-label-tertiary); }\n.dt-flow { margin: 0; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); }\n.dt-clamp-8 { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }\n.dt-more { align-self: flex-start; font-size: 12px; }\n.dt-reveal { opacity: 0; }\n.dt-event:hover .dt-reveal, .dt-reveal:focus-visible { opacity: 1; }\n@media (hover: none) {\n .dt-reveal { opacity: 1; }\n}\n.dt-event-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-tertiary); }\n.dt-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }\n.dt-filters .dt-search { margin-left: auto; }\n.dt-form { display: flex; flex-direction: column; gap: 24px; }\n.dt-fieldset { display: flex; flex-direction: column; gap: inherit; min-width: 0; margin: 0; padding: 0; border: 0; }\n.dt-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 20px; min-width: 0; }\n.dt-field small { color: var(--dsw-alias-label-caption); font-size: 12px; }\n.dt-textarea { box-sizing: border-box; width: 100%; min-width: 0; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-1, transparent); resize: vertical; }\n.dt-select { box-sizing: border-box; width: 100%; min-width: 0; height: 32px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: 8px; padding: 0 28px 0 8px; text-overflow: ellipsis; font: inherit; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-1, transparent); }\n.dt-textarea:focus-visible, .dt-select:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-mono { font-family: var(--ds-font-family-code, Menlo, monospace); font-size: 12px; overflow-wrap: anywhere; }\n.dt-detail { margin-top: 2px; color: var(--dsw-alias-label-secondary); }\n.dt-savebar .dt-error { white-space: pre-line; }\n.dt-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; font-size: 13px; }\n.dt-subhead-actions { display: inline-flex; align-items: center; gap: 4px; }\n.dt-btn-busy .dt-btn-icon svg { animation: dt-spin 1s linear infinite; }\n.dt-subhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); }\n.dt-rules, .dt-changes { list-style: none; margin: 0; padding: 0; }\n.dt-field-head { display: inline-flex; align-items: center; gap: 4px; color: var(--dsw-alias-label-secondary); }\n.dt-info { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; padding: 0; border: 0; background: none; color: var(--dsw-alias-label-caption); cursor: help; }\n.dt-info:hover, .dt-info:focus-visible { color: var(--dsw-alias-label-secondary); }\n.dt-info:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; border-radius: 50%; }\n.dt-tooltip { position: fixed; z-index: 1100; width: max-content; max-width: min(320px, calc(100vw - 24px)); padding: 3px 7px; border-radius: 8px; background: var(--dsw-alias-tooltip-bg); color: var(--dsw-static-neutral-bluish-00); font-size: 13px; line-height: 20px; overflow-wrap: break-word; pointer-events: none; animation: dt-tooltip-in 150ms ease-in-out; }\n@keyframes dt-tooltip-in { from { opacity: 0; } }\n.dt-rules { border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-rule { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; border-bottom: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-rule > :first-child { flex: 1; min-width: 0; }\n.dt-rule-preview { flex: 1; min-width: 0; margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--dsw-alias-label-caption); }\n.dt-rule-switch { margin-top: 2px; flex: none; }\n.dt-rule-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dsw-alias-label-caption); }\n.dt-rule-dot[data-enabled] { background: var(--dsw-alias-brand-primary); }\n.dt-rule-body { display: flex; flex-direction: column; gap: 12px; padding: 8px 0 8px 28px; }\n.dt-model { display: flex; flex-direction: column; gap: 6px; }\n.dt-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }\n.dt-changes { display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 20px; }\n.dt-changes li::before { content: '· '; color: var(--dsw-alias-label-caption); }\n.dt-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }\n.dt-modal.dt-glossary-modal { width: min(680px, 100%); }\n.dt-nav-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; text-align: left; cursor: pointer; }\n.dt-nav-item:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-nav-item[aria-current='true'] { background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-primary); font-weight: 500; }\n.dt-nav-item:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: -2px; }\n.dt-changed-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dsw-alias-brand-primary); flex: none; }\n.dt-add-skill { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-prompt-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }\n.dt-editor { min-height: 360px; }\n.dt-inline-select { width: auto; }\n.dt-preview-part { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 2px 12px; border-left: 2px solid var(--dsw-alias-border-l3); }\n.dt-preview-head { font-size: 13px; line-height: 20px; display: flex; align-items: baseline; gap: 8px; }\ndiv.dt-preview-head { color: var(--dsw-alias-label-secondary); }\n.dt-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 16px; min-width: 0; }\n.dt-card-head { display: flex; align-items: center; gap: 12px; min-height: 28px; }\n.dt-card-head .dt-row-main { flex: 1 1 0; min-width: 64px; }\n.dt-card-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-row-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }\n.dt-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }\n.dt-rows-item { display: grid; grid-template-columns: repeat(var(--dt-columns), minmax(0, 1fr)) auto; gap: 8px; align-items: center; }\n.dt-filter-gap { flex: 1; }\n.dt-page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; width: 100%; }\n.dt-page-head > div:first-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }\n.dt-page-head .dt-toolbar { flex: 0 1 auto; margin-left: auto; }\n.dt-page-head > .dt-btn { margin-left: -10px; }\n.dt-page-title { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; width: 100%; }\n.dt-page-title h2 { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 20px; line-height: 28px; font-weight: 500; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\n.dt-status-line { margin-top: -16px; }\n.dt-plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 20px; }\n.dt-plain-list > li { position: relative; padding-left: 12px; }\n.dt-plain-list > li::before { content: ''; position: absolute; left: 0; top: 5px; bottom: 5px; width: 2px; border-radius: 1px; background: currentColor; opacity: 0.45; }\n.dt-details { display: flex; flex-direction: column; gap: 2px; border-top: 0.5px solid var(--dsw-alias-border-l2); padding-top: 8px; }\n.dt-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-danger-zone .dt-btn { color: var(--dsw-alias-state-error-primary); }\n.dt-md { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }\n.dt-md p, .dt-md ul, .dt-md ol { margin: 0; }\n.dt-md ul, .dt-md ol { padding-left: 20px; display: flex; flex-direction: column; gap: 2px; }\n.dt-md-heading { font-weight: 500; }\n.dt-code { font-family: var(--ds-font-family-code, Menlo, monospace); font-size: 12px; padding: 0 4px; border-radius: 4px; background: var(--dsw-alias-bg-module-platform); }\n.dt-dot-wrap { display: inline-flex; flex: none; }\n.dt-search-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }\n.dt-ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }\n.dt-legend-title { margin: 16px 0 6px; font-size: 13px; color: var(--dsw-alias-label-tertiary); }\n.dt-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }\n.dt-legend li { display: flex; align-items: center; gap: 6px; }\n.dt-legend .dt-dot { margin-top: 0; }\n.dt-savebar { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 0; background: var(--dsw-alias-bg-base, var(--dsw-alias-bg-layer-1)); border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-savebar .dt-hint { margin-right: auto; }\n.dt-card > .dt-savebar, .dt-block > .dt-savebar { margin: 0 -16px -16px; padding: 12px 16px; border-radius: 0 0 16px 16px; }\n.dt-glossary { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 20px; }\n.dt-glossary th, .dt-glossary td { text-align: left; padding: 6px 8px; border-bottom: 0.5px solid var(--dsw-alias-border-l2); vertical-align: top; }\n.dt-glossary th { color: var(--dsw-alias-label-tertiary); font-weight: 400; }\n.dt-glossary th.dt-glossary-group { color: var(--dsw-alias-label-secondary); font-weight: 600; padding-top: 14px; }\n.dt-glossary th:nth-child(-n+2), .dt-glossary td:nth-child(-n+2) { white-space: nowrap; }\n.dt-values { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0 0; font-size: 13px; }\n.dt-values dt { color: var(--dsw-alias-label-tertiary); }\n.dt-values dd { margin: 0; }\n.dt-pre { margin: 0; padding: 12px; border-radius: 10px; background: var(--dsw-alias-bg-module-platform); font-family: var(--ds-font-family-code, Menlo, monospace); font-size: 12px; line-height: 18px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 480px; overflow: auto; }\n.dt-pre ins { background: color-mix(in srgb, var(--dsw-alias-state-success-primary, green) 18%, transparent); text-decoration: none; }\n.dt-pre del { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 18%, transparent); text-decoration: none; }\n.dt-prompt { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }\n.dt-prompt-nav { display: flex; flex-direction: column; gap: 2px; }\n.dt-prompt-nav button { justify-content: flex-start; }\n.dt-disclosure-body { padding: 8px 0 8px 28px; display: flex; flex-direction: column; gap: 8px; }\n@container (max-width: 640px) {\n .dt-tab { padding: 0 8px; font-size: 13px; }\n .dt-segment { padding: 0 10px; }\n .dt-head { align-items: center; }\n .dt-search-results { right: auto; left: 0; width: 100%; }\n .dt-page-title h2 { font-size: 17px; line-height: 24px; }\n .dt-status-line { margin-top: -12px; }\n .dt-page .dt-tabs { display: flex; flex-wrap: nowrap; scrollbar-width: thin; }\n .dt-page .dt-tab { flex: none; }\n .dt-page .dt-tabs[data-more='end'] { mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }\n .dt-page .dt-tabs[data-more='start'] { mask-image: linear-gradient(to right, transparent, #000 40px); }\n .dt-page .dt-tabs[data-more='both'] { mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }\n .dt-kv { grid-template-columns: 1fr; gap: 6px; }\n .dt-grid3, .dt-prompt { grid-template-columns: 1fr; }\n .dt-search { width: 100%; }\n .dt-filters .dt-search { margin-left: 0; }\n}\n/* Local UI primitive styles (see controls.tsx). */\n.dt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: none; border-radius: 18px; cursor: pointer; font: inherit; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); background: transparent; padding: 0 14px; white-space: nowrap; }\n.dt-btn:disabled { cursor: not-allowed; opacity: 0.4; }\n.dt-btn:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-btn-md { height: 36px; }\n.dt-btn-sm { height: 28px; font-size: 12px; line-height: 18px; padding: 0 10px; border-radius: 14px; }\n/* 主按钮:深色下 label-primary-foreground(深色)压绿底只有 4.09 —— 深色主题里前景该是浅的。 */\n/* 往白色混 70%:浅色下仍是浅字(4.5+),深色下变浅(>4.5),两边都过。 */\n.dt-btn-primary { background: var(--dsw-alias-button-primary-fill); color: color-mix(in srgb, var(--dsw-alias-label-primary-foreground) 30%, #ffffff); }\n.dt-btn-primary:hover:not(:disabled) { background: var(--dsw-alias-button-primary-hover); }\n.dt-btn-ghost { background: transparent; border: 0.5px solid var(--dsw-alias-border-l3); color: var(--dsw-alias-label-secondary); }\n.dt-btn-ghost:hover:not(:disabled), .dt-btn-outline:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-btn-ghost:active:not(:disabled) { background: var(--dsw-alias-interactive-bg-active); }\n.dt-btn-outline { border: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-btn-icon { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; }\n.dt-tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 1px 8px; font-size: 11px; line-height: 17px; font-weight: 500; white-space: nowrap; }\n.dt-tag[data-tone='outline'] { border: 0.5px solid var(--dsw-alias-border-l4); color: var(--dsw-alias-label-tertiary); }\n.dt-tag[data-tone='neutral'] { background: var(--dsw-alias-bg-module-platform); color: var(--dsw-alias-label-secondary); }\n.dt-tag[data-tone='quiet'] { color: var(--dsw-alias-label-tertiary); }\n.dt-tag[data-tone='success'] { background: color-mix(in srgb, var(--dsw-alias-state-success-primary) 10%, transparent); color: color-mix(in srgb, var(--dsw-alias-state-success-primary) 72%, var(--dsw-alias-label-primary)); }\n.dt-tag[data-tone='info'] { background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 10%, transparent); color: var(--dsw-alias-state-business-primary); }\n/* 胶囊是「暂停/退避/判断」唯一的状态色:文字与 12% 同色底叠起来,浅色下警告只有 4.17。 */\n/* 往 label-primary 混 28%:浅色变深、深色变浅,两档都留出余量。 */\n.dt-tag[data-tone='warning'] { background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 12%, transparent); color: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 72%, var(--dsw-alias-label-primary)); }\n.dt-tag[data-tone='danger'] { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent); color: color-mix(in srgb, var(--dsw-alias-state-error-primary) 76%, var(--dsw-alias-label-primary)); }\n.dt-pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border: none; border-radius: 12px; font: inherit; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); background: var(--dsw-alias-bg-layer-2); cursor: pointer; }\n.dt-pill:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-pill-active, .dt-pill-active:hover { color: var(--dsw-alias-label-primary); background: var(--dsw-alias-button-ghost-active-fill); box-shadow: inset 0 0 0 1px var(--dsw-alias-button-ghost-active-border); }\n.dt-tabs { display: grid; padding: 4px; border-radius: 12px; background: var(--dsw-alias-bg-module-platform); }\n.dt-tab { box-sizing: border-box; height: 34px; padding: 0 12px; border: 0.5px solid transparent; border-radius: 8px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 14px; line-height: 20px; white-space: nowrap; cursor: pointer; transition: color 180ms ease, background 180ms ease; }\n.dt-tab:hover { color: var(--dsw-alias-label-primary); }\n.dt-tab[aria-selected='true'] { color: var(--dsw-alias-label-primary); font-weight: 600; background: var(--dsw-alias-bg-layer-3); border-color: var(--dsw-alias-border-l3); }\n.dt-tab:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 4px; }\n.dt-segment { height: 28px; padding: 0 16px; border: 0; border-radius: 7px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color 120ms ease, background 160ms ease; }\n.dt-segment:hover:not(:disabled), .dt-segment[aria-selected='true'] { color: var(--dsw-alias-label-primary); }\n.dt-segment[aria-selected='true'] { background: var(--dsw-alias-bg-layer-1); box-shadow: var(--dsw-elevation-soft); }\n.dt-segment:disabled { cursor: default; opacity: 0.4; }\n.dt-segment:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: -2px; }\n.dt-input { box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; height: 32px; min-width: 0; padding: 0 8px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: 8px; background: var(--dsw-alias-bg-layer-1); }\n.dt-input:focus-within { border-color: var(--dsw-alias-brand-primary); }\n.dt-input-icon { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; color: var(--dsw-alias-label-tertiary); }\n.dt-input input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); }\n.dt-input input/* 占位符:label-dimmed 在浅色下只有 2.17(深色 3.81),必须能读出来才叫占位符。 */\n/* 往 label-tertiary 混 60%:浅色变深、深色变浅,两档都过 4.5。 */\n::placeholder { color: color-mix(in srgb, var(--dsw-alias-label-dimmed) 40%, var(--dsw-alias-label-tertiary)); }\n.dt-input input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }\n.dt-field .dt-input, .dt-search .dt-input, .dt-add-skill .dt-input { display: flex; width: 100%; }\n.dt-switch { box-sizing: border-box; flex: 0 0 auto; width: 36px; height: 20px; padding: 2px; border: 0; border-radius: 10px; background: var(--dsw-alias-border-l3); cursor: pointer; }\n.dt-switch[aria-checked='true'] { background: var(--dsw-alias-brand-primary); }\n.dt-switch:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-switch-thumb { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--dsw-alias-label-primary-foreground); transition: transform 120ms ease; }\n.dt-switch[aria-checked='true'] .dt-switch-thumb { transform: translateX(16px); }\n.dt-state-dot { position: relative; display: inline-block; flex: none; width: 10px; height: 10px; color: var(--dsw-alias-state-idle-primary); }\n.dt-state-dot::after { content: ''; position: absolute; inset: 20%; border-radius: 50%; background: currentColor; }\n.dt-state-dot[data-state='done'] { color: var(--dsw-alias-state-success-primary); }\n.dt-state-dot[data-state='warning'] { color: var(--dsw-alias-state-warn-primary); }\n.dt-state-dot[data-state='error'] { color: var(--dsw-alias-state-error-primary); }\n.dt-spinner { flex: none; color: var(--dsw-alias-label-tertiary); }\n.dt-spinner g { transform-origin: center; animation: dt-spin 1.5s linear infinite; }\n.dt-spinner circle { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }\n.dt-spinner circle:first-child { opacity: 0.25; }\n.dt-spinner circle:last-child { stroke-dasharray: 18 150; }\n@keyframes dt-spin { to { transform: rotate(360deg); } }\n.dt-disclosure-row { display: flex; align-items: center; gap: 4px; min-height: 28px; min-width: 0; border-radius: 8px; cursor: pointer; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); }\n.dt-disclosure-row:hover { color: var(--dsw-alias-label-primary); }\n.dt-disclosure-row:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-disclosure-lead { position: relative; display: inline-flex; flex: none; width: 24px; height: 24px; align-items: center; justify-content: center; }\n.dt-disclosure-icon { display: inline-flex; align-items: center; justify-content: center; }\n.dt-disclosure-chevron { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }\n.dt-disclosure-row:hover .dt-disclosure-icon, .dt-disclosure[data-open] .dt-disclosure-icon { visibility: hidden; }\n.dt-disclosure-row:hover .dt-disclosure-chevron, .dt-disclosure[data-open] .dt-disclosure-chevron { display: inline-flex; }\n.dt-disclosure-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-modal-root { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: max(24px, var(--dsh-frame-top-clearance, 24px)) 24px; }\n.dt-modal-mask { position: absolute; inset: 0; background: var(--dsw-alias-bg-mask-1); backdrop-filter: var(--dsw-mask-blur); }\n.dt-modal { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 20px; width: min(380px, 100%); max-height: 100%; padding: 0 0 24px; overflow: hidden; border-radius: 24px; background: var(--dsw-alias-bg-layer-2); box-shadow: var(--dsw-elevation-prominent); color: var(--dsw-alias-label-primary); outline: none; }\n.dt-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 22px 14px 0 24px; }\n.dt-modal-header h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }\n.dt-modal-close { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: none; border-radius: 8px; background: transparent; cursor: pointer; color: var(--dsw-alias-label-secondary); }\n.dt-modal-close:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-modal-description { margin: -8px 0 0; padding: 0 24px; font-size: 14px; line-height: 22px; }\n.dt-modal-body { min-width: 0; min-height: 0; overflow: auto; padding: 0 24px; }\n.dt-modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 24px; }\n.dt-toast { position: fixed; top: 40px; left: 50%; z-index: 1100; pointer-events: none; width: max-content; max-width: min(640px, calc(100vw - 48px)); padding: 12px 16px; border-radius: 14px; background: var(--dsw-alias-toast-bg); color: var(--dsw-static-neutral-bluish-00); font-size: 14px; line-height: 22px; box-shadow: var(--dsw-shadow-lv3); transform: translateX(-50%); animation: dt-toast-in 160ms ease-out, dt-toast-fade 1000ms ease var(--dt-toast-hold, 3000ms) forwards; }\n@keyframes dt-toast-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }\n@keyframes dt-toast-fade { to { opacity: 0; visibility: hidden; } }\n@media (prefers-reduced-motion: reduce) {\n .dt-tab, .dt-segment, .dt-switch-thumb, .dt-spinner g, .dt-btn-busy .dt-btn-icon svg, .dt-tooltip { transition: none; animation: none; }\n .dt-toast { animation: dt-toast-fade 1000ms ease var(--dt-toast-hold, 3000ms) forwards; }\n}\n.dt-page .dt-tab { height: 34px; padding: 0 2px; border: 0; border-radius: 0; color: var(--dsw-alias-label-tertiary); font-size: 14px; }\n.dt-page .dt-tab[aria-selected='true'] { background: none; color: var(--dsw-alias-label-primary); font-weight: 500; box-shadow: inset 0 -1.5px 0 var(--dsw-alias-label-primary); }\n.dt-status-head { display: flex; align-items: center; gap: 8px; }\n.dt-status-title { margin: 0; flex: 1; display: flex; align-items: center; gap: 4px; font-size: 15px; line-height: 22px; font-weight: 600; }\n.dt-status-text { margin-left: auto; flex: none; font-size: 12px; font-weight: 400; color: var(--dsw-alias-label-secondary); }\n.dt-status-line .dt-status-text { margin-left: 0; }\n.dt-status-text[data-state='warning'] { color: var(--dsw-alias-state-warn-primary); }\n.dt-status-text[data-state='error'] { color: var(--dsw-alias-state-error-primary); }\n.dt-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }\n.dt-lv { white-space: nowrap; }\n.dt-lv-label { color: var(--dsw-alias-label-caption); }\n.dt-lv-value { color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }\n.dt-chip { display: inline-flex; flex-wrap: wrap; max-width: 100%; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 6px; overflow: hidden; font-size: 11px; line-height: 18px; color: var(--dsw-alias-label-secondary); }\n.dt-chip-source { padding: 0 6px; color: var(--dsw-alias-label-tertiary); background: var(--dsw-alias-bg-module-platform); }\n.dt-chip-fact { padding: 0 6px; border-left: 0.5px solid var(--dsw-alias-border-l3); white-space: nowrap; }\n.dt-chip-label { margin-right: 4px; color: var(--dsw-alias-label-caption); }\n.dt-chip-link { position: relative; z-index: 1; text-decoration: none; cursor: pointer; transition: border-color 120ms ease; }\n.dt-chip-link:hover { border-color: var(--dsw-alias-brand-primary); }\n.dt-chip-link:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-chip-open { display: inline-flex; align-items: center; padding: 0 5px; border-left: 0.5px solid var(--dsw-alias-border-l3); color: var(--dsw-alias-brand-primary); }\n.dt-chip-problem, .dt-chip-problem .dt-chip-label { color: var(--dsw-alias-state-error-primary); }\n.dt-cards { gap: 8px; }\n.dt-att .dt-inline-link { font-size: 13px; font-weight: 500; }\n.dt-list > .dt-att { margin: 2px 8px; }\n.dt-att { padding: 10px 12px 10px 16px; border: 0; border-radius: 0; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-att::before { content: ''; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; border-radius: 1px; background: var(--dsw-alias-state-warn-primary); opacity: 0.7; }\n.dt-att-error::before { background: var(--dsw-alias-state-error-primary); }\n.dt-att-what { font-size: 12px; line-height: 18px; font-weight: 500; color: var(--dsw-alias-state-warn-primary); }\n.dt-att-error .dt-att-what, .dt-att-error .dt-att-what .dt-open { color: var(--dsw-alias-state-error-primary); }\n.dt-stats { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 10px 14px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 12px; background: var(--dsw-alias-bg-module-platform); }\n.dt-stat { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--dsw-alias-label-caption); }\n/* 可点的统计数字:去掉原生按钮外观,保留文字排版;选中时用浅底提示 */\n.dt-stat-btn { border: 0; background: none; padding: 2px 6px; margin: -2px -6px; border-radius: 8px; font: inherit; color: inherit; cursor: pointer; }\n.dt-stat-btn:hover { background: var(--dsw-alias-interactive-bg-hover); }\n/* 浅色下 interactive-bg-hover 与白底只差 1.03:点了统计数字在按筛选,零视觉反馈。 */\n/* 换成品牌色 12% 底 + 0.5px 品牌色描边(两个主题都分得开)。 */\n.dt-stat-btn[aria-pressed='true'] { background: color-mix(in srgb, var(--dsw-alias-brand-primary) 12%, transparent); box-shadow: inset 0 0 0 0.5px var(--dsw-alias-brand-primary); }\n.dt-stat-btn:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n/* 统计条单位:按钮上的 color:inherit 会把单位染成数字色,所以单位单独一档。 */\n/* 浅色下 caption(#818b98)在白底只有 3.14–3.45,深色下同一档 4.34–5.07。 */\n/* 往 label-primary 混 30%:浅色变深、深色变浅,两个主题的对比度同时变好(不用新 token)。 */\n/* 注意选择器**不带** .dt-stat-btn 前缀 —— 带前缀就只作用于可点的格子,不可点的仍是旧色(真机踩过)。 */\n.dt-stat-unit { color: color-mix(in srgb, var(--dsw-alias-label-caption) 70%, var(--dsw-alias-label-primary)); }\n/* 选中的统计格:品牌色 12% 底会把单位压到 4.20,再往主色多混 10% 拉回来。 */\n.dt-stat-btn[aria-pressed='true'] .dt-stat-unit { color: color-mix(in srgb, var(--dsw-alias-label-caption) 58%, var(--dsw-alias-label-primary)); }\n.dt-stat-value { font-size: 14px; font-weight: 500; color: var(--dsw-alias-label-primary); font-variant-numeric: tabular-nums; }\n.dt-more-link { font-size: 12px; font-weight: 400; }\n.dt-settings { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; align-items: start; }\n.dt-settings-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }\n.dt-settings-link { padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; text-align: left; cursor: pointer; }\n.dt-settings-link:hover { color: var(--dsw-alias-label-primary); }\n.dt-settings-link[aria-current='page'] { background: var(--dsw-alias-bg-module-platform); color: var(--dsw-alias-label-primary); font-weight: 500; }\n.dt-settings-link[data-stage] + .dt-settings-link:not([data-stage]) { margin-top: 10px; }\n.dt-settings-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 16px; background: var(--dsw-alias-bg-layer-1); }\n.dt-settings-title { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; }\n.dt-settings-body .dt-section-title { font-size: 15px; line-height: 22px; }\n.dt-subtabs { display: flex; gap: 16px; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-subtab { padding: 0 0 6px; border: 0; background: none; color: var(--dsw-alias-label-tertiary); font: inherit; font-size: 13px; cursor: pointer; }\n.dt-subtab[aria-selected='true'] { color: var(--dsw-alias-label-primary); font-weight: 500; box-shadow: inset 0 -1.5px 0 var(--dsw-alias-label-primary); }\n.dt-part { display: flex; flex-direction: column; gap: 12px; }\n.dt-rows-summary { text-align: left; color: var(--dsw-alias-label-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }\n.dt-table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 18px; }\n.dt-table th { text-align: left; font-weight: 400; color: var(--dsw-alias-label-caption); padding: 2px 8px 2px 0; }\n.dt-table td { padding: 4px 8px 4px 0; border-top: 0.5px solid var(--dsw-alias-border-l3); vertical-align: top; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }\n@container (max-width: 640px) {\n .dt-settings { grid-template-columns: 1fr; gap: 12px; }\n .dt-settings-nav { position: static; flex-direction: row; flex-wrap: wrap; }\n .dt-settings-link[data-stage] + .dt-settings-link:not([data-stage]) { margin-top: 0; }\n .dt-page .dt-tabs { gap: 14px; }\n}\n.dt-list > .dt-ticket { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 12px; align-items: start; margin: 0; padding: 12px 8px 12px 18px; border-radius: 0; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-list > .dt-ticket[data-state]::before { content: ''; position: absolute; left: 6px; top: 12px; bottom: 12px; width: 2px; border-radius: 1px; background: var(--dsw-alias-state-warn-primary); opacity: 0.7; }\n.dt-list > .dt-ticket[data-state='error']::before { background: var(--dsw-alias-state-error-primary); }\n.dt-ticket-stage { align-self: stretch; padding-top: 1px; border-right: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-ticket-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }\n.dt-ticket-body .dt-row-title .dt-open { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-ticket-meta { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }\n.dt-ticket-meta .dt-chip { flex: none; }\n.dt-ticket-meta .dt-ticket-actions { margin-top: 0; margin-left: auto; min-height: 0; flex-wrap: nowrap; }\n@container (max-width: 640px) { .dt-ticket-meta { flex-wrap: wrap; white-space: normal; } .dt-ticket-meta .dt-ticket-actions { flex-wrap: wrap; } }\n.dt-ticket-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--dsw-alias-label-primary); }\n.dt-ticket-note-error { color: var(--dsw-alias-state-error-primary); }\n.dt-ticket-note-pause { font-weight: 500; color: var(--dsw-alias-state-warn-primary); }\n.dt-ticket-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; min-height: 30px; margin-top: 2px; }\n/* Pass pointer events through action containers to the row link, keeping only child controls interactive. */\n.dt-ticket-actions, .dt-row-buttons, .dt-row-actions { pointer-events: none; }\n.dt-ticket-actions > *, .dt-row-buttons > *, .dt-row-actions > * { pointer-events: auto; }\n.dt-line { min-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.dt-row-meta.dt-line { flex-wrap: nowrap; }\n.dt-line-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dsw-alias-label-secondary); }\n.dt-error-text { color: var(--dsw-alias-state-error-primary); }\n.dt-stage { display: inline-flex; align-items: flex-start; gap: 5px; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--dsw-alias-label-secondary); }\n.dt-stage svg { flex: none; margin-top: 2px; }\n.dt-stage[data-state='warning'] { color: var(--dsw-alias-state-warn-primary); }\n.dt-stage[data-state='error'] { color: var(--dsw-alias-state-error-primary); }\n.dt-stage[data-state='ongoing'] { color: var(--dsw-alias-state-business-primary); }\n.dt-icon-link { display: inline-flex; align-items: center; gap: 4px; }\na.dt-btn, a.dt-btn:hover { text-decoration: none; }\n.dt-section-icon { display: inline-flex; align-self: center; color: var(--dsw-alias-label-tertiary); }\n.dt-trigger-link { display: flex; flex-direction: column; gap: 2px; width: 100%; margin: -4px 0 -4px -8px; padding: 4px 8px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }\n.dt-trigger-link:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-trigger-link:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-trigger-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }\n.dt-kv-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }\n.dt-banner-actions { margin-top: 6px; }\n@container (max-width: 640px) {\n .dt-list > .dt-ticket { grid-template-columns: 1fr; row-gap: 4px; }\n .dt-ticket-stage { border-right: 0; }\n}\n.dt-nav-group { margin: 10px 10px 2px; font-size: 12px; font-weight: 600; color: var(--dsw-alias-label-secondary); }\n.dt-nav-group:first-child { margin-top: 0; }\n.dt-prompt-nav .dt-nav-item { flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }\n.dt-nav-item > span { display: inline-flex; align-items: center; gap: 6px; }\n.dt-nav-item small { font-size: 12px; line-height: 18px; font-weight: 400; color: var(--dsw-alias-label-caption); }\n.dt-preview-part[data-editable] { border-left-color: var(--dsw-alias-brand-primary); }\n.dt-preview-head b { font-weight: 500; }\n.dt-preview-head > span { font-size: 12px; color: var(--dsw-alias-label-caption); }\n.dt-changed-tag { margin-left: 6px; padding: 0 5px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 4px; font-size: 11px; line-height: 16px; font-weight: 400; color: var(--dsw-alias-label-secondary); }\n.dt-updated-tag { border-color: var(--dsw-alias-state-warn-primary); color: var(--dsw-alias-state-warn-primary); }\n.dt-default-updated { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 2px 12px; border-left: 2px solid var(--dsw-alias-state-warn-primary); }\n.dt-diff-fold { color: var(--dsw-alias-label-caption); font-style: italic; }\n.dt-compare { margin-left: auto; }\n.dt-admission th { white-space: nowrap; }\n.dt-admission thead tr:first-child th:not(:first-child) { color: var(--dsw-alias-label-secondary); font-weight: 500; }\n.dt-admission td { vertical-align: middle; }\n.dt-admission-scope { color: var(--dsw-alias-label-primary); font-size: 13px; }\n.dt-admission-scope small { display: block; font-size: 11px; color: var(--dsw-alias-label-caption); }\n.dt-admission-na { color: var(--dsw-alias-label-caption); }\n.dt-admission-cell { display: flex; align-items: center; gap: 4px; }\n.dt-admission-cell .dt-select { flex: 1; min-width: 0; }\n.dt-admission-slot { display: inline-flex; flex: none; width: 16px; }\n.dt-info-warn { color: var(--dsw-alias-state-warn-primary); }\n.dt-field-segmented { max-width: 240px; }\n/* 活跃时段:两个原生 time 选择器 + 全天按钮 */\n/* 表单控件不必满宽:短数字撑到 900px 只会显得空 */\n.dt-form > .dt-field > .dt-input { max-width: 480px; }\n.dt-error-card { border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary) 35%, var(--dsw-alias-border-l3)); }\n.dt-error-card .dt-card-title { color: var(--dsw-alias-state-error-primary); }\n/* 空态引导:圆形步骤号 + 标题 + 说明,替代「① + 列表符号」的重复 */\n.dt-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: none; }\n.dt-step { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }\n.dt-step-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--dsw-alias-bg-module-platform); color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 1; font-variant-numeric: tabular-nums; }\n.dt-step-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }\n.dt-step-title { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--dsw-alias-label-primary); }\n.dt-empty { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 12px; }\n.dt-step-detail { font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-tertiary); }\n.dt-hours { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }\n.dt-time { box-sizing: border-box; height: 32px; padding: 0 8px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: 8px; background: var(--dsw-alias-bg-layer-1); color: var(--dsw-alias-label-primary); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; }\n.dt-time:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-hours-sep { color: var(--dsw-alias-label-tertiary); }\n.dt-hours-hint { font-size: 12px; color: var(--dsw-alias-label-caption); }\n/* 分诊信号表(设置 → 诊断):左列「名字 + 两个标签」成组,右列 `+N 分` 定宽贴右、数字等宽。只挂局部类,全局 .dt-row-title 一行没动 —— 别的列表还在用它。 */\n.dt-signal-title { display: grid; grid-template-columns: minmax(0, 1fr) 4.5em; align-items: baseline; column-gap: 12px; }\n.dt-signal-lead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }\n.dt-signal-meta { display: block; justify-self: stretch; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }\n/* 同一个维度(默认开/关)的两档要等权:`默认关` 原本是 49×19 的裸字,`默认开` 是 51×21 的描边胶囊。 */\n.dt-signal-lead .dt-tag[data-tone='quiet'] { border: 0.5px solid var(--dsw-alias-border-l4); }\n";
|
|
121
121
|
|
|
122
122
|
/** 把移植过来的样式挂到 document 上,只挂一次。 */
|
|
123
123
|
/**
|
|
@@ -181,15 +181,24 @@ window.__ModuleLoader__.load({
|
|
|
181
181
|
// ── 官方 GUI 原语(移植自 dsh-superagent 的 src/client/controls.tsx + widgets.tsx)──
|
|
182
182
|
// 类名沿用官方 `dt-*`,样式由上面的 PORTED_CSS 提供,所以视觉与官方一致。
|
|
183
183
|
const ICON_PATHS = {
|
|
184
|
-
|
|
185
|
-
'chevron-
|
|
186
|
-
'chevron-
|
|
187
|
-
|
|
184
|
+
// 以下 16×16 path 直接复用 home/dsh-ui-official/assets(官方 0.2.1-rc.5),不是照截图重画。
|
|
185
|
+
'chevron-left': 'M10 4L6.70711 7.29289C6.31658 7.68342 6.31658 8.31658 6.70711 8.70711L10 12',
|
|
186
|
+
'chevron-right': 'M6 12L9.29289 8.70711C9.68342 8.31658 9.68342 7.68342 9.29289 7.29289L6 4',
|
|
187
|
+
'chevron-down': 'M4 6L7.29289 9.29289C7.68342 9.68342 8.31658 9.68342 8.70711 9.29289L12 6',
|
|
188
|
+
// derived:主库没有 chevron-up,按官方 chevron-down 做垂直镜像,仍是 16×16。
|
|
189
|
+
'chevron-up': 'M4 10L7.29289 6.70711C7.68342 6.31658 8.31658 6.31658 8.70711 6.70711L12 10',
|
|
190
|
+
search: [
|
|
191
|
+
'M6.58727 11.8586C9.55061 11.8586 11.9529 9.45637 11.9529 6.49304C11.9529 3.5297 9.55061 1.12744 6.58727 1.12744C3.62394 1.12744 1.22168 3.5297 1.22168 6.49304C1.22168 9.45637 3.62394 11.8586 6.58727 11.8586Z',
|
|
192
|
+
'M10.2991 10.3933L14.7783 14.8725',
|
|
193
|
+
],
|
|
188
194
|
question: 'M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zM9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6v.6M12 17h.01',
|
|
189
|
-
plus: '
|
|
195
|
+
plus: ['M8 2V14', 'M2 8H14'],
|
|
190
196
|
trash: 'M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3',
|
|
191
197
|
refresh: 'M20 12a8 8 0 1 1-2.3-5.6M20 4v5h-5',
|
|
192
|
-
clock:
|
|
198
|
+
clock: [
|
|
199
|
+
'M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z',
|
|
200
|
+
'M8 4.31V8.46L11 10.08',
|
|
201
|
+
],
|
|
193
202
|
history: 'M3.5 12a8.5 8.5 0 1 0 2.5-6M3.5 4v4h4M12 8v4l3 2',
|
|
194
203
|
shield: 'M12 3l7 3v6c0 4.2-2.9 7.6-7 9-4.1-1.4-7-4.8-7-9V6z',
|
|
195
204
|
decision: 'M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zM8.5 12.5l2.5 2.5 4.5-5',
|
|
@@ -198,8 +207,11 @@ window.__ModuleLoader__.load({
|
|
|
198
207
|
hash: 'M10 4L8 20M16 4l-2 16M5 9h15M4 15h15',
|
|
199
208
|
filter: 'M4 5h16l-6 7.5V18l-4 2v-7.5z',
|
|
200
209
|
user: 'M12 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM4 20c1.5-3.5 4.5-5 8-5s6.5 1.5 8 5',
|
|
201
|
-
close: '
|
|
202
|
-
settings:
|
|
210
|
+
close: ['M2.5 2.5L13.5 13.5', 'M13.5 2.5L2.5 13.5'],
|
|
211
|
+
settings: [
|
|
212
|
+
'M8 9.75012C8.9665 9.75012 9.75 8.96662 9.75 8.00012C9.75 7.03362 8.9665 6.25012 8 6.25012C7.0335 6.25012 6.25 7.03362 6.25 8.00012C6.25 8.96662 7.0335 9.75012 8 9.75012Z',
|
|
213
|
+
'M13.0107 7.79377C12.9505 7.89401 12.9205 7.94413 12.9205 7.99951C12.9205 8.0549 12.9505 8.10502 13.0106 8.20528L13.9849 9.83006C14.045 9.93029 14.0751 9.9804 14.0751 10.0358C14.0751 10.0911 14.045 10.1413 13.9849 10.2415L13.0037 11.8777C12.9468 11.9726 12.9184 12.0201 12.8725 12.0461C12.8267 12.072 12.7713 12.072 12.6607 12.072H10.6704C10.5598 12.072 10.5045 12.072 10.4586 12.098C10.4128 12.1239 10.3843 12.1714 10.3274 12.2662L9.33825 13.9142C9.28133 14.009 9.25287 14.0564 9.20703 14.0823C9.16118 14.1083 9.10588 14.1083 8.99529 14.1083H7.00486C6.89426 14.1083 6.83896 14.1083 6.79312 14.0823C6.74727 14.0564 6.71881 14.009 6.6619 13.9142L5.67273 12.2662C5.61581 12.1714 5.58735 12.1239 5.54151 12.098C5.49566 12.072 5.44036 12.072 5.32977 12.072H3.33945C3.2288 12.072 3.17347 12.072 3.12761 12.0461C3.08176 12.0201 3.0533 11.9726 2.9964 11.8777L2.0152 10.2415C1.9551 10.1413 1.92505 10.0911 1.92505 10.0358C1.92505 9.9804 1.9551 9.93029 2.0152 9.83006L2.98951 8.20528C3.04963 8.10502 3.07969 8.0549 3.07969 7.99951C3.07968 7.94413 3.04961 7.89401 2.98946 7.79377L2.01529 6.17011C1.95514 6.06987 1.92507 6.01975 1.92507 5.96437C1.92506 5.90899 1.95512 5.85886 2.01524 5.7586L2.9964 4.1224C3.0533 4.0275 3.08176 3.98005 3.12761 3.95408C3.17347 3.92811 3.2288 3.92811 3.33945 3.92811H5.32977C5.44036 3.92811 5.49566 3.92811 5.54151 3.90216C5.58735 3.87621 5.61581 3.82879 5.67273 3.73397L6.6619 2.08599C6.71881 1.99116 6.74727 1.94375 6.79312 1.9178C6.83896 1.89185 6.89426 1.89185 7.00486 1.89185H8.99529C9.10588 1.89185 9.16118 1.89185 9.20703 1.9178C9.25287 1.94375 9.28133 1.99116 9.33825 2.08599L10.3274 3.73397C10.3843 3.82879 10.4128 3.87621 10.4586 3.90216C10.5045 3.92811 10.5598 3.92811 10.6704 3.92811H12.6607C12.7713 3.92811 12.8267 3.92811 12.8725 3.95408C12.9184 3.98005 12.9468 4.0275 13.0037 4.1224L13.9849 5.7586C14.045 5.85886 14.0751 5.90899 14.0751 5.96437C14.0751 6.01975 14.045 6.06987 13.9849 6.17011L13.0107 7.79377Z',
|
|
214
|
+
],
|
|
203
215
|
external: 'M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5',
|
|
204
216
|
session: 'M4 5h16v14H4zM8 10l3 2-3 2M13 15h3',
|
|
205
217
|
stop: 'M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zM9.5 9.5h5v5h-5z',
|
|
@@ -212,18 +224,23 @@ window.__ModuleLoader__.load({
|
|
|
212
224
|
queue: 'M4 6h16M4 12h16M4 18h10',
|
|
213
225
|
}
|
|
214
226
|
|
|
227
|
+
// 直接复用的官方图标都是 16×16;其余 derived 图标仍是 24×24,不能混用 viewBox。
|
|
228
|
+
const OFFICIAL_16 = new Set(['chevron-left', 'chevron-right', 'chevron-down', 'chevron-up', 'search', 'plus', 'clock', 'close', 'settings'])
|
|
229
|
+
|
|
215
230
|
function Icon({ name, size = 16 }) {
|
|
231
|
+
const value = ICON_PATHS[name] || ICON_PATHS.question
|
|
232
|
+
const paths = Array.isArray(value) ? value : [value]
|
|
216
233
|
return h('svg', {
|
|
217
|
-
width: size, height: size, viewBox: '0 0 24 24', fill: 'none',
|
|
234
|
+
width: size, height: size, viewBox: OFFICIAL_16.has(name) ? '0 0 16 16' : '0 0 24 24', fill: 'none',
|
|
218
235
|
stroke: 'currentColor', strokeWidth: 1.8, strokeLinecap: 'round', strokeLinejoin: 'round',
|
|
219
236
|
'aria-hidden': 'true',
|
|
220
|
-
}, h('path', {
|
|
237
|
+
}, paths.map((d, index) => h('path', { key: index, d })))
|
|
221
238
|
}
|
|
222
239
|
|
|
223
240
|
const cx = (...names) => names.filter(Boolean).join(' ')
|
|
224
241
|
|
|
225
242
|
function Btn({ variant = 'ghost', size = 'md', icon, children, className, ...rest }) {
|
|
226
|
-
// className 必须最后合并:之前 ...rest 直接覆盖,导致
|
|
243
|
+
// className 必须最后合并:之前 ...rest 直接覆盖,导致 ConfirmButton 的删除按钮丢掉全部样式
|
|
227
244
|
return h('button', { type: 'button', ...rest, className: cx('dt-btn', 'dt-btn-' + variant, 'dt-btn-' + size, className) },
|
|
228
245
|
icon !== undefined ? h('span', { className: 'dt-btn-icon' }, icon) : null,
|
|
229
246
|
children)
|
|
@@ -438,9 +455,12 @@ window.__ModuleLoader__.load({
|
|
|
438
455
|
}
|
|
439
456
|
}
|
|
440
457
|
|
|
441
|
-
function Modal({ open, title, children, onClose }) {
|
|
458
|
+
function Modal({ open, title, description, footer, className, children, onClose }) {
|
|
442
459
|
const dialog = useRef(null)
|
|
443
460
|
const restoreTo = useRef(null)
|
|
461
|
+
// 与官方 controls.tsx 一致:回调放 ref,父组件轮询重渲染不能重建 effect、抢走弹层里的焦点。
|
|
462
|
+
const close = useRef(onClose)
|
|
463
|
+
close.current = onClose
|
|
444
464
|
useEffect(() => {
|
|
445
465
|
if (!open || typeof document === 'undefined') return undefined
|
|
446
466
|
restoreTo.current = document.activeElement
|
|
@@ -452,7 +472,7 @@ window.__ModuleLoader__.load({
|
|
|
452
472
|
;(first || node).focus()
|
|
453
473
|
}, 0)
|
|
454
474
|
const onKey = (event) => {
|
|
455
|
-
if (event.key === 'Escape') { event.preventDefault();
|
|
475
|
+
if (event.key === 'Escape') { event.preventDefault(); close.current(); return }
|
|
456
476
|
if (event.key === 'Tab' && dialog.current) trapTab(event, dialog.current)
|
|
457
477
|
}
|
|
458
478
|
document.addEventListener('keydown', onKey)
|
|
@@ -462,38 +482,70 @@ window.__ModuleLoader__.load({
|
|
|
462
482
|
const back = restoreTo.current
|
|
463
483
|
if (back && typeof back.focus === 'function') { try { back.focus() } catch {} }
|
|
464
484
|
}
|
|
465
|
-
}, [open
|
|
485
|
+
}, [open])
|
|
466
486
|
if (!open) return null
|
|
467
487
|
// class 必须与移植来的官方 CSS 对齐:dt-modal-root / dt-modal-mask / dt-modal-header
|
|
468
488
|
return h('div', { className: 'dt-modal-root' },
|
|
469
489
|
h('div', { className: 'dt-modal-mask', role: 'presentation', onClick: onClose }),
|
|
470
490
|
h('div', {
|
|
471
491
|
ref: dialog, tabIndex: -1,
|
|
472
|
-
className: 'dt-modal', role: 'dialog', 'aria-modal': 'true',
|
|
492
|
+
className: cx('dt-modal', className), role: 'dialog', 'aria-modal': 'true',
|
|
473
493
|
'aria-label': typeof title === 'string' ? title : undefined,
|
|
474
494
|
},
|
|
475
495
|
h('div', { className: 'dt-modal-header' },
|
|
476
496
|
h('span', { className: 'dt-title' }, title),
|
|
477
497
|
h('button', { type: 'button', className: 'dt-modal-close', onClick: onClose, 'aria-label': '关闭' }, h(Icon, { name: 'close' }))),
|
|
478
|
-
h('
|
|
498
|
+
description ? h('p', { className: 'dt-modal-description' }, description) : null,
|
|
499
|
+
children !== undefined && children !== null ? h('div', { className: 'dt-modal-body' }, children) : null,
|
|
500
|
+
footer !== undefined ? h('div', { className: 'dt-modal-footer' }, footer) : null))
|
|
479
501
|
}
|
|
480
502
|
|
|
481
|
-
/**
|
|
482
|
-
function
|
|
483
|
-
const [
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
onConfirm()
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
503
|
+
/** 官方 ConfirmButton 动线:触发按钮只开 Modal,取消不执行,确认期间 busy 防重复。 */
|
|
504
|
+
function ConfirmButton({ label, confirmLabel = '确定执行', title = confirmLabel, message, onConfirm, variant = 'ghost', icon, size }) {
|
|
505
|
+
const [open, setOpen] = useState(false)
|
|
506
|
+
const [busy, setBusy] = useState(false)
|
|
507
|
+
const busyRef = useRef(false)
|
|
508
|
+
const close = useCallback(() => setOpen(false), [])
|
|
509
|
+
const confirm = async () => {
|
|
510
|
+
// state 还没来得及重渲染时也可能连点;同步 ref 是第二道锁。
|
|
511
|
+
if (busyRef.current) return false
|
|
512
|
+
busyRef.current = true
|
|
513
|
+
setBusy(true)
|
|
514
|
+
try {
|
|
515
|
+
const done = await onConfirm()
|
|
516
|
+
if (done) setOpen(false)
|
|
517
|
+
return done
|
|
518
|
+
} finally {
|
|
519
|
+
busyRef.current = false
|
|
520
|
+
setBusy(false)
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
return h(React.Fragment, null,
|
|
524
|
+
h(Btn, {
|
|
525
|
+
variant,
|
|
526
|
+
size,
|
|
527
|
+
icon,
|
|
528
|
+
'aria-label': label,
|
|
529
|
+
'aria-haspopup': 'dialog',
|
|
530
|
+
onClick: () => setOpen(true),
|
|
531
|
+
}, label),
|
|
532
|
+
h(Modal, {
|
|
533
|
+
open,
|
|
534
|
+
title,
|
|
535
|
+
description: message || ('确定要执行「' + label + '」操作吗?'),
|
|
536
|
+
onClose: close,
|
|
537
|
+
children: null,
|
|
538
|
+
footer: h(React.Fragment, null,
|
|
539
|
+
h(Btn, { variant: 'ghost', onClick: close }, '取消'),
|
|
540
|
+
h(Btn, {
|
|
541
|
+
variant: 'primary',
|
|
542
|
+
className: cx('dt-danger', busy && 'dt-btn-busy'),
|
|
543
|
+
disabled: busy,
|
|
544
|
+
'aria-label': confirmLabel,
|
|
545
|
+
'aria-busy': busy ? 'true' : undefined,
|
|
546
|
+
onClick: confirm,
|
|
547
|
+
}, confirmLabel)),
|
|
548
|
+
}))
|
|
497
549
|
}
|
|
498
550
|
|
|
499
551
|
const watcherId = (w) => (w && w.id) || String((w && w.repo) || '') + '#' + String((w && w.sessionId) || '')
|
|
@@ -803,19 +855,14 @@ window.__ModuleLoader__.load({
|
|
|
803
855
|
const bottom = anchor ? Math.max(8, (window.innerHeight || 800) - anchor.y + 8) : 64
|
|
804
856
|
|
|
805
857
|
const act = async (w, action) => {
|
|
806
|
-
|
|
807
|
-
const ok = typeof window !== 'undefined' && typeof window.confirm === 'function'
|
|
808
|
-
? window.confirm('删除主理鱼 ' + (w.repo || '') + '?')
|
|
809
|
-
: true
|
|
810
|
-
if (!ok) return
|
|
811
|
-
}
|
|
858
|
+
// 删除只走 ConfirmButton + Modal;不要再叠一层原生确认框(同一动作问两次)。
|
|
812
859
|
// 审核 M4:两层空 catch 让写操作遇 409/404/503/断网时**完全静默** ——
|
|
813
860
|
// 界面不变、无提示,客户以为按钮坏了。失败必须说出来。
|
|
814
861
|
try {
|
|
815
862
|
await call('/watch', { method: 'POST', body: JSON.stringify({ action, id: watcherId(w) }) })
|
|
816
863
|
} catch (error) {
|
|
817
864
|
setOrbitError(String((error && error.message) || error).slice(0, 160))
|
|
818
|
-
return
|
|
865
|
+
return false
|
|
819
866
|
}
|
|
820
867
|
try {
|
|
821
868
|
const body = await call('/state')
|
|
@@ -824,6 +871,8 @@ window.__ModuleLoader__.load({
|
|
|
824
871
|
} catch (error) {
|
|
825
872
|
setOrbitError('写成功了,但刷新列表失败:' + String((error && error.message) || error).slice(0, 120))
|
|
826
873
|
}
|
|
874
|
+
// 刷新失败不等于删除失败:动作已成功,确认框仍应关闭。
|
|
875
|
+
return true
|
|
827
876
|
}
|
|
828
877
|
|
|
829
878
|
// 悬浮面板也走移植来的 dt-* 设计系统(以前这里是一套自成体系的 inline style,
|
|
@@ -875,8 +924,9 @@ window.__ModuleLoader__.load({
|
|
|
875
924
|
h(Btn, { size: 'sm', variant: 'ghost', onClick: () => act(w, 'poll') }, '立刻'),
|
|
876
925
|
h(Btn, { size: 'sm', variant: 'ghost', onClick: () => act(w, w.enabled ? 'pause' : 'resume') },
|
|
877
926
|
w.enabled ? '暂停' : '恢复'),
|
|
878
|
-
h(
|
|
927
|
+
h(ConfirmButton, {
|
|
879
928
|
label: '删除', confirmLabel: '确认删除', variant: 'ghost', size: 'sm',
|
|
929
|
+
icon: h(Icon, { name: 'trash' }),
|
|
880
930
|
onConfirm: () => act(w, 'delete'),
|
|
881
931
|
})))
|
|
882
932
|
})
|
|
@@ -982,9 +1032,14 @@ window.__ModuleLoader__.load({
|
|
|
982
1032
|
for (const item of trace.absorbed || []) events.push({ at: item.at, label: '被冷却期吸收' })
|
|
983
1033
|
for (const item of trace.wakes || []) events.push({ at: item.at, label: item.ok ? '唤醒成功' : '唤醒失败:' + (item.reason || '未知') })
|
|
984
1034
|
events.sort((a, b) => String(a.at || '').localeCompare(String(b.at || '')))
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
1035
|
+
// 官方 Thread/ConfigHistory 是「一个事件一个 li」,不是一整个 trace 里塞一叠 foot。
|
|
1036
|
+
return [
|
|
1037
|
+
h('li', { className: 'dt-event', key: 'head' },
|
|
1038
|
+
h('div', { className: 'dt-event-head' }, '#' + trace.number + ' @ ' + (trace.repo || '?') + ':' + trace.verdict)),
|
|
1039
|
+
...events.map((event, index) => h('li', { className: 'dt-event', key: index },
|
|
1040
|
+
h('div', { className: 'dt-event-text' }, event.label),
|
|
1041
|
+
h('div', { className: 'dt-event-foot' }, event.at))),
|
|
1042
|
+
]
|
|
988
1043
|
}))
|
|
989
1044
|
}
|
|
990
1045
|
|
|
@@ -1017,6 +1072,17 @@ window.__ModuleLoader__.load({
|
|
|
1017
1072
|
const [goalDraft, setGoalDraft] = useState('')
|
|
1018
1073
|
const [goalTouched, setGoalTouched] = useState(false)
|
|
1019
1074
|
const [toastView, notify] = useToast()
|
|
1075
|
+
// 三处复制共用同一个成功/失败出口:禁止剪贴板时不能假报「已复制」。
|
|
1076
|
+
const copyText = async (text, successMessage) => {
|
|
1077
|
+
try {
|
|
1078
|
+
await navigator.clipboard.writeText(text)
|
|
1079
|
+
notify(successMessage, 'info')
|
|
1080
|
+
return true
|
|
1081
|
+
} catch (error) {
|
|
1082
|
+
notify('复制失败:' + String((error && error.message) || error || '请手动选中文本'), 'error')
|
|
1083
|
+
return false
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1020
1086
|
const [editing, setEditing] = useState(null)
|
|
1021
1087
|
const [draft, setDraft] = useState({})
|
|
1022
1088
|
// 审核 M2:记下「这次编辑真的改过哪些字段」—— 保存时只发改过的,
|
|
@@ -1049,6 +1115,11 @@ window.__ModuleLoader__.load({
|
|
|
1049
1115
|
const [giteeToken, setGiteeToken] = useState('')
|
|
1050
1116
|
// 判定页内联追溯结果(官方 Thread 详情最小吸收):不再只塞进一条 Toast。
|
|
1051
1117
|
const [traceResult, setTraceResult] = useState(null)
|
|
1118
|
+
// 去设置页时必须同时定位分区;只切 Tab 会把人留在上次看的分区(官方 settingsRoute(group) 的最小等价)。
|
|
1119
|
+
const openSettings = (section) => {
|
|
1120
|
+
setSettingsSection(section)
|
|
1121
|
+
setTab('settings')
|
|
1122
|
+
}
|
|
1052
1123
|
// 建议规则弹层:给"叫醒了没回音"一个下一步动作(只提供可复制的规则,不替客户写仓库文件)
|
|
1053
1124
|
|
|
1054
1125
|
// 「我现在手上有没有能渲染的数据」。判断依据必须是**当前 snap**,不是"以前拿到过一次" ——
|
|
@@ -1102,13 +1173,14 @@ window.__ModuleLoader__.load({
|
|
|
1102
1173
|
const run = async (work, done) => {
|
|
1103
1174
|
// 审核 T22 B3:上一件事没跑完时点了会**静默丢弃**(界面毫无反应,客户以为按钮坏了)。
|
|
1104
1175
|
// 至少说一句「还在处理」—— 不说的话没人知道该等。
|
|
1105
|
-
if (busyRef.current) { setNotice({ ok: false, text: '上一件事还在处理,请稍等再点' }); return }
|
|
1176
|
+
if (busyRef.current) { setNotice({ ok: false, text: '上一件事还在处理,请稍等再点' }); return false }
|
|
1106
1177
|
busyRef.current = true
|
|
1107
1178
|
setNotice(null)
|
|
1108
1179
|
try {
|
|
1109
1180
|
await work()
|
|
1110
1181
|
if (done) notify(done)
|
|
1111
1182
|
await load()
|
|
1183
|
+
return true
|
|
1112
1184
|
} catch (error) {
|
|
1113
1185
|
const text = String((error && error.message) || error)
|
|
1114
1186
|
setNotice({ ok: false, text })
|
|
@@ -1116,6 +1188,7 @@ window.__ModuleLoader__.load({
|
|
|
1116
1188
|
// 审核 T22 B3:失败后不回读 —— 批量操作「一半成功一半失败」时 UI 停在旧状态,
|
|
1117
1189
|
// 客户看到的是「全都失败了」。回读一次,让已经成功的那些如实显示。
|
|
1118
1190
|
try { await load() } catch { /* 回读失败不影响错误提示本身 */ }
|
|
1191
|
+
return false
|
|
1119
1192
|
} finally {
|
|
1120
1193
|
busyRef.current = false
|
|
1121
1194
|
}
|
|
@@ -1397,12 +1470,12 @@ window.__ModuleLoader__.load({
|
|
|
1397
1470
|
const parts = splitErrorText(watcher.lastError)
|
|
1398
1471
|
// 错误光说「为什么」不够,要能点一下就到「下一步」(服务端已给 kind)
|
|
1399
1472
|
const FIX = {
|
|
1400
|
-
auth: { label: '去填 token', onClick: () =>
|
|
1473
|
+
auth: { label: '去填 token', onClick: () => openSettings('creds') },
|
|
1401
1474
|
moved: { label: '改仓库地址', onClick: () => setTab('trigger') },
|
|
1402
1475
|
notfound: { label: '改仓库地址', onClick: () => setTab('trigger') },
|
|
1403
|
-
permission: { label: '去填 token', onClick: () =>
|
|
1476
|
+
permission: { label: '去填 token', onClick: () => openSettings('creds') },
|
|
1404
1477
|
// 本地解析错误:重试没用,只能让人把这段贴出来
|
|
1405
|
-
'local-parse': { label: '看诊断', onClick: () =>
|
|
1478
|
+
'local-parse': { label: '看诊断', onClick: () => openSettings('diagnose') },
|
|
1406
1479
|
network: { label: '立刻重试', onClick: () => act(watcher, 'poll') },
|
|
1407
1480
|
ratelimit: { label: '立刻重试', onClick: () => act(watcher, 'poll') },
|
|
1408
1481
|
gateway: { label: '立刻重试', onClick: () => act(watcher, 'poll') },
|
|
@@ -1424,7 +1497,7 @@ window.__ModuleLoader__.load({
|
|
|
1424
1497
|
label: watcher.enabled ? '暂停' : '恢复',
|
|
1425
1498
|
onClick: () => act(watcher, watcher.enabled ? 'pause' : 'resume'),
|
|
1426
1499
|
}, watcher.enabled ? '暂停' : '恢复'),
|
|
1427
|
-
h(
|
|
1500
|
+
h(ConfirmButton, {
|
|
1428
1501
|
size: 'sm', variant: 'ghost', icon: h(Icon, { name: 'trash' }), label: '删除',
|
|
1429
1502
|
confirmLabel: '确认删除', onConfirm: () => act(watcher, 'delete'),
|
|
1430
1503
|
})))
|
|
@@ -1678,9 +1751,9 @@ window.__ModuleLoader__.load({
|
|
|
1678
1751
|
: h('ul', { className: 'dt-list' }, visible.map(row))),
|
|
1679
1752
|
]
|
|
1680
1753
|
|
|
1681
|
-
// 判定日志(对应官方 eval
|
|
1682
|
-
//
|
|
1683
|
-
//
|
|
1754
|
+
// 判定日志(对应官方 eval 页):每轮的唤醒结果、跳过原因、被过滤记录,一次看全。
|
|
1755
|
+
// 结构对齐官方 rows.tsx DecisionLine:ul.dt-list > li.dt-row.dt-ticket;
|
|
1756
|
+
// ol.dt-timeline 只保留给追溯与运行时事件,不再把不同语义混成一种列表。
|
|
1684
1757
|
// 跳过原因分布:把「为什么没叫醒」做成可读的统计(客户最常问的问题)
|
|
1685
1758
|
const reasonTotals = (() => {
|
|
1686
1759
|
const merged = {}
|
|
@@ -1758,22 +1831,28 @@ window.__ModuleLoader__.load({
|
|
|
1758
1831
|
h('p', { className: 'dt-step-detail' }, '添加一条主理鱼之后,每轮判定都会记在这里:唤醒、仅观察,或跳过及其原因。'),
|
|
1759
1832
|
h('div', { className: 'dt-actions' },
|
|
1760
1833
|
h(Btn, { size: 'sm', variant: 'primary', onClick: () => setTab('trigger') }, '去添加第一条')))
|
|
1761
|
-
:
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
})
|
|
1834
|
+
: (() => {
|
|
1835
|
+
// 跨守按时间倒序合并,再按「今天 / 昨天 / 具体日期」分组:
|
|
1836
|
+
// 每天独立 Section + ul,日期标题不是事件 li,列表语义不再混用。
|
|
1837
|
+
const merged = watchers
|
|
1838
|
+
.flatMap((watcher) => (watcher.history || []).slice(-6).map((entry) => ({ watcher, entry })))
|
|
1839
|
+
.sort((a, b) => String(b.entry.at || '').localeCompare(String(a.entry.at || '')))
|
|
1840
|
+
const groups = []
|
|
1841
|
+
merged.forEach(({ watcher, entry }, index) => {
|
|
1842
|
+
const day = String(entry.at || '').slice(0, 10)
|
|
1843
|
+
let group = groups[groups.length - 1]
|
|
1844
|
+
if (!group || group.day !== day) {
|
|
1845
|
+
group = { day, label: dayLabel(entry.at), items: [] }
|
|
1846
|
+
groups.push(group)
|
|
1847
|
+
}
|
|
1848
|
+
group.items.push({ watcher, entry, index })
|
|
1849
|
+
})
|
|
1850
|
+
return groups.map((group) => h(Section, {
|
|
1851
|
+
key: 'day-' + group.day,
|
|
1852
|
+
title: h('span', { className: 'dt-timeline-day' }, group.label),
|
|
1853
|
+
}, h('ul', { className: 'dt-list' },
|
|
1854
|
+
group.items.map(({ watcher, entry, index }) => eventRow(watcher, entry, index)))))
|
|
1855
|
+
})())
|
|
1777
1856
|
|
|
1778
1857
|
/** 时间线分组标题:今天 / 昨天 / 具体日期(本地时区)。 */
|
|
1779
1858
|
function dayLabel(iso) {
|
|
@@ -1788,22 +1867,32 @@ window.__ModuleLoader__.load({
|
|
|
1788
1867
|
}
|
|
1789
1868
|
|
|
1790
1869
|
function eventRow(watcher, entry, index) {
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1870
|
+
const label = entry.ok ? '已唤醒' : entry.reason === 'observe' ? '仅观察(未唤醒)' : '跳过:' + (entry.reason || '未知')
|
|
1871
|
+
const mark = entry.ok
|
|
1872
|
+
? { state: 'done', icon: 'decision', label: '已唤醒' }
|
|
1873
|
+
: entry.reason === 'observe'
|
|
1874
|
+
? { state: 'idle', icon: 'clock', label: '仅观察' }
|
|
1875
|
+
: { state: 'warning', icon: 'alert', label: '跳过' }
|
|
1876
|
+
const reason = entry.ok ? '判定通过' : entry.reason === 'observe' ? '仅观察(未唤醒)' : '原因:' + (entry.reason || '未知')
|
|
1877
|
+
const numbers = (entry.numbers || []).map((n) => '#' + n).join(' ')
|
|
1878
|
+
return h('li', {
|
|
1879
|
+
key: watcher.repo + '#' + watcher.sessionId + entry.at + index,
|
|
1880
|
+
className: 'dt-row dt-link dt-ticket',
|
|
1881
|
+
'data-state': mark.state,
|
|
1882
|
+
},
|
|
1883
|
+
h('div', { className: 'dt-ticket-stage' },
|
|
1884
|
+
h('span', { className: 'dt-stage', 'data-state': mark.state },
|
|
1885
|
+
h(Icon, { name: mark.icon, size: 14 }), mark.label)),
|
|
1886
|
+
h('div', { className: 'dt-ticket-body' },
|
|
1887
|
+
// dt-event-head 仅为旧主题兼容保留;语义与布局均以 DecisionLine 的 dt-row-title 为准。
|
|
1888
|
+
h('div', { className: 'dt-row-title' },
|
|
1889
|
+
h('div', { className: 'dt-event-head' },
|
|
1890
|
+
h('strong', { className: 'dt-event-actor' }, watcher.repo))),
|
|
1891
|
+
h('div', { className: 'dt-row-quote dt-line' },
|
|
1892
|
+
label, ' · ', h('span', { className: 'dt-event-nums' }, numbers || '无编号')),
|
|
1893
|
+
h('div', { className: 'dt-row-meta dt-line' },
|
|
1894
|
+
h('span', { className: 'dt-line-text' }, reason),
|
|
1895
|
+
h('time', { className: 'dt-event-time', dateTime: entry.at, title: entry.at }, ageText(entry.at)))))
|
|
1807
1896
|
}
|
|
1808
1897
|
|
|
1809
1898
|
// 迷你时间线:回答"为什么这一轮没叫醒我"
|
|
@@ -1815,19 +1904,19 @@ window.__ModuleLoader__.load({
|
|
|
1815
1904
|
},
|
|
1816
1905
|
watchers.length === 0
|
|
1817
1906
|
? h(Hint, null, '还没有守。添加一条之后,这里会记录每次唤醒、攒着、限流、回收。')
|
|
1818
|
-
: h('
|
|
1907
|
+
: h('ol', { className: 'dt-timeline' }, watchers.flatMap((watcher) => (watcher.events || []).slice().reverse().map((event, index) => h('li', {
|
|
1819
1908
|
key: watcher.repo + '-ev' + index,
|
|
1820
|
-
className: 'dt-
|
|
1909
|
+
className: 'dt-event',
|
|
1821
1910
|
},
|
|
1822
|
-
h('div', { className: 'dt-
|
|
1823
|
-
h(
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
(
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1911
|
+
h('div', { className: 'dt-event-head' },
|
|
1912
|
+
h(Tag, { tone: event.kind === 'wake' ? 'success' : event.kind === 'wake-failed' ? 'danger' : 'outline' },
|
|
1913
|
+
event.kind + (Number(event.count) > 1 ? ' ×' + event.count : '')),
|
|
1914
|
+
(Number(event.count) > 1 && event.since)
|
|
1915
|
+
? h('span', { className: 'dt-row-meta' }, '持续 ' + durationText(event.since, event.at))
|
|
1916
|
+
: null,
|
|
1917
|
+
h('span', { className: 'dt-row-meta' }, ageText(event.at))),
|
|
1918
|
+
h('div', { className: 'dt-event-text' }, watcher.repo + ' · ' + event.text),
|
|
1919
|
+
h('div', { className: 'dt-event-foot' }, event.at))))))
|
|
1831
1920
|
|
|
1832
1921
|
// 按仓库汇总:守多个仓库时先看哪个健康,再看明细(渐进披露)
|
|
1833
1922
|
const problemCount = watchers.filter(hasProblem).length
|
|
@@ -1957,7 +2046,7 @@ window.__ModuleLoader__.load({
|
|
|
1957
2046
|
h(KeyValues, { rows: [
|
|
1958
2047
|
['当前版本', (update && update.current) || CLIENT_VERSION],
|
|
1959
2048
|
['npm 最新', !update ? '检测中…' : update.error ? '检测失败 · ' + update.error : (update.latest || '未知')],
|
|
1960
|
-
['状态', !update ? '…' : update.hasUpdate ? '有新版本,可以升级' : '已是最新'],
|
|
2049
|
+
['状态', !update ? '…' : update.error ? '检查失败' : update.hasUpdate ? '有新版本,可以升级' : '已是最新'],
|
|
1961
2050
|
] }),
|
|
1962
2051
|
update && update.hasUpdate
|
|
1963
2052
|
? h('div', null,
|
|
@@ -1967,14 +2056,7 @@ window.__ModuleLoader__.load({
|
|
|
1967
2056
|
size: 'sm',
|
|
1968
2057
|
// 审核 T24 W2:以前点了零反馈,writeText 的 rejection 也没人接 —— 客户不知道复制没成。
|
|
1969
2058
|
// 对照旁边「复制诊断信息」:await + notify 才是正例。
|
|
1970
|
-
onClick:
|
|
1971
|
-
try {
|
|
1972
|
-
await navigator.clipboard.writeText(update.command)
|
|
1973
|
-
notify('升级命令已复制', 'info')
|
|
1974
|
-
} catch (error) {
|
|
1975
|
-
notify('复制失败(浏览器可能禁止了剪贴板):' + String((error && error.message) || error), 'error')
|
|
1976
|
-
}
|
|
1977
|
-
},
|
|
2059
|
+
onClick: () => copyText(update.command, '升级命令已复制'),
|
|
1978
2060
|
}, '复制命令')))
|
|
1979
2061
|
: null,
|
|
1980
2062
|
h('div', { className: 'dt-actions' },
|
|
@@ -1989,8 +2071,7 @@ window.__ModuleLoader__.load({
|
|
|
1989
2071
|
try {
|
|
1990
2072
|
const payload = await call('/diagnose')
|
|
1991
2073
|
const text = String((payload && payload.text) || '')
|
|
1992
|
-
|
|
1993
|
-
notify('诊断信息已复制(' + text.split(String.fromCharCode(10)).length + ' 行)', 'info')
|
|
2074
|
+
await copyText(text, '诊断信息已复制(' + text.split(String.fromCharCode(10)).length + ' 行)')
|
|
1994
2075
|
} catch (error) {
|
|
1995
2076
|
notify('生成诊断失败:' + String((error && error.message) || error), 'error')
|
|
1996
2077
|
}
|
|
@@ -2056,13 +2137,8 @@ window.__ModuleLoader__.load({
|
|
|
2056
2137
|
}, [])
|
|
2057
2138
|
|
|
2058
2139
|
useEffect(() => {
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
Promise.resolve(call('/update'))
|
|
2062
|
-
.then((value) => { if (alive) setUpdate(value) })
|
|
2063
|
-
.catch(() => {})
|
|
2064
|
-
} catch { /* 宿主早期渲染时 fetch 可能还不存在,忽略即可 */ }
|
|
2065
|
-
return () => { alive = false }
|
|
2140
|
+
// 初始检查与手动「重新检查」共用一条错误路径:失败要显示「检查失败」,不能吞掉后永远检测中。
|
|
2141
|
+
checkUpdate(false)
|
|
2066
2142
|
}, [])
|
|
2067
2143
|
|
|
2068
2144
|
|
|
@@ -2260,7 +2336,7 @@ window.__ModuleLoader__.load({
|
|
|
2260
2336
|
update && update.hasUpdate
|
|
2261
2337
|
? h('div', { className: 'dt-banner dt-banner-actions' },
|
|
2262
2338
|
h('span', { className: 'dt-banner-label' }, '有新版本 ' + update.latest + '(当前 ' + update.current + ')'),
|
|
2263
|
-
h('
|
|
2339
|
+
h('button', { className: 'dt-btn dt-btn-sm dt-btn-outline', type: 'button', onClick: () => openSettings('update') }, '看升级命令'))
|
|
2264
2340
|
: null,
|
|
2265
2341
|
toastView,
|
|
2266
2342
|
snap.error
|
|
@@ -2287,14 +2363,7 @@ window.__ModuleLoader__.load({
|
|
|
2287
2363
|
h(Btn, {
|
|
2288
2364
|
size: 'sm',
|
|
2289
2365
|
variant: 'primary',
|
|
2290
|
-
onClick:
|
|
2291
|
-
try {
|
|
2292
|
-
await navigator.clipboard.writeText(AGENTS_SNIPPET)
|
|
2293
|
-
notify('规则已复制,粘贴到 AGENTS.md 末尾即可', 'info')
|
|
2294
|
-
} catch {
|
|
2295
|
-
notify('复制失败:请手动选中上面的文本', 'error')
|
|
2296
|
-
}
|
|
2297
|
-
},
|
|
2366
|
+
onClick: () => copyText(AGENTS_SNIPPET, '规则已复制,粘贴到 AGENTS.md 末尾即可'),
|
|
2298
2367
|
}, '复制这段规则'),
|
|
2299
2368
|
h(Btn, { size: 'sm', variant: 'ghost', onClick: () => setGlossary(false) }, '关闭'))) : null,
|
|
2300
2369
|
h(Modal, { open: glossary === true, title: '主理鱼术语表', onClose: () => setGlossary(false) },
|
package/docs/README.md
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
| [为什么做这个产品](为什么做这个产品.md) | **动任何功能之前先读**:谁在痛、三条不变量(不打断 / 不留手尾 / 不失控)、明确不做什么 |
|
|
14
14
|
| [对比-官方原型](对比-官方原型.md) | 想知道和官方 `dsh-superagent-prototype` 的功能差距、哪些该抄哪些不该 |
|
|
15
15
|
| [official-decomp/](official-decomp/01-structure-tree.md) | **完整官方结构树**:运行时/事件源/面板/提示词运维逐文件解构,以及已落地与待吸收清单 |
|
|
16
|
+
| [ui-decomp/](ui-decomp/03-gap-map.md) | **UI 复用主任务**:DSH 主库素材、superagent 控件、逐页差距、宿主原语 smoke 与实施回写 |
|
|
16
17
|
| [competitive-analysis](competitive-analysis.md) | 想知道和 Sweep / CodeRabbit 这类工具的差别 |
|
|
17
18
|
| [deepseek-papers](deepseek-papers.md) | 想知道设计取舍背后的研究依据 |
|
|
18
19
|
| [真机验证清单](真机验证清单.md) | 重启后三条命令 + 三个动作,5 分钟确认新代码在跑 |
|
package/lib/index.js
CHANGED
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
|
|
48
48
|
export const name = 'dsh-session-superagent'
|
|
49
49
|
/** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
|
|
50
|
-
export const SERVER_VERSION = '0.9.
|
|
50
|
+
export const SERVER_VERSION = '0.9.265'
|
|
51
51
|
export const inject = ['tools', 'agents', 'webServer']
|
|
52
52
|
/** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
|
|
53
53
|
// 本进程启动时刻:用来区分「刚重启还没轮到」与「定时器真的丢了」
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-session-superagent",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.265",
|
|
4
4
|
"description": "Session-level superagent for DeepSeek Harness: watch a GitHub repository and wake a session when something needs doing. Credentials never reach the model.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|