dsh-dream-skin 0.2.2 โ 0.2.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.en.md +54 -9
- package/README.md +53 -9
- package/lib/client.js +241 -20
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -6,11 +6,16 @@
|
|
|
6
6
|
|
|
7
7
|
# dsh-dream-skin ๐ฎ
|
|
8
8
|
|
|
9
|
-
**
|
|
9
|
+
**Give DeepSeek Harness a face that breathes, feels, and belongs to you.**
|
|
10
10
|
|
|
11
|
-
Native skinning
|
|
11
|
+
Native skinning ยท wallpaper ยท shareable theme packs โ a romance-engineered project built entirely on DSH's official `--dsw-*` token system.
|
|
12
12
|
|
|
13
|
-
>
|
|
13
|
+
> **TL;DR: code with atmosphere.** โจ
|
|
14
|
+
|
|
15
|
+
| ๐จ 8 original themes | ๐ผ๏ธ wallpaper + opacity/blur | ๐ one-click accent | ๐ฆ shareable theme packs |
|
|
16
|
+
|---|---|---|---|
|
|
17
|
+
|
|
18
|
+
> 3-line install ยท purely native (no injection, no installer patches) ยท survives DSH updates
|
|
14
19
|
|
|
15
20
|
[ไธญๆ](./README.md) ยท [Changelog](./CHANGELOG.md) ยท [Project Notes](./docs/PROJECT.md) ยท [Publishing Guide](./docs/publishing-to-npm.md)
|
|
16
21
|
|
|
@@ -38,6 +43,18 @@ Native skinning + wallpaper + theme packs โ a romance-engineered project built
|
|
|
38
43
|
|
|
39
44
|
---
|
|
40
45
|
|
|
46
|
+
## ๐ธ Screenshots
|
|
47
|
+
|
|
48
|
+
> Real screenshots, not mockups. Left: DSH after applying a skin; right: the dedicated **Theme / Appearance** section in Settings.
|
|
49
|
+
|
|
50
|
+
<p align="center">
|
|
51
|
+
<img src="docs/screenshots/preview.png" alt="DSH skin preview" width="46%"/>
|
|
52
|
+
|
|
53
|
+
<img src="docs/screenshots/settings.png" alt="Theme section in settings" width="46%"/>
|
|
54
|
+
</p>
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
41
58
|
## ๐ Why it earns a star (vs alternatives)
|
|
42
59
|
|
|
43
60
|
| Capability | Ours | Other DSH skinning | Codex-Dream-Skin (desktop) |
|
|
@@ -55,7 +72,7 @@ Native skinning + wallpaper + theme packs โ a romance-engineered project built
|
|
|
55
72
|
|
|
56
73
|
| Capability | Description |
|
|
57
74
|
|------------|-------------|
|
|
58
|
-
| ๐จ **8 bundled presets (Mirage)** | Switch instantly under **Settings โ
|
|
75
|
+
| ๐จ **8 bundled presets (Mirage)** | Switch instantly under **Settings โ Theme / Appearance**, light & dark |
|
|
59
76
|
| ๐ผ๏ธ **Custom wallpaper** | Pick a local image (auto-compressed โค2MB), tune **opacity / blur** |
|
|
60
77
|
| ๐ค **Opaque inner surfaces** | Cards, inputs, message bubbles stay readable โ never washed out |
|
|
61
78
|
| โฉ๏ธ **Default restore** | Back to DSH's built-in appearance (follow system) in one click |
|
|
@@ -68,9 +85,10 @@ Differentiation inspired by existing DSH skin projects plus Codex's skin UX:
|
|
|
68
85
|
| Capability | Description |
|
|
69
86
|
|------------|-------------|
|
|
70
87
|
| ๐ฆ **Theme-pack format + import/export** | A `*.dsh-theme.json` pack = format marker + version + manifest (id/name/author/scheme/accent/tokens). Import a file, one-click apply, and copy a **share link** (encoded in the URL hash) |
|
|
71
|
-
| ๐ **Per-user Accent** | Stack a custom brand-accent
|
|
72
|
-
| ๐ผ๏ธ **Wallpaper 2.0** |
|
|
88
|
+
| ๐ **Per-user Accent** | Stack a custom brand-accent over the active skin (`overrideTokens` layer, the skin untouched): **12 one-click preset swatches**, a color picker, **randomize**, and clear |
|
|
89
|
+
| ๐ผ๏ธ **Wallpaper 2.0** | Local image / **image URL** / **gradient presets**, with a **per-skin suggested gradient** and **auto-dim**; **Recent** (up to 5) to switch back in one click |
|
|
73
90
|
| ๐งฉ **Local pack library** | All built-in skins + imported packs in one place; **apply / favorite** in a click |
|
|
91
|
+
| โ
**Clear selection feedback** | Switching skins updates the checked/bordered highlight **instantly** โ no stale white highlight box |
|
|
74
92
|
| ๐ฒ **Surprise me** | Randomly switch to a theme different from the current one |
|
|
75
93
|
| โญ **Favorites** | Star your favorite skins and switch between them fast |
|
|
76
94
|
| โ
**Validation + rollback** | Pack import validates format / required tokens / color legality; failures or removals fall back safely |
|
|
@@ -82,7 +100,7 @@ Differentiation inspired by existing DSH skin projects plus Codex's skin UX:
|
|
|
82
100
|
dsh plugin --profile web add dsh-dream-skin
|
|
83
101
|
# 2. restart
|
|
84
102
|
dsh web
|
|
85
|
-
# 3. open Settings โ
|
|
103
|
+
# 3. open Settings โ Theme / Appearance โ pick a skin โ done.
|
|
86
104
|
```
|
|
87
105
|
|
|
88
106
|
> Installs the published npm package โ no cloning. If `dsh plugin add` reports a workspace error, append `-w`.
|
|
@@ -104,7 +122,7 @@ packages**:
|
|
|
104
122
|
|
|
105
123
|
- **Install command = the official one**: `dsh plugin --profile web add dsh-dream-skin`
|
|
106
124
|
- **Uses official extension points**: `ctx.theme` (register themes), `ctx.theme.overrideTokens` (override layers),
|
|
107
|
-
`ctx.slots` (mount UI into **Settings โ
|
|
125
|
+
`ctx.slots` (mount UI into a dedicated **Settings โ Theme / Appearance** section).
|
|
108
126
|
- **Manifest contract matches official packages**: `dsh.bundle` + `dsh.client` + `exports["./client"]`.
|
|
109
127
|
|
|
110
128
|
In other words: you are not installing a fringe script โ this is a standard skin plugin inside DSH's official plugin
|
|
@@ -157,7 +175,7 @@ Then **restart** the web server:
|
|
|
157
175
|
dsh web
|
|
158
176
|
```
|
|
159
177
|
|
|
160
|
-
Open **Settings โ
|
|
178
|
+
Open **Settings โ Theme / Appearance** to see the **Skins**, **Accent**, **Wallpaper** / **Advanced Wallpaper**, and **Theme Packs** rows.
|
|
161
179
|
|
|
162
180
|
> The `-w` (workspace) flag is needed on a bare `add` because every profile ships a `pnpm-workspace.yaml`; pnpm treats
|
|
163
181
|
> the profile directory as a workspace root, so a bare add fails with `ERR_PNPM_ADDING_TO_ROOT`. If your profile already
|
|
@@ -169,6 +187,26 @@ Open **Settings โ General** to see the **Skins**, **Accent**, **Wallpaper** /
|
|
|
169
187
|
dsh plugin --profile web add -w /path/to/dsh-dream-skin
|
|
170
188
|
```
|
|
171
189
|
|
|
190
|
+
## ๐ Update / Uninstall
|
|
191
|
+
|
|
192
|
+
**Update to the latest** (when installed from the npm release):
|
|
193
|
+
|
|
194
|
+
```sh
|
|
195
|
+
dsh plugin --profile web update dsh-dream-skin
|
|
196
|
+
dsh web # restart to pick it up
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
> Stuck on an old version after an update? pnpm's minimum-release-age (supply-chain) policy can hold back a
|
|
200
|
+
> freshly published release. In the profile dir run:
|
|
201
|
+
> `pnpm add dsh-dream-skin@latest --config.minimumReleaseAge=0` to force it.
|
|
202
|
+
|
|
203
|
+
**Uninstall:**
|
|
204
|
+
|
|
205
|
+
```sh
|
|
206
|
+
dsh plugin --profile web remove dsh-dream-skin
|
|
207
|
+
dsh web # restores the official appearance
|
|
208
|
+
```
|
|
209
|
+
|
|
172
210
|
## ๐งฉ Compatibility
|
|
173
211
|
|
|
174
212
|
| Item | Value |
|
|
@@ -231,6 +269,8 @@ seeds (`react`, `react/jsx-runtime`, โฆ) and registered client bundles (`@deeps
|
|
|
231
269
|
it then appears in Settings automatically. Add a `skin.<id>` key to both the `zh` and `en` dictionaries.
|
|
232
270
|
- **Ship a theme pack (recommended)**: follow [`docs/examples/sample-theme-pack.json`](./docs/examples/sample-theme-pack.json) โ
|
|
233
271
|
one `*.dsh-theme.json` is importable in Settings and shareable via a link, no code changes needed.
|
|
272
|
+
- **Add your own wallpapers**: drop images into [`wallpapers/`](./wallpapers/) (distribute only what you have rights
|
|
273
|
+
to), then import them via DSH's "Wallpaper" row.
|
|
234
274
|
- **Validate**: `npm test` (VM smoke tests covering factory eval, `apply()`, and pack import/persistence).
|
|
235
275
|
- **Repaint**: reference the `--dsw-alias-*` tokens (full contract in [`docs/themes-spec.md`](./docs/themes-spec.md)).
|
|
236
276
|
|
|
@@ -251,6 +291,11 @@ seeds (`react`, `react/jsx-runtime`, โฆ) and registered client bundles (`@deeps
|
|
|
251
291
|
Issues and PRs welcome! Please read the [Contributing Guide](./CONTRIBUTING.md) and follow the
|
|
252
292
|
[Code of Conduct](./CODE_OF_CONDUCT.md).
|
|
253
293
|
|
|
294
|
+
## โญ Support the project
|
|
295
|
+
|
|
296
|
+
If you like it: star **โญ** the repo, thumbs-up **๐** on npm, or share it with DSH friends โ it helps the project
|
|
297
|
+
get discovered and keeps it maintained. Want to contribute themes / an online Studio / more skins? Join in.
|
|
298
|
+
|
|
254
299
|
## ๐ Security
|
|
255
300
|
|
|
256
301
|
Found a security issue? Don't open a public issue โ see the [Security Policy](./SECURITY.md).
|
package/README.md
CHANGED
|
@@ -6,11 +6,16 @@
|
|
|
6
6
|
|
|
7
7
|
# dsh-dream-skin ๐ฎ
|
|
8
8
|
|
|
9
|
-
**่ฎฉ DeepSeek Harness
|
|
9
|
+
**่ฎฉ DeepSeek Harness ๆขไธๅผ ไผๅผๅธใๆๆ
็ปชใๅฑไบไฝ ็่ธใ**
|
|
10
10
|
|
|
11
|
-
ๅ็ๆข่ค
|
|
11
|
+
ๅ็ๆข่ค ยท ่ๆฏๅฃ็บธ ยท ไธป้ขๅ
ๅไบซ โโ ๅฎๅ
จ็จๅฎๆน `--dsw-*` token ็ณป็ปๅฎ็ฐ็ๆตชๆผซๅทฅ็จใ่ฃ
ไธๆฌก๏ผ็ป่บซๅฏๆขใ
|
|
12
12
|
|
|
13
|
-
>
|
|
13
|
+
> **ไธๅฅ่ฏ๏ผๅไปฃ็ ๏ผไน่ฆๆๆฐๅดๆใ** โจ
|
|
14
|
+
|
|
15
|
+
| ๐จ 8 ๅฅๅๅไธป้ข | ๐ผ๏ธ ๅฃ็บธ + ้ๆๅบฆ/ๆจก็ณ | ๐ ๅผบ่ฐ่ฒ็นไธไธ | ๐ฆ ไธป้ขๅ
ๅฏๅไบซ |
|
|
16
|
+
|---|---|---|---|
|
|
17
|
+
|
|
18
|
+
> 3 ่กๅฎ่ฃ
ยท ็บฏๅ็๏ผๆ ๆณจๅ
ฅ/ไธๆนๅฎ่ฃ
ๅ
๏ผยท ไธๅ DSH ๆดๆฐๅคฑๆ
|
|
14
19
|
|
|
15
20
|
[English](./README.en.md) ยท [ๅๆดๆฅๅฟ](./CHANGELOG.md) ยท [้กน็ฎ่ฏดๆ](./docs/PROJECT.md) ยท [ๅๅธๆๅผ](./docs/publishing-to-npm.md)
|
|
16
21
|
|
|
@@ -37,6 +42,18 @@
|
|
|
37
42
|
|
|
38
43
|
---
|
|
39
44
|
|
|
45
|
+
## ๐ธ ๅฎๆบๆชๅพ
|
|
46
|
+
|
|
47
|
+
> ็ๆบๆๆ๏ผ้ๆฆๅฟตๅพใๅทฆ๏ผๅบ็จๆๅฅ็ฎ่คๅ็ DSH ็้ข๏ผๅณ๏ผ่ฎพ็ฝฎ้็ใๅค่ง / Themeใๅ่ใ
|
|
48
|
+
|
|
49
|
+
<p align="center">
|
|
50
|
+
<img src="docs/screenshots/preview.png" alt="DSH ็ฎ่คๅฎๆบ้ข่ง" width="46%"/>
|
|
51
|
+
|
|
52
|
+
<img src="docs/screenshots/settings.png" alt="่ฎพ็ฝฎไธญ็ๅค่งๅ่" width="46%"/>
|
|
53
|
+
</p>
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
40
57
|
## ๐ ไธบไปไนๅผๅพ็จ๏ผvs ๅ็ฑป๏ผ
|
|
41
58
|
|
|
42
59
|
| ่ฝๅ | ๆฌๆไปถ | ๅ
ถๅฎ DSH ๆข่คๆนๆก | Codex-Dream-Skin (ๆก้ข) |
|
|
@@ -54,7 +71,7 @@
|
|
|
54
71
|
|
|
55
72
|
| ่ฝๅ | ่ฏดๆ |
|
|
56
73
|
|------|------|
|
|
57
|
-
| ๐จ **8 ๅฅไธป้ข้ข่ฎพ๏ผMirage ๅนปๆขฆ๏ผ** | ๅจ **่ฎพ็ฝฎ โ
|
|
74
|
+
| ๐จ **8 ๅฅไธป้ข้ข่ฎพ๏ผMirage ๅนปๆขฆ๏ผ** | ๅจ **่ฎพ็ฝฎ โ ๅค่ง๏ผTheme๏ผ** ไธ้ฎๅๆข๏ผๆต
่ฒ / ๆทฑ่ฒๅ
ผ้กพ |
|
|
58
75
|
| ๐ผ๏ธ **่ชๅฎไนๅฃ็บธ** | ไธไผ ๆฌๅฐๅพ๏ผ่ชๅจๅ็ผฉ โค2MB๏ผ๏ผ่ฐ่**้ๆๅบฆ / ๆจก็ณ** |
|
|
59
76
|
| ๐ค **ๅ
ๅฑไธ้ๆ** | ๅก็ใ่พๅ
ฅๆกใๆถๆฏๆฐๆณกไธ่ขซๅฃ็บธ็ไฝ๏ผๅฏ่ฏปๆงไผๅ
|
|
|
60
77
|
| โฉ๏ธ **้ป่ฎค่ฟๅ** | ไธ้ฎๅๅฐ DSH ๅ
็ฝฎๅค่ง๏ผ่ท้็ณป็ป๏ผ |
|
|
@@ -67,9 +84,10 @@
|
|
|
67
84
|
| ่ฝๅ | ่ฏดๆ |
|
|
68
85
|
|------|------|
|
|
69
86
|
| ๐ฆ **ไธป้ขๅ
ๆ ผๅผ + ๅฏผๅ
ฅ/ๅฏผๅบ** | ไธไธช `*.dsh-theme.json` ไธป้ขๅ
= ๆ ผๅผๆ ่ฎฐ + ็ๆฌ + manifest๏ผid/name/ไฝ่
/่ฒ็ณป/accent/tokens๏ผใๅฏ**ๅฏผๅ
ฅๆไปถ**ใ**ไธ้ฎๅบ็จ**ใ**ๅคๅถๅไบซ้พๆฅ**๏ผ็ผ็ ่ฟ URL hash๏ผ |
|
|
70
|
-
| ๐ **ๆฏ็จๆทๅผบ่ฐ่ฒ Accent** | ไธบๅฝๅ็ฎ่คๅ ๅ ไธไธช่ชๅฎไนๅ็ๅผบ่ฐ่ฒ๏ผ`overrideTokens`
|
|
71
|
-
| ๐ผ๏ธ **ๅฃ็บธ 2.0** |
|
|
87
|
+
| ๐ **ๆฏ็จๆทๅผบ่ฐ่ฒ Accent** | ไธบๅฝๅ็ฎ่คๅ ๅ ไธไธช่ชๅฎไนๅ็ๅผบ่ฐ่ฒ๏ผ`overrideTokens` ๅฑ๏ผไธๅจ็ฎ่คๆฌ่บซ๏ผ๏ผ**12 ไธชๅ
ธๅ่ฒๅไธ้ฎ้่ฒ** + ้่ฒ็ + ้ๆบ + ๆขๅคไธป้ข่ฒ |
|
|
88
|
+
| ๐ผ๏ธ **ๅฃ็บธ 2.0** | ๆฌๅฐๅพ / **ๅพ็ URL** / **ๆธๅ้ข่ฎพ**๏ผๆฏๅฅ็ฎ่ค**่ชๅจๅปบ่ฎฎ**ไธๅผ ๆธๅ๏ผๅฏ**่ชๅจๅผฑๅ**๏ผ่็ฆไปปๅกๆถ้ไฝๅนฒๆฐ๏ผ๏ผ**ๆ่ฟไฝฟ็จ**๏ผๆๅค 5 ๅผ ๏ผไธ้ฎๆขๅ |
|
|
72
89
|
| ๐งฉ **ๆฌๅฐไธป้ขๅ
ๅบ** | ๆๆๅ
็ฝฎ็ฎ่ค + ๅฏผๅ
ฅ็่ชๅฎไนๅ
้ไธญๅฑ็คบ๏ผ**ๅบ็จ / ๆถ่** ไธ้ฎๅฎๆ |
|
|
90
|
+
| โ
**ๆธ
ๆฐ้ไธญๅ้ฆ** | ๅๆข็ฎ่คๆถ้ไธญๆ๏ผโ + ่พนๆก๏ผ**ๅณๆถ่ท้**๏ผไธๅๆฎ็ๆจก็ณ็็ฝ่ฒ้ซไบฎๆก |
|
|
73
91
|
| ๐ฒ **ๆขไธไธช่ฏ่ฏ๏ผsurprise me๏ผ** | ้ๆบๆไธไธชๅไฝ ๅฝๅไธๅ็ไธป้ข |
|
|
74
92
|
| โญ **ๆถ่** | ๆถ่ๅๆฌข็็ฎ่ค๏ผๅฟซ้ๅๆข |
|
|
75
93
|
| โ
**ๆ ก้ช + ๅๆป** | ๅฏผๅ
ฅๆถไผๆ ก้ชๆ ผๅผ/ๅฟ
ๅกซ token/้ข่ฒๅๆณๆง๏ผๅคฑ่ดฅๆ็งป้คๆถๅฎๅ
จๅ้๏ผไธๅ็ ดๅๆงๆดๆน |
|
|
@@ -90,7 +108,7 @@ DeepSeek Harness ็ๅฃๅทๆฏใไธๅ็ๆไปถใ๏ผๆจกๅใๅทฅๅ
ทใๆฒ็ฎฑใ
|
|
|
90
108
|
|
|
91
109
|
- **ๅฎ่ฃ
ๅฝไปค = ๅฎๆนๅฏไธๅฎ่ฃ
ๅฝไปค**๏ผ`dsh plugin --profile web add dsh-dream-skin`
|
|
92
110
|
- **่ฐ็จ็ๆฏๅฎๆนๆฉๅฑ็น**๏ผ`ctx.theme`๏ผๆณจๅไธป้ข๏ผใ`ctx.theme.overrideTokens`๏ผๅ ๅ ๅฑ๏ผใ
|
|
93
|
-
`ctx.slots`๏ผๆ UI
|
|
111
|
+
`ctx.slots`๏ผๆ UI ๆ่ฟ็ฌ็ซ็ **่ฎพ็ฝฎ โ ๅค่ง / Theme** ๅ่๏ผใ
|
|
94
112
|
- **manifest ๅฅ็บฆไธๅฎๆนไธ่ด**๏ผ`dsh.bundle` + `dsh.client` + `exports["./client"]`ใ
|
|
95
113
|
|
|
96
114
|
ไนๅฐฑๆฏ่ฏด๏ผ**ไฝ ่ฃ
็ไธๆฏไธไธชๆ้จๅทฆ้็่ๆฌ๏ผ่ๆฏ DSH ๅฎๆนๆไปถไฝ็ณป้็ๆ ๅ็ฎ่คๆไปถใ**
|
|
@@ -134,7 +152,7 @@ DeepSeek Harness ็ๅฃๅทๆฏใไธๅ็ๆไปถใ๏ผๆจกๅใๅทฅๅ
ทใๆฒ็ฎฑใ
|
|
|
134
152
|
dsh plugin --profile web add dsh-dream-skin
|
|
135
153
|
# 2. ้ๅฏ
|
|
136
154
|
dsh web
|
|
137
|
-
# 3. ๆๅผ ่ฎพ็ฝฎ โ
|
|
155
|
+
# 3. ๆๅผ ่ฎพ็ฝฎ โ ๅค่ง๏ผTheme๏ผโ ็ฎ่ค๏ผๆไธๅฅ โ ๅฎใ
|
|
138
156
|
```
|
|
139
157
|
|
|
140
158
|
> ่ฃ
็ๆฏ npm ๅทฒๅฎๆๅๅธ็ๆญฃๅผๅ
๏ผๆ ้ cloneใ่ฅ `dsh plugin add` ๆฅ workspace ็ธๅ
ณ้่ฏฏ๏ผ่กฅไธไธช `-w` ๅณๅฏใ
|
|
@@ -154,7 +172,7 @@ dsh plugin --profile web add dsh-dream-skin
|
|
|
154
172
|
dsh web
|
|
155
173
|
```
|
|
156
174
|
|
|
157
|
-
ๆๅผ **่ฎพ็ฝฎ โ
|
|
175
|
+
ๆๅผ **่ฎพ็ฝฎ โ ๅค่ง๏ผTheme๏ผ**๏ผๅณๅฏ็ๅฐใ็ฎ่คใใๅผบ่ฐ่ฒใใ่ๆฏๅพ็ / ้ซ็บงๅฃ็บธใไธใไธป้ขๅ
ใ็ญ่กใ
|
|
158
176
|
|
|
159
177
|
> `-w` ๆ ๅฟๅจ่ฃธ `add` ๆถๅฟ
้๏ผๆฏไธช profile ่ชๅธฆ `pnpm-workspace.yaml`๏ผpnpm ไผๆๅฎๅฝไฝ workspace ๆ น๏ผ่ฃธๅ ๆฅ้
|
|
160
178
|
> `ERR_PNPM_ADDING_TO_ROOT`ใ่ฅๅทฒๅ ่ฟ `-w`๏ผๅ็ปญ็จ็ฐๆ workspace ๅณๆ ้้ๅคใ
|
|
@@ -165,6 +183,25 @@ dsh web
|
|
|
165
183
|
dsh plugin --profile web add -w /path/to/dsh-dream-skin
|
|
166
184
|
```
|
|
167
185
|
|
|
186
|
+
## ๐ ๆดๆฐ / ๅธ่ฝฝ
|
|
187
|
+
|
|
188
|
+
**ๆดๆฐๅฐๆๆฐ็**๏ผ่ฃ
็ๆฏ npm ๆญฃๅผๅ
ๆถ๏ผ๏ผ
|
|
189
|
+
|
|
190
|
+
```sh
|
|
191
|
+
dsh plugin --profile web update dsh-dream-skin
|
|
192
|
+
dsh web # ้ๅฏ็ๆ
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
> ่ฅๆดๆฐๅไปๆพ็คบๆง็ๆฌ๏ผๅฏ่ฝๆฏ pnpm ็ๆๅฐๅๅธๅนด้พ๏ผsupply-chain๏ผ็ญ็ฅๆกไฝไบๅๅๅธ็ๆฐ็ๆฌ๏ผ
|
|
196
|
+
> ๅจ profile ็ฎๅฝๆง่ก `pnpm add dsh-dream-skin@latest --config.minimumReleaseAge=0` ๅณๅฏ็ป่ฟใ
|
|
197
|
+
|
|
198
|
+
**ๅธ่ฝฝ**๏ผ
|
|
199
|
+
|
|
200
|
+
```sh
|
|
201
|
+
dsh plugin --profile web remove dsh-dream-skin
|
|
202
|
+
dsh web # ้ๅฏๅๆขๅคๅฎๆนๅค่ง
|
|
203
|
+
```
|
|
204
|
+
|
|
168
205
|
## ๐งฉ ๅ
ผๅฎนๆง
|
|
169
206
|
|
|
170
207
|
| ้กน | ๅผ |
|
|
@@ -226,6 +263,8 @@ bundle๏ผ`@deepseek-ai/dsh-client-runtime/client`ใโฆ๏ผใ
|
|
|
226
263
|
ๅฎๅณ่ชๅจๅบ็ฐๅจ่ฎพ็ฝฎ้๏ผ่ฎฐๅพๅจ `zh` / `en` ่ฏๅ
ธ่กฅ `skin.<id>` ๆๆกใ
|
|
227
264
|
- **ๅไธไธชไธป้ขๅ
๏ผๆจ่ๅๅๆนๅผ๏ผ**๏ผๅ่ [`docs/examples/sample-theme-pack.json`](./docs/examples/sample-theme-pack.json)๏ผ
|
|
228
265
|
ไธไธช `*.dsh-theme.json` ๅณๅฏๅจ่ฎพ็ฝฎ้ๅฏผๅ
ฅๆ้่ฟๅไบซ้พๆฅๅๅ็ปๅซไบบ๏ผๆ ้ๆนไปฃ็ ใ
|
|
266
|
+
- **ๆพไฝ ่ชๅทฑ็ๅฃ็บธ**๏ผๆๅพ็ไธข่ฟ [`wallpapers/`](./wallpapers/)๏ผๆณจๆๅชๅจไฝ ๆๆ้็ๅๆไธๅๅ๏ผ๏ผๅๅจ
|
|
267
|
+
DSH ็ใ่ๆฏๅพ็ใ้ๅฏผๅ
ฅๅณๅฏใ
|
|
229
268
|
- **่ทๆ ก้ช**๏ผ`npm test`๏ผVM ๅ็ๆต่ฏ๏ผ่ฆ็ factory ๆฑๅผใ`apply` ๆ่ฝฝใไธป้ขๅ
ๅฏผๅ
ฅ/ๆไน
ๅ๏ผใ
|
|
230
269
|
- **ๆข้
่ฒ**๏ผๅ่ `--dsw-alias-*` ไปค็๏ผๅฎๆดๅฅ็บฆ่ง [`docs/themes-spec.md`](./docs/themes-spec.md)๏ผใ
|
|
231
270
|
|
|
@@ -245,6 +284,11 @@ bundle๏ผ`@deepseek-ai/dsh-client-runtime/client`ใโฆ๏ผใ
|
|
|
245
284
|
|
|
246
285
|
ๆฌข่ฟๆไบค Issue ไธ PR๏ผ่ฏทๅ
้
่ฏป [่ดก็ฎๆๅ](./CONTRIBUTING.md)๏ผๅนถ้ตๅพช [Code of Conduct](./CODE_OF_CONDUCT.md)ใ
|
|
247
286
|
|
|
287
|
+
## โญ ๆฏๆ่ฟไธช้กน็ฎ
|
|
288
|
+
|
|
289
|
+
ๅๆฌข็่ฏ๏ผ็ปไปๅบ็นไธช **Star โญ**ใๅจ npm ไธ็นไธช **๐**๏ผๆๆๅฎ่ฝฌๅ็ปไฝ ็ DSH ๆๅโโ่ฟไผ่ฎฉๆดๅคไบบๅ็ฐๅฎ๏ผ
|
|
290
|
+
ไน่ฝๆฟๅฑๆ็ปญ็ปดๆคใๆณไธ่ตทๅไธป้ขๅบ / ๅจ็บฟ Studio / ๆดๅคไธป้ข๏ผๆฌข่ฟๆฅ่ดก็ฎใ
|
|
291
|
+
|
|
248
292
|
## ๐ ๅฎๅ
จ
|
|
249
293
|
|
|
250
294
|
ๅ็ฐๅฎๅ
จ้ฎ้ข๏ผ่ฏทๅฟ็ดๆฅๅผๅ
ฌๅผ Issueโโๅ่ง [ๅฎๅ
จ็ญ็ฅ](./SECURITY.md)ใ
|
package/lib/client.js
CHANGED
|
@@ -36,6 +36,10 @@ window.__ModuleLoader__.load({
|
|
|
36
36
|
const WALLPAPER_OPACITY_KEY = "dsh-dream-skin:wallpaper-opacity";
|
|
37
37
|
/** localStorage key holding the wallpaper blur radius (px). */
|
|
38
38
|
const WALLPAPER_BLUR_KEY = "dsh-dream-skin:wallpaper-blur";
|
|
39
|
+
/** localStorage key holding recent wallpaper history (JSON array of {kind,value}). */
|
|
40
|
+
const WALLPAPER_HISTORY_KEY = "dsh-dream-skin:wallpaper-history";
|
|
41
|
+
/** Max wallpaper history entries kept. */
|
|
42
|
+
const WALLPAPER_HISTORY_MAX = 5;
|
|
39
43
|
/** Sentinel meaning "no custom skin โ follow the built-in appearance". */
|
|
40
44
|
const DEFAULT_SKIN = "system";
|
|
41
45
|
/** Default wash opacity (0..1) applied to the translucent surfaces. */
|
|
@@ -344,7 +348,10 @@ window.__ModuleLoader__.load({
|
|
|
344
348
|
"background.opacity": "้ๆๅบฆ",
|
|
345
349
|
"background.blur": "ๆจก็ณ",
|
|
346
350
|
"background.hint": "ๅพ็ๆพ็คบๅจไธปๅ
ๅฎนๅบไธไพง่พนๆ ็ๅ้ๆๅบไธ๏ผๆถๆฏ็ญๅ
ๅฑ่กจ้ขไฟๆไธ้ๆไปฅไฟ่ฏๅฏ่ฏปๆง",
|
|
351
|
+
"background.history": "ๆ่ฟไฝฟ็จ",
|
|
352
|
+
"background.historyApply": "็นๅปๆขๅ่ฟๅผ ๅฃ็บธ",
|
|
347
353
|
"accent.title": "ๅผบ่ฐ่ฒ๏ผAccent๏ผ",
|
|
354
|
+
"accent.pick": "้่ฒโฆ",
|
|
348
355
|
"accent.random": "้ๆบ",
|
|
349
356
|
"accent.clear": "ๆขๅคไธป้ข่ฒ",
|
|
350
357
|
"accent.hint": "ไธบๅฝๅ็ฎ่ค่ฎพ็ฝฎไธไธช่ชๅฎไนๅผบ่ฐ่ฒ๏ผๅ ๅ ๅฑ๏ผไธๅฝฑๅ็ฎ่คๆฌ่บซ๏ผ๏ผ็นใๆขๅคไธป้ข่ฒใๅๅฐ็ฎ่ค้ป่ฎคๅผบ่ฐ่ฒ",
|
|
@@ -381,7 +388,10 @@ window.__ModuleLoader__.load({
|
|
|
381
388
|
"background.opacity": "Opacity",
|
|
382
389
|
"background.blur": "Blur",
|
|
383
390
|
"background.hint": "The image shows through the translucent main canvas and sidebar; inner surfaces stay opaque for readability",
|
|
391
|
+
"background.history": "Recent",
|
|
392
|
+
"background.historyApply": "Click to switch back",
|
|
384
393
|
"accent.title": "Accent",
|
|
394
|
+
"accent.pick": "Pickโฆ",
|
|
385
395
|
"accent.random": "Random",
|
|
386
396
|
"accent.clear": "Reset to theme",
|
|
387
397
|
"accent.hint": "Set a custom accent color for the active skin (an override layer โ the skin itself is untouched). Reset to return to the skin's default accent.",
|
|
@@ -612,14 +622,16 @@ window.__ModuleLoader__.load({
|
|
|
612
622
|
url: null,
|
|
613
623
|
opacity: DEFAULT_WALLPAPER_OPACITY,
|
|
614
624
|
blur: DEFAULT_WALLPAPER_BLUR,
|
|
625
|
+
history: [],
|
|
615
626
|
revision: -1
|
|
616
627
|
}),
|
|
617
628
|
actions: {
|
|
618
|
-
sync: (d, url, opacity, blur, revision) => {
|
|
629
|
+
sync: (d, url, opacity, blur, history, revision) => {
|
|
619
630
|
if (revision <= d.revision) return;
|
|
620
631
|
d.url = url;
|
|
621
632
|
d.opacity = opacity;
|
|
622
633
|
d.blur = blur;
|
|
634
|
+
d.history = history;
|
|
623
635
|
d.revision = revision;
|
|
624
636
|
}
|
|
625
637
|
}
|
|
@@ -637,6 +649,11 @@ window.__ModuleLoader__.load({
|
|
|
637
649
|
gap: "10px",
|
|
638
650
|
padding: "16px 0"
|
|
639
651
|
},
|
|
652
|
+
section: {
|
|
653
|
+
display: "flex",
|
|
654
|
+
flexDirection: "column",
|
|
655
|
+
width: "100%"
|
|
656
|
+
},
|
|
640
657
|
title: {
|
|
641
658
|
color: "var(--dsw-alias-label-primary)",
|
|
642
659
|
fontSize: "14px",
|
|
@@ -661,15 +678,31 @@ window.__ModuleLoader__.load({
|
|
|
661
678
|
width: "96px",
|
|
662
679
|
padding: "3px",
|
|
663
680
|
borderRadius: "10px",
|
|
664
|
-
border: "2px solid transparent",
|
|
665
681
|
background: "transparent",
|
|
682
|
+
border: "none",
|
|
666
683
|
cursor: "pointer",
|
|
667
684
|
font: "inherit",
|
|
668
|
-
boxSizing: "border-box"
|
|
685
|
+
boxSizing: "border-box",
|
|
686
|
+
position: "relative",
|
|
687
|
+
outline: "none"
|
|
669
688
|
},
|
|
670
689
|
cardSelected: {
|
|
671
|
-
|
|
672
|
-
background: "
|
|
690
|
+
boxShadow: "0 0 0 2px var(--dsw-alias-brand-primary)",
|
|
691
|
+
background: "rgba(127, 127, 127, 0.10)"
|
|
692
|
+
},
|
|
693
|
+
cardCheck: {
|
|
694
|
+
position: "absolute",
|
|
695
|
+
top: "-4px",
|
|
696
|
+
right: "-4px",
|
|
697
|
+
width: "18px",
|
|
698
|
+
height: "18px",
|
|
699
|
+
borderRadius: "50%",
|
|
700
|
+
background: "var(--dsw-alias-brand-primary)",
|
|
701
|
+
color: "#ffffff",
|
|
702
|
+
fontSize: "12px",
|
|
703
|
+
lineHeight: "18px",
|
|
704
|
+
textAlign: "center",
|
|
705
|
+
fontWeight: 700
|
|
673
706
|
},
|
|
674
707
|
cardLabel: {
|
|
675
708
|
color: "var(--dsw-alias-label-secondary)",
|
|
@@ -756,6 +789,40 @@ window.__ModuleLoader__.load({
|
|
|
756
789
|
cursor: "pointer",
|
|
757
790
|
padding: 0
|
|
758
791
|
},
|
|
792
|
+
historyThumb: {
|
|
793
|
+
width: "56px",
|
|
794
|
+
height: "36px",
|
|
795
|
+
borderRadius: "8px",
|
|
796
|
+
border: "1px solid var(--dsw-alias-border-l2)",
|
|
797
|
+
cursor: "pointer",
|
|
798
|
+
padding: 0,
|
|
799
|
+
boxSizing: "border-box",
|
|
800
|
+
backgroundSize: "cover",
|
|
801
|
+
backgroundPosition: "center"
|
|
802
|
+
},
|
|
803
|
+
accentPreset: {
|
|
804
|
+
width: "24px",
|
|
805
|
+
height: "24px",
|
|
806
|
+
borderRadius: "50%",
|
|
807
|
+
border: "1px solid rgba(128,128,128,0.4)",
|
|
808
|
+
cursor: "pointer",
|
|
809
|
+
padding: 0,
|
|
810
|
+
boxSizing: "border-box"
|
|
811
|
+
},
|
|
812
|
+
accentDot: {
|
|
813
|
+
width: "22px",
|
|
814
|
+
height: "22px",
|
|
815
|
+
borderRadius: "50%",
|
|
816
|
+
border: "1px solid var(--dsw-alias-border-l2)",
|
|
817
|
+
boxSizing: "border-box",
|
|
818
|
+
flex: "none"
|
|
819
|
+
},
|
|
820
|
+
accentHex: {
|
|
821
|
+
color: "var(--dsw-alias-label-secondary)",
|
|
822
|
+
fontSize: "13px",
|
|
823
|
+
lineHeight: "20px",
|
|
824
|
+
fontFamily: "ui-monospace, monospace"
|
|
825
|
+
},
|
|
759
826
|
checkbox: {
|
|
760
827
|
accentColor: "var(--dsw-alias-brand-primary)",
|
|
761
828
|
width: "16px",
|
|
@@ -857,6 +924,10 @@ window.__ModuleLoader__.load({
|
|
|
857
924
|
...(selected ? styles.cardSelected : {})
|
|
858
925
|
},
|
|
859
926
|
children: [
|
|
927
|
+
selected ? (0, react_jsx_runtime.jsx)("span", {
|
|
928
|
+
style: styles.cardCheck,
|
|
929
|
+
children: "โ"
|
|
930
|
+
}) : null,
|
|
860
931
|
(0, react_jsx_runtime.jsx)(Swatch, { tokens: skin.tokens }),
|
|
861
932
|
(0, react_jsx_runtime.jsx)("span", {
|
|
862
933
|
style: {
|
|
@@ -948,10 +1019,11 @@ window.__ModuleLoader__.load({
|
|
|
948
1019
|
* Wallpaper row: choose (compressed to a data URL), preview, tune the
|
|
949
1020
|
* wash opacity and blur, and remove the wallpaper.
|
|
950
1021
|
*/
|
|
951
|
-
function WallpaperRow({ t, setWallpaper, setOpacity, setBlur, useStore }) {
|
|
1022
|
+
function WallpaperRow({ t, setWallpaper, setOpacity, setBlur, applyFromHistory, useStore }) {
|
|
952
1023
|
const url = useStore((s) => s.url);
|
|
953
1024
|
const opacity = useStore((s) => s.opacity);
|
|
954
1025
|
const blur = useStore((s) => s.blur);
|
|
1026
|
+
const history = useStore((s) => s.history);
|
|
955
1027
|
const inputRef = (0, _react.useRef)(null);
|
|
956
1028
|
const onPick = () => inputRef.current?.click();
|
|
957
1029
|
const onFile = (event) => {
|
|
@@ -1019,6 +1091,31 @@ window.__ModuleLoader__.load({
|
|
|
1019
1091
|
format: (v) => `${v}px`,
|
|
1020
1092
|
onChange: setBlur
|
|
1021
1093
|
}),
|
|
1094
|
+
history && history.length > 0 ? (0, react_jsx_runtime.jsxs)("div", {
|
|
1095
|
+
style: { ...styles.group, padding: "8px 0", borderBottom: "none" },
|
|
1096
|
+
children: [
|
|
1097
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
1098
|
+
style: styles.title,
|
|
1099
|
+
children: t("background.history")
|
|
1100
|
+
}),
|
|
1101
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
1102
|
+
style: styles.actionRow,
|
|
1103
|
+
children: history.map((entry, i) => {
|
|
1104
|
+
const isImage = entry.kind !== "gradient" && entry.kind !== "url";
|
|
1105
|
+
return (0, react_jsx_runtime.jsx)("button", {
|
|
1106
|
+
type: "button",
|
|
1107
|
+
title: t("background.historyApply"),
|
|
1108
|
+
style: {
|
|
1109
|
+
...styles.historyThumb,
|
|
1110
|
+
background: isImage ? `url("${entry.value}") center/cover no-repeat` : entry.value
|
|
1111
|
+
},
|
|
1112
|
+
onClick: () => applyFromHistory(entry.kind, entry.value),
|
|
1113
|
+
children: null
|
|
1114
|
+
}, i);
|
|
1115
|
+
})
|
|
1116
|
+
})
|
|
1117
|
+
]
|
|
1118
|
+
}) : null,
|
|
1022
1119
|
(0, react_jsx_runtime.jsx)("div", {
|
|
1023
1120
|
style: styles.hint,
|
|
1024
1121
|
children: t("background.hint")
|
|
@@ -1692,17 +1789,43 @@ window.__ModuleLoader__.load({
|
|
|
1692
1789
|
syncWallpaper();
|
|
1693
1790
|
}
|
|
1694
1791
|
|
|
1792
|
+
/** Read recent wallpaper history entries [{kind,value}]. */
|
|
1793
|
+
function readWallpaperHistory() {
|
|
1794
|
+
const raw = readStorage(WALLPAPER_HISTORY_KEY);
|
|
1795
|
+
if (raw === null) return [];
|
|
1796
|
+
try {
|
|
1797
|
+
const parsed = JSON.parse(raw);
|
|
1798
|
+
return Array.isArray(parsed) ? parsed.filter((e) => e && typeof e.value === "string") : [];
|
|
1799
|
+
} catch {
|
|
1800
|
+
return [];
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
/** Persist the wallpaper history list. */
|
|
1805
|
+
function writeWallpaperHistory(list) {
|
|
1806
|
+
writeStorage(WALLPAPER_HISTORY_KEY, JSON.stringify(list.slice(0, WALLPAPER_HISTORY_MAX)));
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
/** Record a wallpaper setting into history (dedupe by kind+value, newest first). */
|
|
1810
|
+
function pushWallpaperHistory(kind, value) {
|
|
1811
|
+
if (value === null || value === undefined || value === "") return;
|
|
1812
|
+
const list = readWallpaperHistory();
|
|
1813
|
+
const deduped = list.filter((e) => !(e.kind === kind && e.value === value));
|
|
1814
|
+
deduped.unshift({ kind, value });
|
|
1815
|
+
writeWallpaperHistory(deduped);
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1695
1818
|
/** Set a wallpaper by kind and value. */
|
|
1696
1819
|
function setWallpaperKind(ctx, kind, value) {
|
|
1697
1820
|
writeStorage(WALLPAPER_KIND_KEY, kind);
|
|
1698
1821
|
if (kind === "gradient") {
|
|
1699
1822
|
writeStorage(WALLPAPER_GRADIENT_KEY, value);
|
|
1700
|
-
if (value === null) writeStorage(WALLPAPER_GRADIENT_KEY, null);
|
|
1701
1823
|
} else if (kind === "url") {
|
|
1702
1824
|
writeStorage(WALLPAPER_URL_KEY, value);
|
|
1703
1825
|
} else {
|
|
1704
1826
|
writeStorage(WALLPAPER_KEY, value);
|
|
1705
1827
|
}
|
|
1828
|
+
pushWallpaperHistory(kind, value);
|
|
1706
1829
|
applyWallpaper2(ctx);
|
|
1707
1830
|
syncWallpaper();
|
|
1708
1831
|
}
|
|
@@ -1735,6 +1858,13 @@ window.__ModuleLoader__.load({
|
|
|
1735
1858
|
//#endregion
|
|
1736
1859
|
|
|
1737
1860
|
//#region dsh-dream-skin: P0 UI rows (accent + packs)
|
|
1861
|
+
/** Curated accent presets users can pick with one click. */
|
|
1862
|
+
const ACCENT_PRESETS = [
|
|
1863
|
+
"#4f83f2", "#2563eb", "#34d399", "#22d3ee", "#a78bfa",
|
|
1864
|
+
"#fb923c", "#f87171", "#fbbf24", "#e879f9", "#f472b6",
|
|
1865
|
+
"#2dd4bf", "#a3e635"
|
|
1866
|
+
];
|
|
1867
|
+
|
|
1738
1868
|
/**
|
|
1739
1869
|
* Accent row: pick an arbitrary brand-accent color (or clear to follow
|
|
1740
1870
|
* the active theme). Uses an `<input type="color">` + the current accent
|
|
@@ -1745,6 +1875,7 @@ window.__ModuleLoader__.load({
|
|
|
1745
1875
|
const base = useStore((s) => s.base);
|
|
1746
1876
|
const activeValue = accent !== DEFAULT_ACCENT ? accent : base;
|
|
1747
1877
|
const inputValue = normalizeHex(activeValue) || "#4f83f2";
|
|
1878
|
+
const accentPickerRef = (0, _react.useRef)(null);
|
|
1748
1879
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
1749
1880
|
style: styles.group,
|
|
1750
1881
|
children: [
|
|
@@ -1755,10 +1886,27 @@ window.__ModuleLoader__.load({
|
|
|
1755
1886
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
1756
1887
|
style: styles.actionRow,
|
|
1757
1888
|
children: [
|
|
1889
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
1890
|
+
style: { ...styles.accentDot, background: inputValue },
|
|
1891
|
+
children: null
|
|
1892
|
+
}),
|
|
1893
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
1894
|
+
style: styles.accentHex,
|
|
1895
|
+
children: inputValue
|
|
1896
|
+
}),
|
|
1897
|
+
(0, react_jsx_runtime.jsx)("button", {
|
|
1898
|
+
type: "button",
|
|
1899
|
+
style: styles.button,
|
|
1900
|
+
onClick: () => {
|
|
1901
|
+
if (accentPickerRef.current) accentPickerRef.current.click();
|
|
1902
|
+
},
|
|
1903
|
+
children: t("accent.pick")
|
|
1904
|
+
}),
|
|
1758
1905
|
(0, react_jsx_runtime.jsx)("input", {
|
|
1906
|
+
ref: accentPickerRef,
|
|
1759
1907
|
type: "color",
|
|
1760
1908
|
value: inputValue,
|
|
1761
|
-
style: {
|
|
1909
|
+
style: { display: "none" },
|
|
1762
1910
|
onChange: (event) => setAccent(event.target.value)
|
|
1763
1911
|
}),
|
|
1764
1912
|
(0, react_jsx_runtime.jsx)("button", {
|
|
@@ -1778,6 +1926,21 @@ window.__ModuleLoader__.load({
|
|
|
1778
1926
|
}) : null
|
|
1779
1927
|
]
|
|
1780
1928
|
}),
|
|
1929
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
1930
|
+
style: styles.actionRow,
|
|
1931
|
+
children: ACCENT_PRESETS.map((hex) => (0, react_jsx_runtime.jsx)("button", {
|
|
1932
|
+
type: "button",
|
|
1933
|
+
title: hex,
|
|
1934
|
+
"aria-pressed": activeValue === hex,
|
|
1935
|
+
style: {
|
|
1936
|
+
...styles.accentPreset,
|
|
1937
|
+
background: hex,
|
|
1938
|
+
...(activeValue === hex ? { outline: "2px solid var(--dsw-alias-label-primary)", outlineOffset: "1px" } : {})
|
|
1939
|
+
},
|
|
1940
|
+
onClick: () => setAccent(hex),
|
|
1941
|
+
children: null
|
|
1942
|
+
}, hex))
|
|
1943
|
+
}),
|
|
1781
1944
|
(0, react_jsx_runtime.jsx)("div", {
|
|
1782
1945
|
style: styles.hint,
|
|
1783
1946
|
children: t("accent.hint")
|
|
@@ -1922,6 +2085,21 @@ window.__ModuleLoader__.load({
|
|
|
1922
2085
|
});
|
|
1923
2086
|
}
|
|
1924
2087
|
//#endregion
|
|
2088
|
+
|
|
2089
|
+
//#region dsh-dream-skin: Appearance settings section
|
|
2090
|
+
/**
|
|
2091
|
+
* A dedicated "Theme / ๅค่ง" settings section. Hosts the skin, wallpaper,
|
|
2092
|
+
* advanced wallpaper, accent and theme-pack rows โ instead of flat rows in
|
|
2093
|
+
* the General section, they live under their own category in the settings
|
|
2094
|
+
* left nav.
|
|
2095
|
+
*/
|
|
2096
|
+
function DreamSkinSection({ renderSlot }) {
|
|
2097
|
+
return (0, react_jsx_runtime.jsx)("div", {
|
|
2098
|
+
style: styles.section,
|
|
2099
|
+
children: renderSlot("settings.dreamSkin.item", {})
|
|
2100
|
+
});
|
|
2101
|
+
}
|
|
2102
|
+
//#endregion
|
|
1925
2103
|
//#region dsh-dream-skin: client plugin body
|
|
1926
2104
|
/**
|
|
1927
2105
|
* Required services: theme runtime (skins, switching, token override
|
|
@@ -1968,7 +2146,13 @@ window.__ModuleLoader__.load({
|
|
|
1968
2146
|
wallpaperRevision += 1;
|
|
1969
2147
|
// Store the raw data URL (not the CSS url(...) wrapper) so the
|
|
1970
2148
|
// Wallpaper row can render an <img> preview and test `url !== null`.
|
|
1971
|
-
wallpaperBound?.sync(
|
|
2149
|
+
wallpaperBound?.sync(
|
|
2150
|
+
readWallpaper(),
|
|
2151
|
+
readWallpaperOpacity(),
|
|
2152
|
+
readWallpaperBlur(),
|
|
2153
|
+
readWallpaperHistory(),
|
|
2154
|
+
wallpaperRevision
|
|
2155
|
+
);
|
|
1972
2156
|
};
|
|
1973
2157
|
applyWallpaper2(ctx);
|
|
1974
2158
|
syncWallpaper();
|
|
@@ -1979,8 +2163,18 @@ window.__ModuleLoader__.load({
|
|
|
1979
2163
|
|
|
1980
2164
|
const skinStore = createSkinStore();
|
|
1981
2165
|
let skinBound;
|
|
2166
|
+
// Monotonic revision for the skin slot store. Using a locally incrementing
|
|
2167
|
+
// counter (instead of the host theme revision) guarantees the store ALWAYS
|
|
2168
|
+
// updates on every click โ even if theme/change timing races or the host
|
|
2169
|
+
// revision doesn't bump as expected โ so the selected card follows instantly.
|
|
2170
|
+
let skinRevision = 0;
|
|
2171
|
+
const syncSkinWith = (id) => {
|
|
2172
|
+
skinBound?.sync(id, ++skinRevision);
|
|
2173
|
+
// A skin/scheme switch changes the base color; re-shade the wash.
|
|
2174
|
+
if (wallpaperBackgroundCss() !== null) applyWallpaper2(ctx);
|
|
2175
|
+
};
|
|
1982
2176
|
const syncSkin = (snapshot) => {
|
|
1983
|
-
skinBound?.sync(snapshot.preference,
|
|
2177
|
+
skinBound?.sync(snapshot.preference, ++skinRevision);
|
|
1984
2178
|
// A skin/scheme switch changes the base color; re-shade the wash.
|
|
1985
2179
|
if (wallpaperBackgroundCss() !== null) applyWallpaper2(ctx);
|
|
1986
2180
|
};
|
|
@@ -1998,11 +2192,30 @@ window.__ModuleLoader__.load({
|
|
|
1998
2192
|
setSkin: (id) => {
|
|
1999
2193
|
ctx.theme.setTheme(id);
|
|
2000
2194
|
writeSavedSkin(id);
|
|
2195
|
+
// Deterministically push the new preference into the slot store AND
|
|
2196
|
+
// re-shade the wallpaper so the selected card follows immediately,
|
|
2197
|
+
// independent of theme/change emission timing.
|
|
2198
|
+
syncSkinWith(id);
|
|
2001
2199
|
}
|
|
2002
2200
|
};
|
|
2003
2201
|
};
|
|
2004
|
-
|
|
2005
|
-
|
|
2202
|
+
// Register our own "Theme / ๅค่ง" settings section. It appears in the
|
|
2203
|
+
// settings left-nav and hosts all skin features (skin, wallpaper,
|
|
2204
|
+
// advanced wallpaper, accent, theme packs) under a single category.
|
|
2205
|
+
ctx.slots.inject("settings.section", () => ctx.slots.register({
|
|
2206
|
+
name: "settings.section",
|
|
2207
|
+
id: "dream-skin",
|
|
2208
|
+
order: 10,
|
|
2209
|
+
label: "Theme / ๅค่ง",
|
|
2210
|
+
locale: SETTINGS_NS,
|
|
2211
|
+
children: { "settings.dreamSkin.item": {
|
|
2212
|
+
kind: "list",
|
|
2213
|
+
scope: "root"
|
|
2214
|
+
} }
|
|
2215
|
+
}, DreamSkinSection));
|
|
2216
|
+
|
|
2217
|
+
ctx.slots.inject("settings.dreamSkin.item", () => ctx.slots.register({
|
|
2218
|
+
name: "settings.dreamSkin.item",
|
|
2006
2219
|
id: "dream-skin",
|
|
2007
2220
|
order: 20,
|
|
2008
2221
|
store: skinStore,
|
|
@@ -2043,13 +2256,21 @@ window.__ModuleLoader__.load({
|
|
|
2043
2256
|
applyWallpaper2(ctx);
|
|
2044
2257
|
syncWallpaper();
|
|
2045
2258
|
},
|
|
2259
|
+
applyFromHistory: (kind, value) => {
|
|
2260
|
+
const resolvedKind = kind === "gradient" || kind === "url" ? kind : "image";
|
|
2261
|
+
if (value && value.length > 4) {
|
|
2262
|
+
setWallpaperKind(ctx, resolvedKind, value);
|
|
2263
|
+
} else {
|
|
2264
|
+
syncWallpaper();
|
|
2265
|
+
}
|
|
2266
|
+
},
|
|
2046
2267
|
clearWallpaper: () => {
|
|
2047
2268
|
removeWallpaper(ctx);
|
|
2048
2269
|
}
|
|
2049
2270
|
};
|
|
2050
2271
|
};
|
|
2051
|
-
ctx.slots.inject("settings.
|
|
2052
|
-
name: "settings.
|
|
2272
|
+
ctx.slots.inject("settings.dreamSkin.item", () => ctx.slots.register({
|
|
2273
|
+
name: "settings.dreamSkin.item",
|
|
2053
2274
|
id: "dream-skin-wallpaper",
|
|
2054
2275
|
order: 30,
|
|
2055
2276
|
store: wallpaperStore,
|
|
@@ -2099,8 +2320,8 @@ window.__ModuleLoader__.load({
|
|
|
2099
2320
|
}
|
|
2100
2321
|
};
|
|
2101
2322
|
};
|
|
2102
|
-
ctx.slots.inject("settings.
|
|
2103
|
-
name: "settings.
|
|
2323
|
+
ctx.slots.inject("settings.dreamSkin.item", () => ctx.slots.register({
|
|
2324
|
+
name: "settings.dreamSkin.item",
|
|
2104
2325
|
id: "dream-skin-wallpaper-advanced",
|
|
2105
2326
|
order: 31,
|
|
2106
2327
|
store: advWallpaperStore,
|
|
@@ -2135,8 +2356,8 @@ window.__ModuleLoader__.load({
|
|
|
2135
2356
|
}
|
|
2136
2357
|
};
|
|
2137
2358
|
};
|
|
2138
|
-
ctx.slots.inject("settings.
|
|
2139
|
-
name: "settings.
|
|
2359
|
+
ctx.slots.inject("settings.dreamSkin.item", () => ctx.slots.register({
|
|
2360
|
+
name: "settings.dreamSkin.item",
|
|
2140
2361
|
id: "dream-skin-accent",
|
|
2141
2362
|
order: 25,
|
|
2142
2363
|
store: accentStore,
|
|
@@ -2177,8 +2398,8 @@ window.__ModuleLoader__.load({
|
|
|
2177
2398
|
surprise: refreshSurprise
|
|
2178
2399
|
};
|
|
2179
2400
|
};
|
|
2180
|
-
ctx.slots.inject("settings.
|
|
2181
|
-
name: "settings.
|
|
2401
|
+
ctx.slots.inject("settings.dreamSkin.item", () => ctx.slots.register({
|
|
2402
|
+
name: "settings.dreamSkin.item",
|
|
2182
2403
|
id: "dream-skin-packs",
|
|
2183
2404
|
order: 40,
|
|
2184
2405
|
store: packStore,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-dream-skin",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "DeepSeek Harness ๆข่คๆไปถ (Dream Skin for DeepSeek Harness): curated --dsw-alias-* theme presets, a custom translucent wallpaper with opacity/blur controls, theme-pack import/export + share links, per-user accent, favorites & surprise-me, and durable per-browser persistence โ in the spirit of the Codex Dream Skin project.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|