dsh-any-background 0.3.7 → 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 +19 -13
- package/README.zh.md +17 -13
- package/lib/client.js +187 -14
- package/lib/client.js.map +1 -1
- package/lib/index.js +41 -8
- package/package.json +16 -10
package/lib/index.js
CHANGED
|
@@ -24,12 +24,32 @@ const SUPPORTED_RELEASES = [
|
|
|
24
24
|
release: "0.2.0-rc.2"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
channel: "0.2.1
|
|
27
|
+
channel: "0.2.1",
|
|
28
28
|
release: "0.2.1-alpha.1"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
channel: "0.2.1
|
|
31
|
+
channel: "0.2.1",
|
|
32
32
|
release: "0.2.1-alpha.2"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
channel: "0.2.1",
|
|
36
|
+
release: "0.2.1-alpha.3"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
channel: "0.2.1",
|
|
40
|
+
release: "0.2.1-alpha.4"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
channel: "0.2.1",
|
|
44
|
+
release: "0.2.1-alpha.5"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
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"
|
|
33
53
|
}
|
|
34
54
|
];
|
|
35
55
|
const UNKNOWN_HOST_INFO = {
|
|
@@ -86,7 +106,7 @@ function cmp(a, b) {
|
|
|
86
106
|
* release is outside everything this plugin has seen.
|
|
87
107
|
*
|
|
88
108
|
* A release is matched by PATCH LINE before anything else: `0.2.1-alpha.3` and a
|
|
89
|
-
* future `0.2.1` stable both belong to the line verified at `0.2.1-alpha.1
|
|
109
|
+
* future `0.2.1` stable both belong to the line verified at `0.2.1-alpha.1…rc.2`, and
|
|
90
110
|
* handing them that adapter beats giving up — the DOM probes only cover panel
|
|
91
111
|
* mechanics, not the surface decisions the line is known for.
|
|
92
112
|
*
|
|
@@ -324,7 +344,8 @@ const DEFAULT_CONFIG = {
|
|
|
324
344
|
input: 30,
|
|
325
345
|
panel: 30,
|
|
326
346
|
produced: 30,
|
|
327
|
-
header: 30
|
|
347
|
+
header: 30,
|
|
348
|
+
headerBar: 30
|
|
328
349
|
},
|
|
329
350
|
strokes: {
|
|
330
351
|
bg: {
|
|
@@ -376,6 +397,11 @@ const DEFAULT_CONFIG = {
|
|
|
376
397
|
width: 0,
|
|
377
398
|
color: "auto",
|
|
378
399
|
customColor: "#808080"
|
|
400
|
+
},
|
|
401
|
+
headerBar: {
|
|
402
|
+
width: 0,
|
|
403
|
+
color: "auto",
|
|
404
|
+
customColor: "#808080"
|
|
379
405
|
}
|
|
380
406
|
},
|
|
381
407
|
settingsOpacity: .5,
|
|
@@ -407,6 +433,7 @@ const DEFAULT_CONFIG = {
|
|
|
407
433
|
panelOpacity: .5,
|
|
408
434
|
producedOpacity: .5,
|
|
409
435
|
headerOpacity: .5,
|
|
436
|
+
headerBarOpacity: .5,
|
|
410
437
|
profiles: [],
|
|
411
438
|
rotation: {
|
|
412
439
|
enabled: false,
|
|
@@ -528,7 +555,8 @@ const STROKE_GROUPS = [
|
|
|
528
555
|
"input",
|
|
529
556
|
"panel",
|
|
530
557
|
"produced",
|
|
531
|
-
"header"
|
|
558
|
+
"header",
|
|
559
|
+
"headerBar"
|
|
532
560
|
];
|
|
533
561
|
const STROKE_COLOR_KEYS = [
|
|
534
562
|
"auto",
|
|
@@ -591,7 +619,8 @@ function normalizeConfig(raw) {
|
|
|
591
619
|
"input",
|
|
592
620
|
"panel",
|
|
593
621
|
"produced",
|
|
594
|
-
"header"
|
|
622
|
+
"header",
|
|
623
|
+
"headerBar"
|
|
595
624
|
]) blurs[k] = clamp(bl[k], 0, 60, DEFAULT_CONFIG.blurs[k]);
|
|
596
625
|
return {
|
|
597
626
|
color,
|
|
@@ -620,6 +649,7 @@ function normalizeConfig(raw) {
|
|
|
620
649
|
panelOpacity: clamp(r.panelOpacity, 0, 1, DEFAULT_CONFIG.panelOpacity),
|
|
621
650
|
producedOpacity: clamp(r.producedOpacity, 0, 1, DEFAULT_CONFIG.producedOpacity),
|
|
622
651
|
headerOpacity: clamp(r.headerOpacity, 0, 1, DEFAULT_CONFIG.headerOpacity),
|
|
652
|
+
headerBarOpacity: clamp(r.headerBarOpacity, 0, 1, DEFAULT_CONFIG.headerBarOpacity),
|
|
623
653
|
profiles: normalizeProfiles(r.profiles),
|
|
624
654
|
rotation: normalizeRotation(r.rotation),
|
|
625
655
|
schedule: normalizeSchedule(r.schedule),
|
|
@@ -682,7 +712,9 @@ function normalizeProfileAppearance(raw) {
|
|
|
682
712
|
"trajectory",
|
|
683
713
|
"input",
|
|
684
714
|
"panel",
|
|
685
|
-
"produced"
|
|
715
|
+
"produced",
|
|
716
|
+
"header",
|
|
717
|
+
"headerBar"
|
|
686
718
|
]) blurs[k] = clamp(bl[k], 0, 60, DEFAULT_CONFIG.blurs[k]);
|
|
687
719
|
return {
|
|
688
720
|
color: Array.isArray(c) && c.length === 3 && c.every((x) => typeof x === "number" && isFinite(x)) ? [
|
|
@@ -705,7 +737,8 @@ function normalizeProfileAppearance(raw) {
|
|
|
705
737
|
trajectoryOpacity: clamp(a.trajectoryOpacity, 0, 1, DEFAULT_CONFIG.trajectoryOpacity),
|
|
706
738
|
panelOpacity: clamp(a.panelOpacity, 0, 1, DEFAULT_CONFIG.panelOpacity),
|
|
707
739
|
producedOpacity: clamp(a.producedOpacity, 0, 1, DEFAULT_CONFIG.producedOpacity),
|
|
708
|
-
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)
|
|
709
742
|
};
|
|
710
743
|
}
|
|
711
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.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || >=0.2.0-rc.1"
|
|
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.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || >=0.2.0-rc.1",
|
|
67
|
-
"@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.0-rc.1",
|
|
68
|
-
"@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.0-rc.1",
|
|
69
|
-
"@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.0-rc.1",
|
|
70
|
-
"@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.0-rc.1",
|
|
71
|
-
"@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.0-rc.1",
|
|
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,12 +104,17 @@
|
|
|
103
104
|
},
|
|
104
105
|
"dsh": {
|
|
105
106
|
"compatibility": {
|
|
106
|
-
"dsh": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-alpha.1 || 0.2.1-alpha.2 || >=0.2.0-rc.1",
|
|
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
109
|
"0.2.0-rc.1": "compatible",
|
|
109
110
|
"0.2.0-rc.2": "compatible",
|
|
110
111
|
"0.2.1-alpha.1": "compatible",
|
|
111
|
-
"0.2.1-alpha.2": "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"
|
|
112
118
|
}
|
|
113
119
|
},
|
|
114
120
|
"bundle": {
|