@danielng23/dsh-client-ui-theme-store 0.1.0 → 0.1.2
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 +45 -14
- package/catalog/edex-themes.json +146 -6
- package/lib/client.js +37 -11
- package/lib/index.js +12 -6
- package/lib/invariant.js +2 -2
- package/lib/types/client/catalog.d.ts +11 -5
- package/lib/types/client/theme-store.d.ts +11 -2
- package/lib/types/host/installer.d.ts +3 -2
- package/lib/types/invariant.d.ts +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1,8 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
SCIFI/HUD/TERMINAL-style theme store for DeekSeek Harness.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## eDEX-UI inspired themes
|
|
6
|
+
|
|
7
|
+
The shell themes in this store are **inspired by [eDEX-UI](https://github.com/GitSquared/edex-ui)** — the sci-fi, fully-featured terminal emulator dashboard. Each variant wraps the default web surface in an eDEX-style frame:
|
|
8
|
+
|
|
9
|
+
- **Two system info panels** — live system metrics and network activity
|
|
10
|
+
- **File directory browser** — filesystem explorer
|
|
11
|
+
- **Editor + terminal** — the working surface
|
|
12
|
+
|
|
13
|
+
Every theme in the catalog is **created by agents**: the variant shells, palettes, and catalog entries are all generated automatically by AI agents, so the whole catalog is a product of automated theme creation rather than hand-authored files.
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
### Install from npm
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pnpm add @deepseek-ai/dsh-client-ui-theme-store
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Add to the harness
|
|
24
|
+
|
|
25
|
+
After installing the package, add the plugin to your harness instance's `cordis.patch.yml`:
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
- id: ui-theme-store
|
|
29
|
+
name: '@deepseek-ai/dsh-client-ui-theme-store'
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The client bundle is automatically served at `/plugins/@deepseek-ai/dsh-client-ui-theme-store/client.js`.
|
|
33
|
+
|
|
34
|
+
> "No category, just read a json file from this repo (push to github), theme contains name, author, screenshot."
|
|
6
35
|
|
|
7
36
|
## What it looks like
|
|
8
37
|
|
|
@@ -22,7 +51,7 @@ Clicking **Apply**:
|
|
|
22
51
|
|
|
23
52
|
## Catalog
|
|
24
53
|
|
|
25
|
-
The catalog is a JSON document at `catalog/themes.json` in this repository. Its structure:
|
|
54
|
+
The catalog is a JSON document at `catalog/edex-themes.json` in this repository. Its structure:
|
|
26
55
|
|
|
27
56
|
```json
|
|
28
57
|
{
|
|
@@ -63,7 +92,7 @@ The catalog is a JSON document at `catalog/themes.json` in this repository. Its
|
|
|
63
92
|
|
|
64
93
|
### Adding a theme
|
|
65
94
|
|
|
66
|
-
1. Add an entry to `catalog/themes.json`.
|
|
95
|
+
1. Add an entry to `catalog/edex-themes.json`.
|
|
67
96
|
2. Add a screenshot image to `catalog/screenshots/` (or reference an external URL in `screenshot`).
|
|
68
97
|
3. Push the repo to GitHub — the plugin will pick up the new theme on next load.
|
|
69
98
|
|
|
@@ -109,35 +138,37 @@ Two ways to compose this plugin into a running DeepSeek Harness GUI:
|
|
|
109
138
|
cp -r . /path/to/deepseek-harness/packages/client/ui-theme-store
|
|
110
139
|
```
|
|
111
140
|
2. Add a tsconfig reference — add `{ "path": "packages/client/ui-theme-store" }` to `tsconfig.client.json`'s `references`.
|
|
112
|
-
3. Add a dependency — add `"@
|
|
141
|
+
3. Add a dependency — add `"@deepseek-ai/dsh-client-ui-theme-store": "workspace:^"` to `packages/bundle/web-app/package.json`.
|
|
113
142
|
4. Add a cordis patch row — insert into `packages/bundle/web-app/cordis.patch.yml`:
|
|
114
143
|
```yaml
|
|
115
144
|
- id: ui-theme-store
|
|
116
|
-
name: '@
|
|
145
|
+
name: '@deepseek-ai/dsh-client-ui-theme-store'
|
|
117
146
|
```
|
|
118
147
|
5. Rebuild: `pnpm run build:lib:client && pnpm run build:web`.
|
|
119
148
|
|
|
120
149
|
#### B. External dependency
|
|
121
150
|
|
|
122
|
-
1. Install the package from
|
|
151
|
+
1. Install the package from npm:
|
|
123
152
|
```bash
|
|
124
|
-
pnpm add @
|
|
153
|
+
pnpm add @deepseek-ai/dsh-client-ui-theme-store
|
|
125
154
|
```
|
|
126
155
|
2. Add a row to the cordis patch (see above) and a dependency entry in `web-app/package.json`.
|
|
127
|
-
3. The client bundle (`lib/client.js`) is in the correct closure-factory format — the harness modules node half will serve it at `/plugins/@
|
|
156
|
+
3. The client bundle (`lib/client.js`) is in the correct closure-factory format — the harness modules node half will serve it at `/plugins/@deepseek-ai/dsh-client-ui-theme-store/client.js`.
|
|
128
157
|
|
|
129
158
|
### Catalog URL
|
|
130
159
|
|
|
131
|
-
The
|
|
160
|
+
The theme store loads its catalog live from this repository on GitHub, so you can add or change themes by pushing to the repo — no plugin release needed. The default catalog URL is:
|
|
132
161
|
|
|
133
162
|
```
|
|
134
|
-
https://raw.githubusercontent.com/
|
|
163
|
+
https://raw.githubusercontent.com/ph4310822/dsh-edex-themes/main/catalog/edex-themes.json
|
|
135
164
|
```
|
|
136
165
|
|
|
137
|
-
|
|
166
|
+
If GitHub is unreachable, the store falls back to the bundled catalog served by the plugin's node half at `/catalog/edex-themes.json`.
|
|
167
|
+
|
|
168
|
+
Override the default at build time by setting the environment variable:
|
|
138
169
|
|
|
139
170
|
```bash
|
|
140
|
-
DSH_CLIENT_THEME_STORE_CATALOG_URL=https://your-raw-url/catalog/themes.json pnpm run build
|
|
171
|
+
DSH_CLIENT_THEME_STORE_CATALOG_URL=https://your-raw-url/catalog/edex-themes.json pnpm run build
|
|
141
172
|
```
|
|
142
173
|
|
|
143
174
|
Or edit the constant in `src/client/catalog.ts`.
|
package/catalog/edex-themes.json
CHANGED
|
@@ -105,6 +105,41 @@
|
|
|
105
105
|
"--dsw-specific-input-major": "#151515"
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
|
+
{
|
|
109
|
+
"id": "crt",
|
|
110
|
+
"name": "Crt",
|
|
111
|
+
"author": "@danielng23",
|
|
112
|
+
"screenshot": "https://raw.githubusercontent.com/ph4310822/dsh-edex-crt-ui/main/review-shot.png",
|
|
113
|
+
"colorScheme": "dark",
|
|
114
|
+
"type": "shell",
|
|
115
|
+
"installPackage": "@danielng23/dsh-edex-crt-ui",
|
|
116
|
+
"shellPluginId": "@danielng23/dsh-crt-client-ui-edex",
|
|
117
|
+
"installHint": "dsh plugin --profile <name> add @danielng23/dsh-edex-crt-ui",
|
|
118
|
+
"tokens": {
|
|
119
|
+
"--dsw-alias-bg-base": "#000000",
|
|
120
|
+
"--dsw-alias-bg-layer-1": "#000000",
|
|
121
|
+
"--dsw-alias-bg-layer-2": "#000000",
|
|
122
|
+
"--dsw-alias-bg-overlay": "#000000",
|
|
123
|
+
"--dsw-alias-border-l1": "#135d2e",
|
|
124
|
+
"--dsw-alias-border-l2": "#2cb960",
|
|
125
|
+
"--dsw-alias-border-l3": "#09cc50",
|
|
126
|
+
"--dsw-alias-brand-primary": "#09cc50",
|
|
127
|
+
"--dsw-alias-label-primary": "#09cc50",
|
|
128
|
+
"--dsw-alias-label-primary-bluish": "#09cc50",
|
|
129
|
+
"--dsw-alias-label-primary-dimmed": "#2cb960",
|
|
130
|
+
"--dsw-alias-label-secondary": "#2cb960",
|
|
131
|
+
"--dsw-alias-label-tertiary": "#2cb960",
|
|
132
|
+
"--dsw-alias-label-caption": "#2cb960",
|
|
133
|
+
"--dsw-alias-state-error-primary": "#e65a5a",
|
|
134
|
+
"--dsw-alias-state-success-primary": "#09cc50",
|
|
135
|
+
"--dsw-alias-state-warn-primary": "#e6c85c",
|
|
136
|
+
"--dsw-alias-state-business-primary": "#09cc50",
|
|
137
|
+
"--dsw-alias-button-info-fill": "#09cc50",
|
|
138
|
+
"--dsw-alias-button-info-hover": "#2cb960",
|
|
139
|
+
"--dsw-specific-sidebar-fill": "#000000",
|
|
140
|
+
"--dsw-specific-input-major": "#000000"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
108
143
|
{
|
|
109
144
|
"id": "cyber",
|
|
110
145
|
"name": "Cyber",
|
|
@@ -280,6 +315,41 @@
|
|
|
280
315
|
"--dsw-specific-input-major": "#2f3a36"
|
|
281
316
|
}
|
|
282
317
|
},
|
|
318
|
+
{
|
|
319
|
+
"id": "lockon",
|
|
320
|
+
"name": "Lockon",
|
|
321
|
+
"author": "@danielng23",
|
|
322
|
+
"screenshot": "https://raw.githubusercontent.com/ph4310822/dsh-edex-lockon-ui/main/review-shot.png",
|
|
323
|
+
"colorScheme": "dark",
|
|
324
|
+
"type": "shell",
|
|
325
|
+
"installPackage": "@danielng23/dsh-edex-lockon-ui",
|
|
326
|
+
"shellPluginId": "@danielng23/dsh-lockon-client-ui-edex",
|
|
327
|
+
"installHint": "dsh plugin --profile <name> add @danielng23/dsh-edex-lockon-ui",
|
|
328
|
+
"tokens": {
|
|
329
|
+
"--dsw-alias-bg-base": "#181c1d",
|
|
330
|
+
"--dsw-alias-bg-layer-1": "#181c1d",
|
|
331
|
+
"--dsw-alias-bg-layer-2": "#181c1d",
|
|
332
|
+
"--dsw-alias-bg-overlay": "#181c1d",
|
|
333
|
+
"--dsw-alias-border-l1": "#601b10",
|
|
334
|
+
"--dsw-alias-border-l2": "#c03b26",
|
|
335
|
+
"--dsw-alias-border-l3": "#ff4b2f",
|
|
336
|
+
"--dsw-alias-brand-primary": "#ff4b2f",
|
|
337
|
+
"--dsw-alias-label-primary": "#ff4b2f",
|
|
338
|
+
"--dsw-alias-label-primary-bluish": "#ff4b2f",
|
|
339
|
+
"--dsw-alias-label-primary-dimmed": "#c03b26",
|
|
340
|
+
"--dsw-alias-label-secondary": "#c03b26",
|
|
341
|
+
"--dsw-alias-label-tertiary": "#c03b26",
|
|
342
|
+
"--dsw-alias-label-caption": "#c03b26",
|
|
343
|
+
"--dsw-alias-state-error-primary": "#d93624",
|
|
344
|
+
"--dsw-alias-state-success-primary": "#ff4b2f",
|
|
345
|
+
"--dsw-alias-state-warn-primary": "#ff6338",
|
|
346
|
+
"--dsw-alias-state-business-primary": "#ff4b2f",
|
|
347
|
+
"--dsw-alias-button-info-fill": "#ff4b2f",
|
|
348
|
+
"--dsw-alias-button-info-hover": "#c03b26",
|
|
349
|
+
"--dsw-specific-sidebar-fill": "#181c1d",
|
|
350
|
+
"--dsw-specific-input-major": "#181c1d"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
283
353
|
{
|
|
284
354
|
"id": "medical",
|
|
285
355
|
"name": "Medical",
|
|
@@ -315,6 +385,41 @@
|
|
|
315
385
|
"--dsw-specific-input-major": "#0a252c"
|
|
316
386
|
}
|
|
317
387
|
},
|
|
388
|
+
{
|
|
389
|
+
"id": "mission",
|
|
390
|
+
"name": "Mission",
|
|
391
|
+
"author": "@danielng23",
|
|
392
|
+
"screenshot": "https://raw.githubusercontent.com/ph4310822/dsh-edex-mission-ui/main/review-shot.png",
|
|
393
|
+
"colorScheme": "dark",
|
|
394
|
+
"type": "shell",
|
|
395
|
+
"installPackage": "@danielng23/dsh-edex-mission-ui",
|
|
396
|
+
"shellPluginId": "@danielng23/dsh-mission-client-ui-edex",
|
|
397
|
+
"installHint": "dsh plugin --profile <name> add @danielng23/dsh-edex-mission-ui",
|
|
398
|
+
"tokens": {
|
|
399
|
+
"--dsw-alias-bg-base": "#0d1626",
|
|
400
|
+
"--dsw-alias-bg-layer-1": "#0d1626",
|
|
401
|
+
"--dsw-alias-bg-layer-2": "#0d1626",
|
|
402
|
+
"--dsw-alias-bg-overlay": "#0d1626",
|
|
403
|
+
"--dsw-alias-border-l1": "#1e3a5f",
|
|
404
|
+
"--dsw-alias-border-l2": "#26a9c0",
|
|
405
|
+
"--dsw-alias-border-l3": "#00d9ff",
|
|
406
|
+
"--dsw-alias-brand-primary": "#00d9ff",
|
|
407
|
+
"--dsw-alias-label-primary": "#00d9ff",
|
|
408
|
+
"--dsw-alias-label-primary-bluish": "#00d9ff",
|
|
409
|
+
"--dsw-alias-label-primary-dimmed": "#26a9c0",
|
|
410
|
+
"--dsw-alias-label-secondary": "#26a9c0",
|
|
411
|
+
"--dsw-alias-label-tertiary": "#26a9c0",
|
|
412
|
+
"--dsw-alias-label-caption": "#26a9c0",
|
|
413
|
+
"--dsw-alias-state-error-primary": "#ff3366",
|
|
414
|
+
"--dsw-alias-state-success-primary": "#00ff9d",
|
|
415
|
+
"--dsw-alias-state-warn-primary": "#ffd600",
|
|
416
|
+
"--dsw-alias-state-business-primary": "#00d9ff",
|
|
417
|
+
"--dsw-alias-button-info-fill": "#00d9ff",
|
|
418
|
+
"--dsw-alias-button-info-hover": "#26a9c0",
|
|
419
|
+
"--dsw-specific-sidebar-fill": "#0d1626",
|
|
420
|
+
"--dsw-specific-input-major": "#0d1626"
|
|
421
|
+
}
|
|
422
|
+
},
|
|
318
423
|
{
|
|
319
424
|
"id": "module",
|
|
320
425
|
"name": "Module",
|
|
@@ -466,10 +571,10 @@
|
|
|
466
571
|
"shellPluginId": "@danielng23/dsh-redalert-client-ui-edex",
|
|
467
572
|
"installHint": "dsh plugin --profile <name> add @danielng23/dsh-edex-redalert-ui",
|
|
468
573
|
"tokens": {
|
|
469
|
-
"--dsw-alias-bg-base": "#
|
|
470
|
-
"--dsw-alias-bg-layer-1": "#
|
|
471
|
-
"--dsw-alias-bg-layer-2": "#
|
|
472
|
-
"--dsw-alias-bg-overlay": "#
|
|
574
|
+
"--dsw-alias-bg-base": "#0b4d91",
|
|
575
|
+
"--dsw-alias-bg-layer-1": "#0b4d91",
|
|
576
|
+
"--dsw-alias-bg-layer-2": "#0b4d91",
|
|
577
|
+
"--dsw-alias-bg-overlay": "#0b4d91",
|
|
473
578
|
"--dsw-alias-border-l1": "#103f60",
|
|
474
579
|
"--dsw-alias-border-l2": "#267fc0",
|
|
475
580
|
"--dsw-alias-border-l3": "#c8e8ff",
|
|
@@ -486,8 +591,8 @@
|
|
|
486
591
|
"--dsw-alias-state-business-primary": "#c8e8ff",
|
|
487
592
|
"--dsw-alias-button-info-fill": "#c8e8ff",
|
|
488
593
|
"--dsw-alias-button-info-hover": "#267fc0",
|
|
489
|
-
"--dsw-specific-sidebar-fill": "#
|
|
490
|
-
"--dsw-specific-input-major": "#
|
|
594
|
+
"--dsw-specific-sidebar-fill": "#0b4d91",
|
|
595
|
+
"--dsw-specific-input-major": "#0b4d91"
|
|
491
596
|
}
|
|
492
597
|
},
|
|
493
598
|
{
|
|
@@ -595,6 +700,41 @@
|
|
|
595
700
|
"--dsw-specific-input-major": "#0a0410"
|
|
596
701
|
}
|
|
597
702
|
},
|
|
703
|
+
{
|
|
704
|
+
"id": "edex",
|
|
705
|
+
"name": "eDEX",
|
|
706
|
+
"author": "@danielng23",
|
|
707
|
+
"screenshot": "https://raw.githubusercontent.com/ph4310822/dsh-edex-ui/main/probe-fullscreen-final.png",
|
|
708
|
+
"colorScheme": "dark",
|
|
709
|
+
"type": "shell",
|
|
710
|
+
"installPackage": "@danielng23/dsh-edex-ui",
|
|
711
|
+
"shellPluginId": "@danielng23/dsh-client-ui-edex",
|
|
712
|
+
"installHint": "dsh plugin --profile <name> add @danielng23/dsh-edex-ui",
|
|
713
|
+
"tokens": {
|
|
714
|
+
"--dsw-alias-bg-base": "#000000",
|
|
715
|
+
"--dsw-alias-bg-layer-1": "#000000",
|
|
716
|
+
"--dsw-alias-bg-layer-2": "#000000",
|
|
717
|
+
"--dsw-alias-bg-overlay": "#000000",
|
|
718
|
+
"--dsw-alias-border-l1": "#155b2d",
|
|
719
|
+
"--dsw-alias-border-l2": "#30b65f",
|
|
720
|
+
"--dsw-alias-border-l3": "#46f282",
|
|
721
|
+
"--dsw-alias-brand-primary": "#46f282",
|
|
722
|
+
"--dsw-alias-label-primary": "#46f282",
|
|
723
|
+
"--dsw-alias-label-primary-bluish": "#46f282",
|
|
724
|
+
"--dsw-alias-label-primary-dimmed": "#30b65f",
|
|
725
|
+
"--dsw-alias-label-secondary": "#30b65f",
|
|
726
|
+
"--dsw-alias-label-tertiary": "#30b65f",
|
|
727
|
+
"--dsw-alias-label-caption": "#30b65f",
|
|
728
|
+
"--dsw-alias-state-error-primary": "#e65a5a",
|
|
729
|
+
"--dsw-alias-state-success-primary": "#46f282",
|
|
730
|
+
"--dsw-alias-state-warn-primary": "#e6c85c",
|
|
731
|
+
"--dsw-alias-state-business-primary": "#46f282",
|
|
732
|
+
"--dsw-alias-button-info-fill": "#46f282",
|
|
733
|
+
"--dsw-alias-button-info-hover": "#30b65f",
|
|
734
|
+
"--dsw-specific-sidebar-fill": "#000000",
|
|
735
|
+
"--dsw-specific-input-major": "#000000"
|
|
736
|
+
}
|
|
737
|
+
},
|
|
598
738
|
{
|
|
599
739
|
"id": "wasp",
|
|
600
740
|
"name": "Wasp",
|
package/lib/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
window.__ModuleLoader__.load({
|
|
2
|
-
id: "@
|
|
2
|
+
id: "@deepseek-ai/dsh-client-ui-theme-store",
|
|
3
3
|
factory: (require) => {
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
@@ -9,10 +9,10 @@ window.__ModuleLoader__.load({
|
|
|
9
9
|
let _deepseek_ai_dsh_client_runtime_client = require("@deepseek-ai/dsh-client-runtime/client");
|
|
10
10
|
//#region \0dsh-css:/Users/daniel/workspace/dsh-edex-themes/src/client/ThemeStoreSection.module.css.mjs
|
|
11
11
|
const css = "._20S4Kq_section{flex-direction:column;gap:1rem;padding:0;display:flex}._20S4Kq_header{flex-direction:column;gap:.25rem;display:flex}._20S4Kq_title{color:var(--dsw-alias-label-primary);margin:0;font-size:1.125rem;font-weight:600;line-height:1.5}._20S4Kq_subtitle{color:var(--dsw-alias-label-secondary);margin:0;font-size:.8125rem;line-height:1.4}._20S4Kq_banner{border:1px solid color-mix(in srgb, var(--dsw-alias-state-success-primary,#2e7d32) 45%, transparent);background:color-mix(in srgb, var(--dsw-alias-state-success-primary,#2e7d32) 10%, transparent);border-radius:6px;align-items:center;gap:.5rem;padding:.625rem .75rem;display:flex}._20S4Kq_bannerText{color:var(--dsw-alias-label-primary);flex:1;margin:0;font-size:.8125rem;line-height:1.4}._20S4Kq_bannerDismiss{width:1.5rem;height:1.5rem;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;font-size:1rem;line-height:1}._20S4Kq_bannerDismiss:hover{background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary)}._20S4Kq_status{color:var(--dsw-alias-label-secondary);margin:0;font-size:.8125rem;line-height:1.4}._20S4Kq_failure{border:1px solid var(--dsw-alias-state-error-primary,#e03e3e);background:color-mix(in srgb, var(--dsw-alias-state-error-primary,#e03e3e) 8%, transparent);border-radius:6px;flex-direction:column;gap:.5rem;padding:1rem;display:flex}._20S4Kq_failure p{color:var(--dsw-alias-label-primary);white-space:pre-wrap;margin:0;font-size:.8125rem}._20S4Kq_retry{align-self:flex-start}._20S4Kq_grid{grid-template-columns:1fr;gap:.75rem;display:grid}._20S4Kq_card{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:8px;flex-direction:column;gap:.75rem;transition:box-shadow .15s,border-color .15s;display:flex;overflow:hidden}._20S4Kq_card:hover{border-color:var(--dsw-alias-border-l2);box-shadow:0 1px 4px #00000014}._20S4Kq_screenshot{aspect-ratio:16/9;background:var(--dsw-alias-bg-layer-2);justify-content:center;align-items:center;width:100%;display:flex;overflow:hidden}._20S4Kq_screenshotImg{object-fit:cover;width:100%;height:100%;display:block}._20S4Kq_swatchFallback{flex-wrap:wrap;justify-content:center;align-items:center;gap:2px;padding:8px;display:flex}._20S4Kq_swatch{border:1px solid var(--dsw-alias-border-l1);border-radius:4px;width:28px;height:28px;display:block}._20S4Kq_cardBody{flex-direction:column;gap:.25rem;padding:0;display:flex}._20S4Kq_cardMain{flex-direction:column;flex:1;gap:0;min-width:0;padding:.625rem .75rem .75rem;display:flex}._20S4Kq_cardName{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;font-weight:600;line-height:1.4;overflow:hidden}._20S4Kq_cardAuthor{color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;font-size:.75rem;line-height:1.3;overflow:hidden}._20S4Kq_cardScheme{background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);border:1px solid var(--dsw-alias-border-l1);border-radius:4px;align-self:flex-start;padding:1px 6px;font-size:.6875rem;line-height:1.2}._20S4Kq_cardScheme[data-scheme=dark]{color:#ccc;background:#1e1e1e;border-color:#444}._20S4Kq_cardScheme[data-scheme=light]{color:#333;background:#f5f5f5;border-color:#ddd}._20S4Kq_cardTags{align-items:center;gap:.375rem;display:flex}._20S4Kq_cardType{background:color-mix(in srgb, var(--dsw-alias-brand-primary,#4ea1ff) 12%, transparent);color:var(--dsw-alias-brand-primary,#4ea1ff);border:1px solid color-mix(in srgb, var(--dsw-alias-brand-primary,#4ea1ff) 35%, transparent);border-radius:4px;padding:1px 6px;font-size:.6875rem;line-height:1.2}._20S4Kq_installBox{flex-direction:column;gap:.375rem;padding:0;display:flex}._20S4Kq_installNote{color:var(--dsw-alias-label-secondary);margin:0;font-size:.6875rem;line-height:1.3}._20S4Kq_installCommand{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;user-select:all;border-radius:4px;padding:.375rem .5rem;font-size:.6875rem;line-height:1.4;display:block;overflow:hidden}._20S4Kq_installError{color:var(--dsw-alias-state-error-primary,#e03e3e);white-space:pre-wrap;margin:0;font-size:.6875rem;line-height:1.3}._20S4Kq_progress{flex-direction:column;gap:.25rem;display:flex}._20S4Kq_progressBar{background:var(--dsw-alias-bg-layer-2);border-radius:2px;height:4px;display:block;position:relative;overflow:hidden}._20S4Kq_progressBar:after{content:\"\";background:var(--dsw-alias-brand-primary,#4ea1ff);border-radius:2px;width:40%;animation:1.2s ease-in-out infinite _20S4Kq_dshThemeStoreIndeterminate;position:absolute;inset:0}@keyframes _20S4Kq_dshThemeStoreIndeterminate{0%{transform:translate(-100%)}to{transform:translate(250%)}}._20S4Kq_progressLabel{color:var(--dsw-alias-label-secondary);font-size:.6875rem;line-height:1.3}._20S4Kq_applyBtn{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-self:flex-start;margin:.5rem 0 0;padding:.375rem .75rem;font-size:.8125rem;font-weight:500;line-height:1.4;transition:background .12s,border-color .12s}._20S4Kq_applyBtn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-1);border-color:var(--dsw-alias-border-l2)}._20S4Kq_applyBtn:disabled{opacity:.6;cursor:default;background:color-mix(in srgb, var(--dsw-alias-state-success-primary,#2e7d32) 6%, var(--dsw-alias-bg-layer-2));border-color:var(--dsw-alias-state-success-primary,#2e7d32);color:var(--dsw-alias-state-success-primary,#2e7d32)}";
|
|
12
|
-
const tagId = "@
|
|
12
|
+
const tagId = "@deepseek-ai/dsh-client-ui-theme-store/ThemeStoreSection.module.css";
|
|
13
13
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
14
14
|
const tag = document.createElement("style");
|
|
15
|
-
tag.dataset.plugin = "@
|
|
15
|
+
tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-theme-store";
|
|
16
16
|
tag.dataset.pluginCss = tagId;
|
|
17
17
|
tag.textContent = css;
|
|
18
18
|
document.head.appendChild(tag);
|
|
@@ -341,12 +341,18 @@ window.__ModuleLoader__.load({
|
|
|
341
341
|
* service (`id`, `colorScheme`, `tokens`).
|
|
342
342
|
*/
|
|
343
343
|
/**
|
|
344
|
-
* Default catalog URL
|
|
345
|
-
*
|
|
346
|
-
*
|
|
347
|
-
* DSH_CLIENT_THEME_STORE_CATALOG_URL.
|
|
344
|
+
* Default catalog URL: the live catalog in this repository, fetched from
|
|
345
|
+
* GitHub raw so themes update by pushing to the repo — no plugin release
|
|
346
|
+
* required. Overridable at build time via DSH_CLIENT_THEME_STORE_CATALOG_URL.
|
|
348
347
|
*/
|
|
349
|
-
const DEFAULT_CATALOG_URL = "/catalog/edex-themes.json";
|
|
348
|
+
const DEFAULT_CATALOG_URL = "https://raw.githubusercontent.com/ph4310822/dsh-edex-themes/main/catalog/edex-themes.json";
|
|
349
|
+
/**
|
|
350
|
+
* Bundled fallback: the catalog shipped with the plugin, served by the node
|
|
351
|
+
* half at the same-origin webserver route. Used when the live GitHub fetch
|
|
352
|
+
* fails (offline / GitHub unreachable), so the store still shows the shipped
|
|
353
|
+
* themes rather than an empty error state.
|
|
354
|
+
*/
|
|
355
|
+
const LOCAL_CATALOG_URL = "/catalog/edex-themes.json";
|
|
350
356
|
/** Resolve the effective catalog URL (build-time override, else default). */
|
|
351
357
|
function catalogUrl() {
|
|
352
358
|
const override = typeof process !== "undefined" ? process.env.DSH_CLIENT_THEME_STORE_CATALOG_URL : void 0;
|
|
@@ -497,8 +503,10 @@ window.__ModuleLoader__.load({
|
|
|
497
503
|
}
|
|
498
504
|
/**
|
|
499
505
|
* Load the catalog from the configured URL and reconcile the persisted
|
|
500
|
-
* applied theme.
|
|
501
|
-
* the
|
|
506
|
+
* applied theme. If the live (GitHub) source is unreachable, falls back to
|
|
507
|
+
* the bundled catalog served by the node half. Safe to call repeatedly
|
|
508
|
+
* (retry); a total failure leaves the previous ready state intact and
|
|
509
|
+
* reports an error snapshot.
|
|
502
510
|
* @returns completion of the load.
|
|
503
511
|
*/
|
|
504
512
|
async load() {
|
|
@@ -508,7 +516,7 @@ window.__ModuleLoader__.load({
|
|
|
508
516
|
error: void 0
|
|
509
517
|
});
|
|
510
518
|
try {
|
|
511
|
-
const catalog = await
|
|
519
|
+
const catalog = await this.fetchCatalogWithFallback();
|
|
512
520
|
if (this.disposed) return;
|
|
513
521
|
this.publish({
|
|
514
522
|
status: "ready",
|
|
@@ -525,6 +533,24 @@ window.__ModuleLoader__.load({
|
|
|
525
533
|
}
|
|
526
534
|
}
|
|
527
535
|
/**
|
|
536
|
+
* Fetch the catalog, falling back to the bundled local route when the
|
|
537
|
+
* configured (GitHub) source fails. A non-GitHub href is tried as-is; when
|
|
538
|
+
* it and the local fallback both fail, the original error surfaces.
|
|
539
|
+
* @returns the fetched catalog.
|
|
540
|
+
*/
|
|
541
|
+
async fetchCatalogWithFallback() {
|
|
542
|
+
try {
|
|
543
|
+
return await fetchCatalog(this.href);
|
|
544
|
+
} catch (primaryError) {
|
|
545
|
+
if (this.href === "/catalog/edex-themes.json") throw primaryError;
|
|
546
|
+
try {
|
|
547
|
+
return await fetchCatalog(LOCAL_CATALOG_URL);
|
|
548
|
+
} catch {
|
|
549
|
+
throw primaryError;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
528
554
|
* Apply a catalog theme: register it with the harness theme service if
|
|
529
555
|
* needed, switch the active preference to it, and persist the id.
|
|
530
556
|
* @param id - a catalog theme id.
|
package/lib/index.js
CHANGED
|
@@ -821,7 +821,8 @@ const ThemeStoreSettingsSchema = Schema.object({ [THEME_STORE_APPLIED_FIELD]: Sc
|
|
|
821
821
|
* hot-reload would not re-fiber.
|
|
822
822
|
*
|
|
823
823
|
* The active profile is discovered by scanning `$DSH_HOME/profiles/*` for the
|
|
824
|
-
* directory whose `node_modules/@
|
|
824
|
+
* directory whose `node_modules/@deepseek-ai/dsh-client-ui-theme-store` (or
|
|
825
|
+
* `@danielng23/dsh-client-ui-theme-store` when installed from npm)
|
|
825
826
|
* resolves to this package.
|
|
826
827
|
*/
|
|
827
828
|
/** The three base row ids every eDEX variant bundle inserts. */
|
|
@@ -836,9 +837,11 @@ const VARIANT_ROW_SUFFIXES = [
|
|
|
836
837
|
"-ui-edex",
|
|
837
838
|
"-ui-theme-terminal"
|
|
838
839
|
];
|
|
839
|
-
/** The variant id derived from a bundle package name (`@danielng23/dsh-edex-armory-ui` → `armory`). */
|
|
840
|
+
/** The variant id derived from a bundle package name (`@danielng23/dsh-edex-armory-ui` → `armory`, `@danielng23/dsh-edex-ui` → `edex`). */
|
|
840
841
|
function variantIdOf(bundlePackage) {
|
|
841
|
-
|
|
842
|
+
const slug = bundlePackage.slice(bundlePackage.lastIndexOf("/") + 1);
|
|
843
|
+
if (slug === "dsh-edex-ui") return "edex";
|
|
844
|
+
return slug.replace(/^dsh-edex-/, "").replace(/-ui$/, "");
|
|
842
845
|
}
|
|
843
846
|
/** Resolve $DSH_HOME (mirrors dsh-home-paths): $DSH_HOME, else ~/.dsh. */
|
|
844
847
|
function dshHome() {
|
|
@@ -855,10 +858,13 @@ function resolveActiveProfileDir() {
|
|
|
855
858
|
for (const name of readdirSync(profilesDir, { withFileTypes: true })) {
|
|
856
859
|
if (!name.isDirectory()) continue;
|
|
857
860
|
const dir = join(profilesDir, name.name);
|
|
858
|
-
const marker = join(dir, "node_modules/@
|
|
859
|
-
|
|
861
|
+
const marker = join(dir, "node_modules/@deepseek-ai/dsh-client-ui-theme-store/package.json");
|
|
862
|
+
const markerNg = join(dir, "node_modules/@danielng23/dsh-client-ui-theme-store/package.json");
|
|
863
|
+
const markerPath = existsSync(marker) ? marker : existsSync(markerNg) ? markerNg : void 0;
|
|
864
|
+
if (markerPath === void 0) continue;
|
|
860
865
|
try {
|
|
861
|
-
|
|
866
|
+
const manifest = JSON.parse(readFileSync(markerPath, "utf8"));
|
|
867
|
+
if (manifest.name === "@deepseek-ai/dsh-client-ui-theme-store" || manifest.name === "@danielng23/dsh-client-ui-theme-store") return dir;
|
|
862
868
|
} catch {}
|
|
863
869
|
}
|
|
864
870
|
}
|
package/lib/invariant.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
//#region lib/types/invariant.js
|
|
2
2
|
/**
|
|
3
3
|
* Package-owned invariant companion.
|
|
4
|
-
* @module @
|
|
4
|
+
* @module @deepseek-ai/dsh-client-ui-theme-store/invariant
|
|
5
5
|
*/
|
|
6
|
-
const PACKAGE_NAME = "@
|
|
6
|
+
const PACKAGE_NAME = "@deepseek-ai/dsh-client-ui-theme-store";
|
|
7
7
|
/** Cordis companion plugin name. */
|
|
8
8
|
const name = "client-ui-theme-store-invariant";
|
|
9
9
|
/** Service required before the companion can reserve package ownership. */
|
|
@@ -10,12 +10,18 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { ThemeDefinition } from '@deepseek-ai/dsh-client-ui-theme/client';
|
|
12
12
|
/**
|
|
13
|
-
* Default catalog URL
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* DSH_CLIENT_THEME_STORE_CATALOG_URL.
|
|
13
|
+
* Default catalog URL: the live catalog in this repository, fetched from
|
|
14
|
+
* GitHub raw so themes update by pushing to the repo — no plugin release
|
|
15
|
+
* required. Overridable at build time via DSH_CLIENT_THEME_STORE_CATALOG_URL.
|
|
17
16
|
*/
|
|
18
|
-
export declare const DEFAULT_CATALOG_URL = "/catalog/edex-themes.json";
|
|
17
|
+
export declare const DEFAULT_CATALOG_URL = "https://raw.githubusercontent.com/ph4310822/dsh-edex-themes/main/catalog/edex-themes.json";
|
|
18
|
+
/**
|
|
19
|
+
* Bundled fallback: the catalog shipped with the plugin, served by the node
|
|
20
|
+
* half at the same-origin webserver route. Used when the live GitHub fetch
|
|
21
|
+
* fails (offline / GitHub unreachable), so the store still shows the shipped
|
|
22
|
+
* themes rather than an empty error state.
|
|
23
|
+
*/
|
|
24
|
+
export declare const LOCAL_CATALOG_URL = "/catalog/edex-themes.json";
|
|
19
25
|
/** Resolve the effective catalog URL (build-time override, else default). */
|
|
20
26
|
export declare function catalogUrl(): string;
|
|
21
27
|
/**
|
|
@@ -61,11 +61,20 @@ export declare class ThemeStoreRuntime {
|
|
|
61
61
|
subscribe(listener: () => void): () => void;
|
|
62
62
|
/**
|
|
63
63
|
* Load the catalog from the configured URL and reconcile the persisted
|
|
64
|
-
* applied theme.
|
|
65
|
-
* the
|
|
64
|
+
* applied theme. If the live (GitHub) source is unreachable, falls back to
|
|
65
|
+
* the bundled catalog served by the node half. Safe to call repeatedly
|
|
66
|
+
* (retry); a total failure leaves the previous ready state intact and
|
|
67
|
+
* reports an error snapshot.
|
|
66
68
|
* @returns completion of the load.
|
|
67
69
|
*/
|
|
68
70
|
load(): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Fetch the catalog, falling back to the bundled local route when the
|
|
73
|
+
* configured (GitHub) source fails. A non-GitHub href is tried as-is; when
|
|
74
|
+
* it and the local fallback both fail, the original error surfaces.
|
|
75
|
+
* @returns the fetched catalog.
|
|
76
|
+
*/
|
|
77
|
+
private fetchCatalogWithFallback;
|
|
69
78
|
/**
|
|
70
79
|
* Apply a catalog theme: register it with the harness theme service if
|
|
71
80
|
* needed, switch the active preference to it, and persist the id.
|
|
@@ -14,10 +14,11 @@
|
|
|
14
14
|
* hot-reload would not re-fiber.
|
|
15
15
|
*
|
|
16
16
|
* The active profile is discovered by scanning `$DSH_HOME/profiles/*` for the
|
|
17
|
-
* directory whose `node_modules/@
|
|
17
|
+
* directory whose `node_modules/@deepseek-ai/dsh-client-ui-theme-store` (or
|
|
18
|
+
* `@danielng23/dsh-client-ui-theme-store` when installed from npm)
|
|
18
19
|
* resolves to this package.
|
|
19
20
|
*/
|
|
20
|
-
/** The variant id derived from a bundle package name (`@danielng23/dsh-edex-armory-ui` → `armory`). */
|
|
21
|
+
/** The variant id derived from a bundle package name (`@danielng23/dsh-edex-armory-ui` → `armory`, `@danielng23/dsh-edex-ui` → `edex`). */
|
|
21
22
|
export declare function variantIdOf(bundlePackage: string): string;
|
|
22
23
|
/** Resolve $DSH_HOME (mirrors dsh-home-paths): $DSH_HOME, else ~/.dsh. */
|
|
23
24
|
declare function dshHome(): string;
|
package/lib/types/invariant.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielng23/dsh-client-ui-theme-store",
|
|
3
3
|
"description": "Theme store plugin for the DeepSeek Harness web GUI: a settings Theme Store page that reads a JSON theme catalog from this repository (GitHub), shows name/author/screenshot cards, and applies selected --dsw-* token themes through the harness theme service",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -42,6 +42,14 @@
|
|
|
42
42
|
"platform": "web"
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsc -b tsconfig.json && tsdown",
|
|
47
|
+
"bundle": "tsdown",
|
|
48
|
+
"watch": "tsdown --watch",
|
|
49
|
+
"test": "vitest run",
|
|
50
|
+
"test:watch": "vitest",
|
|
51
|
+
"typecheck": "tsc -b tsconfig.json --pretty false"
|
|
52
|
+
},
|
|
45
53
|
"license": "MIT",
|
|
46
54
|
"peerDependencies": {
|
|
47
55
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
@@ -92,13 +100,5 @@
|
|
|
92
100
|
],
|
|
93
101
|
"dependencies": {
|
|
94
102
|
"js-yaml": "^5.4.1"
|
|
95
|
-
},
|
|
96
|
-
"scripts": {
|
|
97
|
-
"build": "tsc -b tsconfig.json && tsdown",
|
|
98
|
-
"bundle": "tsdown",
|
|
99
|
-
"watch": "tsdown --watch",
|
|
100
|
-
"test": "vitest run",
|
|
101
|
-
"test:watch": "vitest",
|
|
102
|
-
"typecheck": "tsc -b tsconfig.json --pretty false"
|
|
103
103
|
}
|
|
104
|
-
}
|
|
104
|
+
}
|