dsh-scrollbar-edge-hit 0.0.0-stage → 1.0.0
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/LICENSE +21 -0
- package/README.md +47 -2
- package/client.js +62 -0
- package/cordis.patch.yml +5 -0
- package/icon.svg +6 -0
- package/index.js +2 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +44 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 agoudbg
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-scrollbar-edge-hit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Makes the **right-edge scrollbars** of the DSH Web UI reachable at the window edge.
|
|
4
|
+
|
|
5
|
+
## The problem
|
|
6
|
+
|
|
7
|
+
The theme draws a 5px custom scrollbar (`--dsh-scrollbar-width: 5px`), and the scroll containers that touch the window's right edge — the conversation page (`.scrollBody`) and the Files side panel (`.body`) — carry `margin-right: 2px`. The scrollbar's draggable strip therefore ends 2px before the window edge, and that strip belongs to the parent column. With the mouse pushed fully against the right edge of the window, the scrollbar cannot be grabbed; you have to back off a pixel or two first.
|
|
8
|
+
|
|
9
|
+
## The fix
|
|
10
|
+
|
|
11
|
+
The plugin re-uses the scrollbar pattern the shipped Schedule page already uses: a **9px scrollbar whose thumb carries a 2px transparent border** (`background-clip: content-box`):
|
|
12
|
+
|
|
13
|
+
- The visible thumb stays a 5px bar floating 2px in from the edge — pixel-for-pixel where it is today.
|
|
14
|
+
- The draggable strip becomes the full 9px and now reaches the window edge, so the mouse slammed to the right edge lands on the scrollbar.
|
|
15
|
+
- `margin-right: 2px` is removed from both containers so the scrollbar sits flush at the edge; `scrollbar-gutter: stable` just reserves 9px instead of 5px.
|
|
16
|
+
|
|
17
|
+
Scope: `[data-conversation-scroll]` (conversation page) and `[data-files-body]` (Files panel) — the two containers whose scrollbar sits at the window's right edge. The sidebar session list, the composer textarea, and dialog scrollers keep their shipped geometry. Those attributes are the stable public hooks the shipped code itself queries, so CSS-module hash changes on rebuild do not break the selectors.
|
|
18
|
+
|
|
19
|
+
A DSH update that changes the scrollbar custom properties (`--dsh-scrollbar-width`, `--dsh-scrollbar-thumb-border`) or the 2px edge offset needs this sheet revisited.
|
|
20
|
+
|
|
21
|
+
## Requirements
|
|
22
|
+
|
|
23
|
+
- DSH `>=0.2.1-rc.5`
|
|
24
|
+
- The DSH Web UI (the plugin's client half targets the `web` platform)
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
From npm, into the profile you boot:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
dsh plugin --profile <profile> add dsh-scrollbar-edge-hit
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Remove it the same way:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
dsh plugin --profile <profile> remove dsh-scrollbar-edge-hit
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
From a local clone of [agou-dsh-plugins](https://github.com/agoudbg/agou-dsh-plugins), install this package directory through the DSH Plugin Manager instead:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
R:\path\to\agou-dsh-plugins\packages\dsh-scrollbar-edge-hit
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
[MIT](./LICENSE)
|
package/client.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({
|
|
2
|
+
id: 'dsh-scrollbar-edge-hit',
|
|
3
|
+
factory(require) {
|
|
4
|
+
const React = require('react');
|
|
5
|
+
const h = React.createElement;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Scrollbar edge hit-area fix.
|
|
9
|
+
*
|
|
10
|
+
* Shipped geometry (ui-conversation `.scrollBody`, ui-sidebar-files
|
|
11
|
+
* `.body`): the scroll container keeps `margin-right: 2px` with the theme
|
|
12
|
+
* default `--dsh-scrollbar-width: 5px`, so the scrollbar's hit strip ends
|
|
13
|
+
* 2px before the window edge. Pushing the mouse fully against the right
|
|
14
|
+
* edge lands on the parent column instead of the scrollbar, and the bar
|
|
15
|
+
* cannot be grabbed there.
|
|
16
|
+
*
|
|
17
|
+
* This sheet re-uses the pattern the shipped Schedule page already uses
|
|
18
|
+
* (`.pageScroll`): a 9px scrollbar whose thumb carries a 2px transparent
|
|
19
|
+
* border. The visible thumb stays a 5px bar floating 2px in from the edge,
|
|
20
|
+
* pixel-for-pixel where it is today, while the draggable strip becomes the
|
|
21
|
+
* full 9px and reaches the window edge. The margin-right is dropped so the
|
|
22
|
+
* scrollbar itself sits flush at the edge.
|
|
23
|
+
*
|
|
24
|
+
* Selectors anchor on the public `data-conversation-scroll` and
|
|
25
|
+
* `data-files-body` attributes the shipped code itself queries, so
|
|
26
|
+
* rebuilds that change CSS-module hashes keep working.
|
|
27
|
+
*/
|
|
28
|
+
const CSS = [
|
|
29
|
+
/* Main conversation scroll: hit area to the window edge. */
|
|
30
|
+
'[data-conversation-scroll] {',
|
|
31
|
+
' --dsh-scrollbar-width: 9px;',
|
|
32
|
+
' --dsh-scrollbar-thumb-border: 2px;',
|
|
33
|
+
' margin-right: 0 !important;',
|
|
34
|
+
'}',
|
|
35
|
+
/* Files side panel: the same dead strip at the window edge. */
|
|
36
|
+
'[data-files-body] {',
|
|
37
|
+
' --dsh-scrollbar-width: 9px;',
|
|
38
|
+
' --dsh-scrollbar-thumb-border: 2px;',
|
|
39
|
+
' margin-right: 0 !important;',
|
|
40
|
+
'}',
|
|
41
|
+
].join('\n');
|
|
42
|
+
|
|
43
|
+
/** Renders only a stylesheet; unmounting the slot entry removes it. */
|
|
44
|
+
function ScrollbarEdgeHitStyle() {
|
|
45
|
+
return h('style', {
|
|
46
|
+
'data-plugin': 'dsh-scrollbar-edge-hit',
|
|
47
|
+
'data-plugin-css': 'dsh-scrollbar-edge-hit/scrollbar.css',
|
|
48
|
+
}, CSS);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
inject: ['slots'],
|
|
53
|
+
apply(ctx) {
|
|
54
|
+
ctx.slots.inject('shell.overlay', () => ctx.slots.register({
|
|
55
|
+
name: 'shell.overlay',
|
|
56
|
+
id: 'scrollbar-edge-hit',
|
|
57
|
+
order: 1000,
|
|
58
|
+
}, ScrollbarEdgeHitStyle));
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
});
|
package/cordis.patch.yml
ADDED
package/icon.svg
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
2
|
+
<rect x="8" y="8" width="48" height="48" rx="10" fill="none" stroke="#5b6472" stroke-width="3"/>
|
|
3
|
+
<line x1="47" y1="14" x2="47" y2="50" stroke="#5b6472" stroke-width="3"/>
|
|
4
|
+
<line x1="47" y1="23" x2="47" y2="37" stroke="#247bbf" stroke-width="6" stroke-linecap="round"/>
|
|
5
|
+
<path d="M18 30h22m0 0-7-7m7 7-7 7" fill="none" stroke="#247bbf" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
</svg>
|
package/index.js
ADDED
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-scrollbar-edge-hit",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Makes the DSH Web UI scrollbar usable with the mouse at the screen edge.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "agoudbg",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/agoudbg/agou-dsh-plugins.git",
|
|
11
|
+
"directory": "packages/dsh-scrollbar-edge-hit"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"dsh",
|
|
15
|
+
"dsh-plugin",
|
|
16
|
+
"deepseek-harness",
|
|
17
|
+
"web-ui",
|
|
18
|
+
"scrollbar"
|
|
19
|
+
],
|
|
20
|
+
"engines": {
|
|
21
|
+
"dsh": ">=0.2.1-rc.5"
|
|
22
|
+
},
|
|
23
|
+
"exports": {
|
|
24
|
+
".": "./index.js",
|
|
25
|
+
"./client": "./client.js",
|
|
26
|
+
"./locale/*.json": "./locale/*.json",
|
|
27
|
+
"./icon": "./icon.svg"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"index.js",
|
|
31
|
+
"client.js",
|
|
32
|
+
"cordis.patch.yml",
|
|
33
|
+
"locale/*.json",
|
|
34
|
+
"icon.svg"
|
|
35
|
+
],
|
|
36
|
+
"dsh": {
|
|
37
|
+
"bundle": {
|
|
38
|
+
"patch": "./cordis.patch.yml"
|
|
39
|
+
},
|
|
40
|
+
"client": {
|
|
41
|
+
"platform": "web",
|
|
42
|
+
"immediately": true,
|
|
43
|
+
"inject": ["@deepseek-ai/dsh-client-ui-layout"]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|