dsh-width-tiers 1.0.2 → 1.0.4
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/README.md +2 -9
- package/README.zh.md +2 -8
- package/cordis.patch.yml +9 -0
- package/lib/client.js +7 -4
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -34,14 +34,8 @@ a glance.
|
|
|
34
34
|
dsh plugin --profile web add dsh-width-tiers
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
```yaml
|
|
41
|
-
- insert:
|
|
42
|
-
- id: dsh-width-tiers
|
|
43
|
-
name: dsh-width-tiers
|
|
44
|
-
```
|
|
37
|
+
The bundle patch then inserts the `dsh-width-tiers` loader entry itself — no
|
|
38
|
+
manual `cordis.patch.yml` edits needed.
|
|
45
39
|
|
|
46
40
|
Restart `dsh web` (the plugin loads at boot) and hard-refresh the page
|
|
47
41
|
(Ctrl+Shift+R). A round button with five bars appears at the bottom-right.
|
|
@@ -98,7 +92,6 @@ language, and Chinese is the last resort. No plugin-side setting needed.
|
|
|
98
92
|
dsh plugin --profile web remove dsh-width-tiers
|
|
99
93
|
```
|
|
100
94
|
|
|
101
|
-
Remove the `dsh-width-tiers` row from `~/.dsh/profiles/web/cordis.patch.yml`,
|
|
102
95
|
then restart `dsh web`.
|
|
103
96
|
|
|
104
97
|
## License
|
package/README.zh.md
CHANGED
|
@@ -31,13 +31,8 @@ DSH Web 在会话根元素上硬编码了一个阅读宽度
|
|
|
31
31
|
dsh plugin --profile web add dsh-width-tiers
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
```yaml
|
|
37
|
-
- insert:
|
|
38
|
-
- id: dsh-width-tiers
|
|
39
|
-
name: dsh-width-tiers
|
|
40
|
-
```
|
|
34
|
+
bundle patch 会自动插入 `dsh-width-tiers` 加载项——无需手动改
|
|
35
|
+
`cordis.patch.yml`。
|
|
41
36
|
|
|
42
37
|
**重启 `dsh web`**(插件在启动时加载),再硬刷新页面(Ctrl+Shift+R)。
|
|
43
38
|
右下角会出现五条横条的圆形按钮。
|
|
@@ -85,7 +80,6 @@ dsh plugin --profile web add dsh-width-tiers
|
|
|
85
80
|
dsh plugin --profile web remove dsh-width-tiers
|
|
86
81
|
```
|
|
87
82
|
|
|
88
|
-
删除 `~/.dsh/profiles/web/cordis.patch.yml` 里的 `dsh-width-tiers` 行,
|
|
89
83
|
然后重启 `dsh web`。
|
|
90
84
|
|
|
91
85
|
## 许可证
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# dsh-width-tiers bundle patch — automatically applied when this package is
|
|
2
|
+
# added as a profile bundle (e.g. `dsh plugin add dsh-width-tiers`).
|
|
3
|
+
#
|
|
4
|
+
# It registers this plugin's own loader entry (a web client plugin carried by
|
|
5
|
+
# its node-half row). Because bundle patches apply after the shipped base
|
|
6
|
+
# layers, no manual `cordis.patch.yml` edit is needed in the profile.
|
|
7
|
+
- insert:
|
|
8
|
+
- id: dsh-width-tiers
|
|
9
|
+
name: 'dsh-width-tiers'
|
package/lib/client.js
CHANGED
|
@@ -97,13 +97,16 @@ window.__ModuleLoader__.load({
|
|
|
97
97
|
//#region lib/types/client/styles.js
|
|
98
98
|
/** Button + menu styles (theme variables, light/dark aware). */
|
|
99
99
|
const css = [
|
|
100
|
-
"#dsh-wide-toggle{position:fixed;right:
|
|
101
|
-
"#dsh-wide-toggle
|
|
102
|
-
"#dsh-wide-toggle:
|
|
100
|
+
"#dsh-wide-toggle{position:fixed;right:10px;bottom:216px;z-index:999;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:1px solid var(--dsw-alias-border-l2);border-radius:50%;overflow:hidden;background:var(--dsw-alias-button-floating-fill);color:var(--dsw-alias-label-secondary);box-shadow:0 2px 8px rgba(0,0,0,.18);cursor:pointer;opacity:.72;transition:opacity .2s ease,width .2s ease,border-radius .2s ease,background .2s ease,color .2s ease}",
|
|
101
|
+
"#dsh-wide-toggle::after{content:'';position:fixed;right:10px;bottom:216px;width:36px;height:36px;pointer-events:auto}",
|
|
102
|
+
"#dsh-wide-toggle:hover{opacity:1}",
|
|
103
|
+
"#dsh-wide-toggle:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px;width:36px;border-radius:50%}",
|
|
104
|
+
"#dsh-wide-toggle:not(:hover):not(:focus-visible){width:10px;border-radius:6px}",
|
|
105
|
+
"#dsh-wide-toggle:not(:hover):not(:focus-visible) svg rect{width:6px;x:5px}",
|
|
103
106
|
"#dsh-wide-toggle.active{background:var(--dsw-alias-state-business-primary);border-color:transparent;color:var(--dsw-static-neutral-00);opacity:1}",
|
|
104
107
|
"#dsh-wide-toggle.pulse{animation:dsh-wide-pulse .65s ease-out}",
|
|
105
108
|
"@keyframes dsh-wide-pulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--dsw-alias-state-business-primary) 60%,transparent)}100%{box-shadow:0 0 0 14px transparent}}",
|
|
106
|
-
"#dsh-width-menu{position:fixed;right:20px;bottom:
|
|
109
|
+
"#dsh-width-menu{position:fixed;right:20px;bottom:264px;z-index:1000;min-width:196px;padding:6px;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-specific-menu);box-shadow:0 8px 28px rgba(0,0,0,.24);display:flex;flex-direction:column;gap:2px}",
|
|
107
110
|
"#dsh-width-menu[hidden]{display:none}",
|
|
108
111
|
"#dsh-width-menu button{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;border:none;border-radius:8px;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:18px;text-align:left;cursor:pointer}",
|
|
109
112
|
"#dsh-width-menu button:hover{background:var(--dsw-alias-interactive-bg-hover)}",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-width-tiers",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "DSH Web client plugin: chat content width tiers (standard / medium / wide / ultra / full) with a floating picker button. Frees wide tables from the app's hard-coded 748px content cap. UI copy follows the app language (zh / en).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "aaronlei",
|
|
@@ -16,11 +16,15 @@
|
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"lib",
|
|
19
|
+
"cordis.patch.yml",
|
|
19
20
|
"LICENSE",
|
|
20
21
|
"README.md",
|
|
21
22
|
"README.zh.md"
|
|
22
23
|
],
|
|
23
24
|
"dsh": {
|
|
25
|
+
"bundle": {
|
|
26
|
+
"patch": "./cordis.patch.yml"
|
|
27
|
+
},
|
|
24
28
|
"client": {
|
|
25
29
|
"platform": "web",
|
|
26
30
|
"inject": [
|