dsh-any-background 0.3.6 → 0.3.8
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 +187 -174
- package/README.zh.md +183 -174
- package/lib/client.js +400 -400
- package/lib/client.js.map +1 -1
- package/lib/index.js +45 -29
- package/package.json +17 -18
package/lib/index.js
CHANGED
|
@@ -6,47 +6,50 @@ import { basename, dirname, join } from "node:path";
|
|
|
6
6
|
//#region src/host-compat/channel.ts
|
|
7
7
|
/** What this plugin supports, in upgrade order. One row = one build whose facts
|
|
8
8
|
* were checked; several rows may share a `channel` when a newer build was
|
|
9
|
-
* verified as needing no change to that folder's adapter (as `0.1
|
|
9
|
+
* verified as needing no change to that folder's adapter (as `0.2.1-alpha.2` was) —
|
|
10
10
|
* a row then reports `exact` instead of `line`, and no new folder appears.
|
|
11
11
|
* Rows may ALSO share a patch line while carrying different channels, which is
|
|
12
|
-
* how a line says "the facts changed halfway through it" (`0.
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* `HostChannel` for why that row is keyed to the build).
|
|
12
|
+
* how a line says "the facts changed halfway through it" (`0.2.0-rc.2` opens a
|
|
13
|
+
* second answer on a line that had one — see the note on `HostChannel` for why
|
|
14
|
+
* that row is keyed to the build).
|
|
16
15
|
* Adding an ADAPTER means adding a channel plus a folder in
|
|
17
16
|
* `client/host-compat/versions/`. */
|
|
18
17
|
const SUPPORTED_RELEASES = [
|
|
19
18
|
{
|
|
20
|
-
channel: "0.
|
|
21
|
-
release: "0.
|
|
19
|
+
channel: "0.2.0-rc",
|
|
20
|
+
release: "0.2.0-rc.1"
|
|
22
21
|
},
|
|
23
22
|
{
|
|
24
|
-
channel: "0.
|
|
25
|
-
release: "0.
|
|
23
|
+
channel: "0.2.0-rc.2",
|
|
24
|
+
release: "0.2.0-rc.2"
|
|
26
25
|
},
|
|
27
26
|
{
|
|
28
|
-
channel: "0.1
|
|
29
|
-
release: "0.1
|
|
27
|
+
channel: "0.2.1",
|
|
28
|
+
release: "0.2.1-alpha.1"
|
|
30
29
|
},
|
|
31
30
|
{
|
|
32
|
-
channel: "0.1
|
|
33
|
-
release: "0.1
|
|
31
|
+
channel: "0.2.1",
|
|
32
|
+
release: "0.2.1-alpha.2"
|
|
34
33
|
},
|
|
35
34
|
{
|
|
36
|
-
channel: "0.1
|
|
37
|
-
release: "0.1
|
|
35
|
+
channel: "0.2.1",
|
|
36
|
+
release: "0.2.1-alpha.3"
|
|
38
37
|
},
|
|
39
38
|
{
|
|
40
|
-
channel: "0.2.
|
|
41
|
-
release: "0.2.
|
|
39
|
+
channel: "0.2.1",
|
|
40
|
+
release: "0.2.1-alpha.4"
|
|
42
41
|
},
|
|
43
42
|
{
|
|
44
|
-
channel: "0.2.
|
|
45
|
-
release: "0.2.
|
|
43
|
+
channel: "0.2.1",
|
|
44
|
+
release: "0.2.1-alpha.5"
|
|
46
45
|
},
|
|
47
46
|
{
|
|
48
|
-
channel: "0.2.1
|
|
49
|
-
release: "0.2.1-
|
|
47
|
+
channel: "0.2.1",
|
|
48
|
+
release: "0.2.1-rc.1"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
channel: "0.2.1",
|
|
52
|
+
release: "0.2.1-rc.2"
|
|
50
53
|
}
|
|
51
54
|
];
|
|
52
55
|
const UNKNOWN_HOST_INFO = {
|
|
@@ -102,8 +105,8 @@ function cmp(a, b) {
|
|
|
102
105
|
/** Pick the adapter for a release, clamping to the nearest verified line when the
|
|
103
106
|
* release is outside everything this plugin has seen.
|
|
104
107
|
*
|
|
105
|
-
* A release is matched by PATCH LINE before anything else: `0.1
|
|
106
|
-
* future `0.1
|
|
108
|
+
* A release is matched by PATCH LINE before anything else: `0.2.1-alpha.3` and a
|
|
109
|
+
* future `0.2.1` stable both belong to the line verified at `0.2.1-alpha.1…rc.2`, and
|
|
107
110
|
* handing them that adapter beats giving up — the DOM probes only cover panel
|
|
108
111
|
* mechanics, not the surface decisions the line is known for.
|
|
109
112
|
*
|
|
@@ -173,7 +176,7 @@ function classifyRelease(version) {
|
|
|
173
176
|
* from `$DSH_HOME`'s `homes/<ver>` layout. For a host that gives no
|
|
174
177
|
* `profileContext`.
|
|
175
178
|
* 3. `$DSH_HOME`'s basename, because launcher homes live in a folder named after
|
|
176
|
-
* the release (`.../homes/0.1
|
|
179
|
+
* the release (`.../homes/0.2.1-alpha.2`). A user may point DSH_HOME at a
|
|
177
180
|
* plain `~/.dsh` (no launcher layout at all), whose basename is not a
|
|
178
181
|
* version — hence `looksLikeVersion` gates it.
|
|
179
182
|
*
|
|
@@ -341,7 +344,8 @@ const DEFAULT_CONFIG = {
|
|
|
341
344
|
input: 30,
|
|
342
345
|
panel: 30,
|
|
343
346
|
produced: 30,
|
|
344
|
-
header: 30
|
|
347
|
+
header: 30,
|
|
348
|
+
headerBar: 30
|
|
345
349
|
},
|
|
346
350
|
strokes: {
|
|
347
351
|
bg: {
|
|
@@ -393,6 +397,11 @@ const DEFAULT_CONFIG = {
|
|
|
393
397
|
width: 0,
|
|
394
398
|
color: "auto",
|
|
395
399
|
customColor: "#808080"
|
|
400
|
+
},
|
|
401
|
+
headerBar: {
|
|
402
|
+
width: 0,
|
|
403
|
+
color: "auto",
|
|
404
|
+
customColor: "#808080"
|
|
396
405
|
}
|
|
397
406
|
},
|
|
398
407
|
settingsOpacity: .5,
|
|
@@ -424,6 +433,7 @@ const DEFAULT_CONFIG = {
|
|
|
424
433
|
panelOpacity: .5,
|
|
425
434
|
producedOpacity: .5,
|
|
426
435
|
headerOpacity: .5,
|
|
436
|
+
headerBarOpacity: .5,
|
|
427
437
|
profiles: [],
|
|
428
438
|
rotation: {
|
|
429
439
|
enabled: false,
|
|
@@ -545,7 +555,8 @@ const STROKE_GROUPS = [
|
|
|
545
555
|
"input",
|
|
546
556
|
"panel",
|
|
547
557
|
"produced",
|
|
548
|
-
"header"
|
|
558
|
+
"header",
|
|
559
|
+
"headerBar"
|
|
549
560
|
];
|
|
550
561
|
const STROKE_COLOR_KEYS = [
|
|
551
562
|
"auto",
|
|
@@ -608,7 +619,8 @@ function normalizeConfig(raw) {
|
|
|
608
619
|
"input",
|
|
609
620
|
"panel",
|
|
610
621
|
"produced",
|
|
611
|
-
"header"
|
|
622
|
+
"header",
|
|
623
|
+
"headerBar"
|
|
612
624
|
]) blurs[k] = clamp(bl[k], 0, 60, DEFAULT_CONFIG.blurs[k]);
|
|
613
625
|
return {
|
|
614
626
|
color,
|
|
@@ -637,6 +649,7 @@ function normalizeConfig(raw) {
|
|
|
637
649
|
panelOpacity: clamp(r.panelOpacity, 0, 1, DEFAULT_CONFIG.panelOpacity),
|
|
638
650
|
producedOpacity: clamp(r.producedOpacity, 0, 1, DEFAULT_CONFIG.producedOpacity),
|
|
639
651
|
headerOpacity: clamp(r.headerOpacity, 0, 1, DEFAULT_CONFIG.headerOpacity),
|
|
652
|
+
headerBarOpacity: clamp(r.headerBarOpacity, 0, 1, DEFAULT_CONFIG.headerBarOpacity),
|
|
640
653
|
profiles: normalizeProfiles(r.profiles),
|
|
641
654
|
rotation: normalizeRotation(r.rotation),
|
|
642
655
|
schedule: normalizeSchedule(r.schedule),
|
|
@@ -699,7 +712,9 @@ function normalizeProfileAppearance(raw) {
|
|
|
699
712
|
"trajectory",
|
|
700
713
|
"input",
|
|
701
714
|
"panel",
|
|
702
|
-
"produced"
|
|
715
|
+
"produced",
|
|
716
|
+
"header",
|
|
717
|
+
"headerBar"
|
|
703
718
|
]) blurs[k] = clamp(bl[k], 0, 60, DEFAULT_CONFIG.blurs[k]);
|
|
704
719
|
return {
|
|
705
720
|
color: Array.isArray(c) && c.length === 3 && c.every((x) => typeof x === "number" && isFinite(x)) ? [
|
|
@@ -722,7 +737,8 @@ function normalizeProfileAppearance(raw) {
|
|
|
722
737
|
trajectoryOpacity: clamp(a.trajectoryOpacity, 0, 1, DEFAULT_CONFIG.trajectoryOpacity),
|
|
723
738
|
panelOpacity: clamp(a.panelOpacity, 0, 1, DEFAULT_CONFIG.panelOpacity),
|
|
724
739
|
producedOpacity: clamp(a.producedOpacity, 0, 1, DEFAULT_CONFIG.producedOpacity),
|
|
725
|
-
headerOpacity: clamp(a.headerOpacity, 0, 1, DEFAULT_CONFIG.headerOpacity)
|
|
740
|
+
headerOpacity: clamp(a.headerOpacity, 0, 1, DEFAULT_CONFIG.headerOpacity),
|
|
741
|
+
headerBarOpacity: clamp(a.headerBarOpacity, 0, 1, DEFAULT_CONFIG.headerBarOpacity)
|
|
726
742
|
};
|
|
727
743
|
}
|
|
728
744
|
function normalizeProfiles(raw) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-any-background",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "Appearance plugin for DeepSeek Harness: custom theme color (PS-style color wheel), background wallpaper with opacity/blur controls, and separate main/settings interface opacity.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"author": "Tkingxiao",
|
|
24
24
|
"type": "module",
|
|
25
25
|
"engines": {
|
|
26
|
-
"dsh": "0.
|
|
26
|
+
"dsh": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || >=0.2.0-rc.1"
|
|
27
27
|
},
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
],
|
|
47
47
|
"scripts": {
|
|
48
48
|
"bundle": "tsdown",
|
|
49
|
+
"test": "npm run bundle && node scripts/smoke.mjs",
|
|
49
50
|
"watch": "tsdown --watch",
|
|
50
51
|
"typecheck": "tsc -p tsconfig.json"
|
|
51
52
|
},
|
|
@@ -63,12 +64,12 @@
|
|
|
63
64
|
},
|
|
64
65
|
"peerDependencies": {
|
|
65
66
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
66
|
-
"@deepseek-ai/dsh-client-locale": "0.
|
|
67
|
-
"@deepseek-ai/dsh-client-store": "0.
|
|
68
|
-
"@deepseek-ai/dsh-client-connection": "0.
|
|
69
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.
|
|
70
|
-
"@deepseek-ai/dsh-client-ui-sidebar-right": "0.
|
|
71
|
-
"@deepseek-ai/dsh-client-ui-theme": "0.
|
|
67
|
+
"@deepseek-ai/dsh-client-locale": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || >=0.2.0-rc.1",
|
|
68
|
+
"@deepseek-ai/dsh-client-store": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || >=0.2.0-rc.1",
|
|
69
|
+
"@deepseek-ai/dsh-client-connection": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || >=0.2.0-rc.1",
|
|
70
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || >=0.2.0-rc.1",
|
|
71
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || >=0.2.0-rc.1",
|
|
72
|
+
"@deepseek-ai/dsh-client-ui-theme": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || >=0.2.0-rc.1",
|
|
72
73
|
"react": "^18.2.0",
|
|
73
74
|
"dsh-better-sidebar": ">=0.4.0"
|
|
74
75
|
},
|
|
@@ -103,19 +104,17 @@
|
|
|
103
104
|
},
|
|
104
105
|
"dsh": {
|
|
105
106
|
"compatibility": {
|
|
106
|
-
"dsh": "0.
|
|
107
|
+
"dsh": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || 0.2.1-alpha.3 || 0.2.1-alpha.4 || 0.2.1-alpha.5 || 0.2.1-rc.1 || 0.2.1-rc.2 || >=0.2.0-rc.1",
|
|
107
108
|
"dshReleases": {
|
|
108
|
-
"0.1.5-rc.2": "compatible",
|
|
109
|
-
"0.1.5-rc.3": "compatible",
|
|
110
|
-
"0.1.6-alpha.1": "compatible",
|
|
111
|
-
"0.1.6-alpha.2": "compatible",
|
|
112
|
-
"0.1.7-alpha.1": "compatible",
|
|
113
|
-
"0.1.7-alpha.2": "compatible",
|
|
114
|
-
"0.1.7-rc.1": "compatible",
|
|
115
|
-
"0.1.7-rc.2": "compatible",
|
|
116
109
|
"0.2.0-rc.1": "compatible",
|
|
117
110
|
"0.2.0-rc.2": "compatible",
|
|
118
|
-
"0.2.1-alpha.1": "compatible"
|
|
111
|
+
"0.2.1-alpha.1": "compatible",
|
|
112
|
+
"0.2.1-alpha.2": "compatible",
|
|
113
|
+
"0.2.1-alpha.3": "compatible",
|
|
114
|
+
"0.2.1-alpha.4": "compatible",
|
|
115
|
+
"0.2.1-alpha.5": "compatible",
|
|
116
|
+
"0.2.1-rc.1": "compatible",
|
|
117
|
+
"0.2.1-rc.2": "compatible"
|
|
119
118
|
}
|
|
120
119
|
},
|
|
121
120
|
"bundle": {
|