dsh-vt-uiux-enhancer 1.1.0 → 1.1.1
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/DESIGN.md +1 -1
- package/README.md +3 -3
- package/client.js +10 -29
- package/package.json +1 -1
package/DESIGN.md
CHANGED
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
| 输入框「+」 | 去掉常驻灰底,默认裸字形,hover 才出底(与麦克风同一个 token);字形缩到与整行同档;再向审查 chip 拉近 8px(视觉间距 4px) | 一行控件里只有它常驻底色,等于把「可点」画成了「已选」;裸字形之后,原先被底板衬住的 11px 加号成了整行最重的图标;12px 盒间距在「裸字形 + 带内距的 chip」之间会读成约 27px,左簇因此被拉散;拉近到视觉 4px 才读成一簇 |
|
|
61
61
|
| 视图切换入口 | 顶部标签行整条移除,header 从 76px 收到 51px;「轨迹」改为状态行第一项(列表图标 + 视图名),在轨迹页原地变成「对话」 | 只有两个视图时,常驻 36px 的标签行 + 右侧「…」是在为低频功能付固定成本;状态行本来就是本会话读数所在,宽度成本为零。入口做成双向的,是因为移除标签行后不能再有第二个「对话」入口 —— 但也不该为回程新开一条 40px 的 header 行 |
|
|
62
62
|
| 队列消息卡片 | 浅灰 `#f5f5f5`(暗色沿用浮层材质) | 它借的是浮层材质上色,浮层改成近白后它和白画布分不开;但它不是浮层 —— 它在画布上叠一层,该用「比画布深一档」而不是「和浮层一样白」 |
|
|
63
|
-
| 长用户消息折叠 | 20 行(19 行正文 + 独占一行的「…」)+ 气泡内底部「展开/收起」;阈值按渲染行数;展开原位 | 参照本机 Codex:省略号单独占一行、按钮留在气泡填充里,气泡才仍读作**一个对象**(按钮放到气泡外会读成第二个对象、第二条消息)。按行数而不是字数,是因为窄窗口下 600 字只排 9 行、宽窗口下能排 30 行 —— 字数阈值在响应式布局里等于没有阈值。按钮文字用 `label-secondary` 而不是应用 disclosure 行的 `label-tertiary`:它坐在气泡浅蓝填充上,13px 下 tertiary 的对比度不足 4:1 |
|
|
63
|
+
| 长用户消息折叠 | 20 行(19 行正文 + 独占一行的「…」)+ 气泡内底部「展开/收起」;阈值按渲染行数;展开原位 | 参照本机 Codex:省略号单独占一行、按钮留在气泡填充里,气泡才仍读作**一个对象**(按钮放到气泡外会读成第二个对象、第二条消息)。按行数而不是字数,是因为窄窗口下 600 字只排 9 行、宽窗口下能排 30 行 —— 字数阈值在响应式布局里等于没有阈值。按钮文字用 `label-secondary` 而不是应用 disclosure 行的 `label-tertiary`:它坐在气泡浅蓝填充上,13px 下 tertiary 的对比度不足 4:1。展开状态**不跨节点保留**:切会话、热更新重挂后重新折叠,不为了"恢复阅读位置"去持有状态 |
|
|
64
64
|
|
|
65
65
|
---
|
|
66
66
|
|
package/README.md
CHANGED
|
@@ -36,16 +36,16 @@ https://vontean.github.io/vt-dsh-plugin/index.json
|
|
|
36
36
|
**npm**
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
dsh plugin --profile <profile> add dsh-vt-uiux-enhancer@1.1.
|
|
39
|
+
dsh plugin --profile <profile> add dsh-vt-uiux-enhancer@1.1.1
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
**Release tarball**
|
|
43
43
|
|
|
44
44
|
到 [Releases](https://github.com/Vontean/vt-dsh-plugin/releases) 下载
|
|
45
|
-
`dsh-vt-uiux-enhancer-1.1.
|
|
45
|
+
`dsh-vt-uiux-enhancer-1.1.1.tgz`,然后:
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
dsh plugin --profile <profile> add /绝对路径/dsh-vt-uiux-enhancer-1.1.
|
|
48
|
+
dsh plugin --profile <profile> add /绝对路径/dsh-vt-uiux-enhancer-1.1.1.tgz
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
## 支持的 DSH 版本
|
package/client.js
CHANGED
|
@@ -43,7 +43,7 @@ window.__ModuleLoader__.load({
|
|
|
43
43
|
'use strict';
|
|
44
44
|
|
|
45
45
|
const PLUGIN_ID = 'dsh-vt-uiux-enhancer';
|
|
46
|
-
const VERSION = '1.1.
|
|
46
|
+
const VERSION = '1.1.1';
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* DSH ships `:root { --dsw-corner-shape: superellipse(1.5) }` and applies it
|
|
@@ -1954,9 +1954,11 @@ ${selector}[data-vt-clamp="expanded"] + .vt-msg-clamp-tail .vt-msg-clamp-more {
|
|
|
1954
1954
|
* actually hide anything (an inline chip inflated a line, or the estimate
|
|
1955
1955
|
* rounded up), the clamp is released. A measured post-condition beats a
|
|
1956
1956
|
* clever formula.
|
|
1957
|
-
* 3.
|
|
1958
|
-
*
|
|
1959
|
-
* message the reader
|
|
1957
|
+
* 3. Expansion lives on the node and nowhere else. Session switches,
|
|
1958
|
+
* compaction and hot reloads re-mount rows, and a re-mounted message
|
|
1959
|
+
* comes back folded — a message the reader opened in the previous
|
|
1960
|
+
* session is not a reading position worth restoring, and keeping a
|
|
1961
|
+
* memory for it would be state this plugin has no business holding.
|
|
1960
1962
|
*
|
|
1961
1963
|
* Failure surface: a missing chevron icon module or a missing
|
|
1962
1964
|
* `react-dom/client` throws into `installBehaviors`, which reports it as a
|
|
@@ -1970,8 +1972,6 @@ ${selector}[data-vt-clamp="expanded"] + .vt-msg-clamp-tail .vt-msg-clamp-more {
|
|
|
1970
1972
|
const TAIL = 'vt-msg-clamp-tail';
|
|
1971
1973
|
/** Settle time: the transcript mutates continuously while a turn streams. */
|
|
1972
1974
|
const SETTLE_MS = 120;
|
|
1973
|
-
/** Expansion memory is bounded so switching sessions cannot grow it forever. */
|
|
1974
|
-
const MEMORY = 400;
|
|
1975
1975
|
|
|
1976
1976
|
const React = require('react');
|
|
1977
1977
|
const reactDom = require('react-dom/client');
|
|
@@ -1989,8 +1989,6 @@ ${selector}[data-vt-clamp="expanded"] + .vt-msg-clamp-tail .vt-msg-clamp-more {
|
|
|
1989
1989
|
);
|
|
1990
1990
|
const label = { open: translate('展开', 'Show more'), close: translate('收起', 'Show less') };
|
|
1991
1991
|
|
|
1992
|
-
/** Expanded flow keys, so the memory survives the re-mounts. */
|
|
1993
|
-
const open = new Set();
|
|
1994
1992
|
/** Live disclosure entries, so dispose removes exactly what we added. */
|
|
1995
1993
|
const entries = new Set();
|
|
1996
1994
|
/** bubble -> entry; a WeakMap keeps dropped rows collectable. */
|
|
@@ -1999,16 +1997,6 @@ ${selector}[data-vt-clamp="expanded"] + .vt-msg-clamp-tail .vt-msg-clamp-more {
|
|
|
1999
1997
|
let published = '';
|
|
2000
1998
|
let revoke = null;
|
|
2001
1999
|
|
|
2002
|
-
const narrowed = () => {
|
|
2003
|
-
while (open.size > MEMORY) open.delete(open.values().next().value);
|
|
2004
|
-
};
|
|
2005
|
-
|
|
2006
|
-
/** Flow key of the row a bubble sits in — the identity that outlives the node. */
|
|
2007
|
-
const flowKey = (bubble) => {
|
|
2008
|
-
const row = bubble.closest('[data-chat-flow-key]');
|
|
2009
|
-
return row ? (row.getAttribute('data-chat-flow-key') || '') : '';
|
|
2010
|
-
};
|
|
2011
|
-
|
|
2012
2000
|
/** The bubble class resolved by the `user-bubble` patch, else its own fallback. */
|
|
2013
2001
|
const bubblePatch = patches.components.find((patch) => patch.id === 'user-bubble');
|
|
2014
2002
|
const bubbleSelector = () => {
|
|
@@ -2092,9 +2080,7 @@ ${selector}[data-vt-clamp="expanded"] + .vt-msg-clamp-tail .vt-msg-clamp-more {
|
|
|
2092
2080
|
bubble.removeAttribute('data-vt-clamp-lines');
|
|
2093
2081
|
};
|
|
2094
2082
|
|
|
2095
|
-
const wire = (bubble, lines
|
|
2096
|
-
const key = flowKey(bubble);
|
|
2097
|
-
|
|
2083
|
+
const wire = (bubble, lines) => {
|
|
2098
2084
|
const more = document.createElement('span');
|
|
2099
2085
|
more.className = MORE;
|
|
2100
2086
|
more.setAttribute('aria-hidden', 'true');
|
|
@@ -2105,7 +2091,7 @@ ${selector}[data-vt-clamp="expanded"] + .vt-msg-clamp-tail .vt-msg-clamp-more {
|
|
|
2105
2091
|
toggle.className = TOGGLE;
|
|
2106
2092
|
const caption = document.createElement('span');
|
|
2107
2093
|
caption.className = 'vt-msg-clamp-label';
|
|
2108
|
-
const icon = chevron(
|
|
2094
|
+
const icon = chevron(false);
|
|
2109
2095
|
toggle.appendChild(caption);
|
|
2110
2096
|
toggle.appendChild(icon.host);
|
|
2111
2097
|
|
|
@@ -2120,7 +2106,7 @@ ${selector}[data-vt-clamp="expanded"] + .vt-msg-clamp-tail .vt-msg-clamp-more {
|
|
|
2120
2106
|
tail.appendChild(more);
|
|
2121
2107
|
tail.appendChild(toggle);
|
|
2122
2108
|
|
|
2123
|
-
const entry = { bubble, tail, toggle, more, icon, caption,
|
|
2109
|
+
const entry = { bubble, tail, toggle, more, icon, caption, lines, expanded: false };
|
|
2124
2110
|
|
|
2125
2111
|
const paint = () => {
|
|
2126
2112
|
bubble.setAttribute(STATE, entry.expanded ? 'expanded' : 'clamped');
|
|
@@ -2136,11 +2122,6 @@ ${selector}[data-vt-clamp="expanded"] + .vt-msg-clamp-tail .vt-msg-clamp-more {
|
|
|
2136
2122
|
event.preventDefault();
|
|
2137
2123
|
event.stopPropagation();
|
|
2138
2124
|
entry.expanded = !entry.expanded;
|
|
2139
|
-
if (entry.key) {
|
|
2140
|
-
if (entry.expanded) open.add(entry.key);
|
|
2141
|
-
else open.delete(entry.key);
|
|
2142
|
-
narrowed();
|
|
2143
|
-
}
|
|
2144
2125
|
paint();
|
|
2145
2126
|
schedule();
|
|
2146
2127
|
});
|
|
@@ -2194,7 +2175,7 @@ ${selector}[data-vt-clamp="expanded"] + .vt-msg-clamp-tail .vt-msg-clamp-more {
|
|
|
2194
2175
|
bubble.setAttribute(STATE, 'none');
|
|
2195
2176
|
continue;
|
|
2196
2177
|
}
|
|
2197
|
-
entry = wire(bubble, lines
|
|
2178
|
+
entry = wire(bubble, lines);
|
|
2198
2179
|
// Measured post-condition: keep the clamp only if it hides text.
|
|
2199
2180
|
if (!entry.expanded && !overflows(bubble)) {
|
|
2200
2181
|
unwire(bubble, entry);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-vt-uiux-enhancer",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "VT UI/UX Enhancer: reversible UI/UX refinements for DeepSeek Harness — palette, elevation, control shapes and motion shipped as patches over DSH's own tokens, slots and styles. Disabling the plugin restores the shipped interface exactly.",
|
|
6
6
|
"license": "MIT",
|