dsh-ui-controller 0.2.4 → 0.2.6

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.
Files changed (4) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +17 -1
  3. package/client.js +2738 -2375
  4. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,29 @@
2
2
 
3
3
  Notable changes to `dsh-ui-controller`.
4
4
 
5
+ ## 0.2.6 — 2026-11-17
6
+ ### Added
7
+ - **Chat scroll damping** (user m21832: 「uic里加个功能,给聊天页的滑动加个阻尼」).
8
+ A wheel over `[data-conversation-scroll]` is eased with an exponential step in
9
+ `requestAnimationFrame` instead of jumping; `deltaMode` 0/1/2 are normalised
10
+ (px / 16px per line / 90% of the viewport), and strength 1–5 maps to
11
+ `k = [0.10, 0.14, 0.18, 0.24, 0.32]`. New settings group 对话区滚动 / Chat
12
+ scrolling with two live controls: `chatScroll.damping` (default on) and a
13
+ strength stepper (default 3).
14
+ - The easing never fights the host: any `scroll` landing more than 2px from the
15
+ value we last wrote cancels it (autofollow during streaming wins), top/bottom
16
+ wheels are left to the page so native overscroll survives, and nested scrollers
17
+ (terminals, overflowing code blocks, inner lists) keep their own wheel.
18
+ `prefers-reduced-motion: reduce` installs no listener at all.
19
+
20
+ ## 0.2.5 — 2026-11-17
21
+ ### Changed
22
+ - The 127 module-level declarations now live inside the loader factory: the
23
+ harness concatenates every plugin's client into one shared module, so a bare
24
+ top-level `const NS` can collide with another plugin and take the whole page
25
+ down (`Identifier 'NS' has already been declared`). Top level is comments and
26
+ the `load()` call only.
27
+
5
28
  ## 0.2.4 — 2026-11-15
6
29
  ### Changed
7
30
  - The launcher never shows a folded count anymore (user m20715); the counter
package/README.md CHANGED
@@ -87,6 +87,22 @@ is missing, this is the plugin that answers that.
87
87
  teardown; a row we cannot identify is left alone. Nothing else is touched: no
88
88
  custom panel rows, no icon replacement, and the settings dialog's own nav
89
89
  width is left alone.
90
+ 7. **Chat scrolling: wheel damping.** A wheel over the chat pane is eased instead of
91
+ jumping: each tick is normalised (`deltaMode` 0 px / 1 ×16 px per line / 2 ×90% of
92
+ the viewport), added to a target `scrollTop`, and stepped toward it in
93
+ `requestAnimationFrame` with an exponential factor. Strength 1–5 maps to
94
+ `k = [0.10, 0.14, 0.18, 0.24, 0.32]` (default 3), and `chatScroll.damping`
95
+ (default on) switches it off entirely; both apply live. The container is the
96
+ host's `[data-conversation-scroll]` — the class beside it is hashed and is never
97
+ used. Three rules keep it from fighting the page: **the host always wins** (a
98
+ `scroll` that lands more than 2px from the value we last wrote cancels the easing
99
+ and re-syncs — autofollow while streaming keeps working), **the page is never
100
+ trapped** (up at the top or down at the bottom leaves the event alone, so native
101
+ overscroll stays), and **nested scrollers keep their own wheel** (a terminal, an
102
+ overflowing code block or an inner list is not ours to slow down). Keys
103
+ (PageUp/PageDown/Home/End/arrows/space), pointerdown, touchstart and window blur
104
+ all cancel immediately; `prefers-reduced-motion: reduce` installs no listener at
105
+ all.
90
106
 
91
107
  ## What it deliberately does **not** do
92
108
 
@@ -186,7 +202,7 @@ Two sentences that belong in any answer about ordering:
186
202
  node --check client.js
187
203
  node --check index.js
188
204
  node --check test/classify.test.mjs
189
- node test/classify.test.mjs # expect: PASS — 43 groups
205
+ node test/classify.test.mjs # expect: PASS — 44 groups
190
206
  node ..\..\cangku\tmp\261114_gate_ui_controller.mjs # static gate, separate script
191
207
  ```
192
208