dsh-theme-mineradio 0.1.0 → 2.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 John Wu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,90 +1,58 @@
1
1
  # dsh-theme-mineradio
2
2
 
3
- **Mineradio**([github.com/XxHuberrr/Mineradio](https://github.com/XxHuberrr/Mineradio))的 UI 视觉风格移植成 **DeepSeek Harness (dsh) Web UI 主题插件**。
3
+ English | [中文](README.zh.md)
4
4
 
5
- 风格定位:暗色玻璃拟态(Glassmorphism)+ 青/金霓虹,外加一层**电影感漂移光晕的动态背景**。
5
+ **Mineradio** is a cinematic glassmorphism theme for the DeepSeek Harness web UI — a faithful re-skin of the Mineradio "private visual radio" identity. The header, sidebar, composer, stats line, and trajectory view become panes of warm champagne glass over a near-black studio backdrop. You can put a video as wallpaper and switch it off and the stock UI comes back exactly, with no source changes to DSH itself.
6
6
 
7
- - 招牌青 `#00F5D4`、香槟金 `#f4d28a`、近黑底 `#08090B`、大量 `backdrop-blur` 与青色微光阴影
8
- - 动态背景:青 / 金 / 青蓝三团光晕用 CSS `@keyframes` 缓慢漂移,尊重 `prefers-reduced-motion`
9
- - UI 表面半透明,光晕从缝隙透出,复刻 Mineradio 的「沉浸式」观感
7
+ ## What ports from Mineradio
10
8
 
11
- > 仅作视觉风格参考移植,配色与动画为按其公开的 `index.css` 还原;Mineradio 的界面视觉设计与原创表达归原作者所有。
9
+ - **Champagne-gold identity** — the signature palette (`#f4d28a` champagne, `#7ad7c2` mint, `#ff5367` ember rose over a warm near-black `#08090B`) drives every alias token: surfaces, hairline strokes, text ink, buttons, scrollbars, and warm-tinted shadows with a gold bloom.
10
+ - **Typography** — Inter + Noto Sans SC for the UI, self-hosted so there's no shell/fontsource dependency.
11
+ - **Cinematic glow** — a champagne-gold ambient bloom sits behind the glass; the spotlight hue knob sweeps it from warm amber to mint while keeping the brand warm.
12
+ - **Fluid backdrop** — a living fluid board (hue + depth adjustable, defaults to warm gold) or your own wallpaper (image or video) with its own blur and frost.
12
13
 
13
- ---
14
+ ## Features
14
15
 
15
- ## 它到底改了什么(原理)
16
+ - **Two modes**: **Mica** restyles the layout into floating glass cards (blur and frost adjustable), while **Compatibility Mode** keeps the stock layout byte-for-byte and only swaps the material to generic glass — other plugins' UI gets the same treatment automatically
17
+ - **Free backdrop**: a living fluid board (hue adjustable) or your own wallpaper (fills the page, aspect preserved, with its own blur and frost); light wallpapers look best in light mode, dark wallpapers in dark mode
18
+ - **Background brightness**: follows the resolved scheme — dark mode darkens (0–50), light mode brightens (50–100), 50 is unchanged
19
+ - **Ambient decor**: particle whale in the chat center, star particles, and an interactive dot-grid mesh — all toggleable
20
+ - **Champagne glow**: a pointer-tracking glow over the glass panes, plus a hover press-down for tactile depth
21
+ - One switch: off restores the stock UI exactly, and every effect is removed with the plugin
16
22
 
17
- dsh 的 Web UI 配色是一套两层 CSS 变量:`--dsw-static-*`(静态色板)和 `--dsw-alias-*`(语义别名,100+ 个)。本插件做两件事,全部在**浏览器半(Client half)**完成:
23
+ ## Installation
18
24
 
19
- 1. **注册主题**:`ctx.theme.register(theme)` 把 Mineradio 配色映射进 `--dsw-alias-*`。注册后主题出现在 dsh 内置「设置 → 外观 / 主题」切换器,选择由 dsh 自己的 `ui-theme` 命名空间持久化(跨重启保留)。
20
- 2. **注入动态背景层**:在 `document.body` 挂一个 `position: fixed; z-index: -1` 的全屏层,里面跑 CSS 动画光晕。因为主题把 UI 表面设成了半透明(`rgba(...)`),光晕会从面板缝隙透出来。
21
-
22
- 全程**零侵入核心 UI、不需要 Host 半、不踩浏览器侧 settings 白名单**(`settings-not-exposed`)。
23
-
24
- ---
25
-
26
- ## 文件结构
25
+ ### Windows (one command)
27
26
 
27
+ ```powershell
28
+ powershell -ExecutionPolicy Bypass -Command "Invoke-WebRequest 'https://github.com/dhicoc/dsh-mineradio/raw/main/install.ps1' -OutFile install.ps1; .\install.ps1"
28
29
  ```
29
- project_017+dsh-theme-plugin/
30
- ├── package.json # 含 dsh.client 声明 + exports["./client"]
31
- ├── tsconfig.json # Host 半(Node)编译配置
32
- ├── tsdown.config.ts # 浏览器半打包(单文件 CJS)
33
- ├── cordis.patch.yml # 手动安装时贴进 profiles/web/cordis.patch.yml
34
- ├── scripts/
35
- │ └── wrap-client.mjs # 把 CJS bundle 包成 DSH 的 __ModuleLoader__ 工厂
36
- ├── src/
37
- │ ├── theme.ts # ★ 配色在这里(Mineradio 真实色值 → --dsw-alias-*)
38
- │ ├── client/index.ts # ★ 浏览器半:注册主题 + 注入动态背景层
39
- │ └── index.ts # Host 半最小占位(可选扩展点)
40
- └── README.md
41
- ```
42
-
43
- **你以后只改两处**:
44
- - `src/theme.ts` —— 调色板(改色值即可换肤)。
45
- - `src/client/index.ts` 里 `injectBackgroundLayer()` 的 `<style>` —— 动态光晕的颜色 / 形状 / 动画节奏。
46
30
 
47
- ---
31
+ Installs the **latest release** by default. No git needed — the installer falls back to a plain zip download. It links the plugin into the profile's `node_modules` and registers `ui-mineradio` in `cordis.patch.yml` (idempotent — safe to run again). Reload the web UI and it is on.
48
32
 
49
- ## 本地构建
33
+ Pin a version or track the dev branch:
50
34
 
51
- ```bash
52
- cd project_017+dsh-theme-plugin
53
- npm install
54
- npm run build
55
- # 产物:lib/index.js(Host 半) + dist/client.cjs(浏览器半,已包成 ModuleLoader 工厂)
35
+ ```powershell
36
+ .\install.ps1 -Version 'v1.0.0' # a specific release
37
+ .\install.ps1 -Version 'main' # the development branch
56
38
  ```
57
39
 
58
- > 构建链:tsdown 把 `src/client/index.ts` 打成单文件 CJS,再用 `scripts/wrap-client.mjs` 包成 dsh 要求的 `window.__ModuleLoader__.load({ id, factory })`。`tsdown` 版本写成 `>=0.4.0`,安装时取最新即可。
59
-
60
- ---
40
+ ### Manual / via pnpm
61
41
 
62
- ## 安装进 dsh web
63
-
64
- ```bash
65
- # 1. 构建(见上)
66
- # 2. 安装进 web profile(用本包的绝对路径)
67
- dsh plugin --profile web add "file:<本包绝对路径>"
68
-
69
- # 3. 确保 $DSH_HOME/profiles/web/cordis.patch.yml 里有这一段
70
- # (dsh plugin add 通常会自动写入;手动装则贴 cordis.patch.yml 内容)
71
- # - insert:
72
- # - id: dsh-theme-mineradio
73
- # name: 'dsh-theme-mineradio'
42
+ ```powershell
43
+ dsh plugin --profile web add https://github.com/dhicoc/dsh-mineradio
74
44
  ```
75
45
 
76
- 重启 `dsh web`,打开「设置 外观 / 主题」,选择 **mineradio**,即可看到暗色玻璃 + 青金光晕漂移动态背景。
77
-
78
- ---
46
+ Then add a `ui-mineradio` entry manually to `$DSH_HOME/profiles/web/cordis.patch.yml`:
79
47
 
80
- ## 调优与排错
81
-
82
- - **光晕没透出来?** 多半是 `--dsw-alias-bg-*` 的令牌名与 dsh 实际不一致。打开 dsh 随包分发的 `dsh-client-ui-theme` README 核对真实令牌名(例如底色可能叫 `--dsw-alias-canvas` / `--dsw-alias-surface` 等),在 `src/theme.ts` 改成对的名字即可。未知令牌名 dsh 会直接忽略、不报错。
83
- - **文字看不清?** 保持 `--dsw-alias-bg-layer-2`(面板)接近不透明(已设为 `rgba(14,16,20,0.92)`)。这是壁纸皮肤插件 `dsh-skin-alphacoders` 实测出来的坑:全表面半透明会让文字糊掉。
84
- - **想让用户调动画 / 选配色并持久化?** 浏览器侧走 `api-proxy` 会被 settings 白名单拦下。需要在 **Host 半**用 `ctx.settings.register('ui-mineradio', schema)` 持有 owner scope,再用 `ctx.webServer.register({ kind:'prefix', path:'/mineradio', handler })` 给浏览器侧开同源读写通道(参考 `dsh-skin-alphacoders`)。
48
+ ```yaml
49
+ - insert:
50
+ - id: ui-mineradio
51
+ name: 'dsh-theme-mineradio'
52
+ ```
85
53
 
86
- ---
54
+ Restart the web UI. To turn it off: Settings → Plugins → **Mineradio**.
87
55
 
88
- ## 许可证
56
+ ## License
89
57
 
90
- MIT。视觉风格参考自 Mineradio,原作者保留其界面视觉设计的著作权。
58
+ MIT. Mineradio visual identity (palette, typography, glow aesthetic) is a faithful re-skin of the Mineradio project by XxHuberrr, whose original is licensed GPL-3.0.
package/README.zh.md ADDED
@@ -0,0 +1,58 @@
1
+ # dsh-theme-mineradio
2
+
3
+ 中文 | [English](README.md)
4
+
5
+ **Mineradio** 是一套为 DeepSeek Harness Web UI 打造的影院级玻璃拟态主题——对 Mineradio「私人视觉电台」气质的忠实移植。顶栏、侧栏、输入框、状态行与轨迹视图都化作近黑演播室背景上一块块温暖的香槟金玻璃。你可以把视频设为壁纸,一键关闭后原样还原官方界面,无需改动 DSH 任何源码。
6
+
7
+ ## 从 Mineradio 移植了什么
8
+
9
+ - **香槟金身份标识** —— 招牌调色板(香槟金 `#f4d28a`、薄荷 `#7ad7c2`、余烬玫瑰 `#ff5367`,压在一层温暖的近黑 `#08090B` 之上)驱动全部 alias token:表面、发丝描边、文字墨色、按钮、滚动条,以及带金色辉光的暖调阴影。
10
+ - **字体** —— 界面使用 Inter + Noto Sans SC,自托管,不依赖外壳或 fontsource。
11
+ - **影院辉光** —— 玻璃背后有一层香槟金环境光;辉光色相旋钮可把它从暖琥珀扫到薄荷,同时保持品牌暖调。
12
+ - **流体背景** —— 流动流体板(色相 + 深浅可调,默认落在暖金色),或自选壁纸(图片 / 视频),各自带模糊与磨砂。
13
+
14
+ ## 特性
15
+
16
+ - **双模式**:**云母效果**把布局重构为漂浮的玻璃卡片(模糊度、磨砂度可调);**兼容模式**按字节保留官方布局,只把材质换成通用玻璃——其他插件的 UI 也会自动获得同样的玻璃质感
17
+ - **自由背景**:流动流体板(色相可调)或自选壁纸(铺满页面、保持比例,带独立模糊与磨砂);浅色壁纸配浅色模式观感最佳,深色壁纸配深色模式
18
+ - **背景亮度**:跟随解析到的配色——深色模式压暗(0–50),浅色模式提亮(50–100),50 为原样
19
+ - **环境装饰**:聊天区中心的粒子鲸鱼、星尘粒子、可交互点阵网格——都可开关
20
+ - **香槟辉光**:跟随鼠标在玻璃面板上流动的光晕,外加悬停下压的触觉深度
21
+ - 一个开关:关闭后原样还原官方界面,插件卸载时所有效果一并移除
22
+
23
+ ## 安装
24
+
25
+ ### Windows(一条命令)
26
+
27
+ ```powershell
28
+ powershell -ExecutionPolicy Bypass -Command "Invoke-WebRequest 'https://github.com/dhicoc/dsh-mineradio/raw/main/install.ps1' -OutFile install.ps1; .\install.ps1"
29
+ ```
30
+
31
+ 默认安装**最新正式版**。无需 git——安装脚本会退回到普通 zip 下载。脚本会把插件链接进 profile 的 `node_modules`,并在 `cordis.patch.yml` 中注册 `ui-mineradio`(幂等,可重复执行)。刷新 Web UI 即为开启状态。
32
+
33
+ 锁定版本或跟踪开发分支:
34
+
35
+ ```powershell
36
+ .\install.ps1 -Version 'v1.0.0' # 指定版本
37
+ .\install.ps1 -Version 'main' # 开发分支
38
+ ```
39
+
40
+ ### 手动 / 通过 pnpm
41
+
42
+ ```powershell
43
+ dsh plugin --profile web add https://github.com/dhicoc/dsh-mineradio
44
+ ```
45
+
46
+ 然后在 `$DSH_HOME/profiles/web/cordis.patch.yml` 手动加一条 `ui-mineradio`:
47
+
48
+ ```yaml
49
+ - insert:
50
+ - id: ui-mineradio
51
+ name: 'dsh-theme-mineradio'
52
+ ```
53
+
54
+ 重启 Web UI。想要关闭:设置 → 插件 → **Mineradio**。
55
+
56
+ ## 许可证
57
+
58
+ MIT。Mineradio 视觉标识(调色板、字体、辉光美学)是对 XxHuberrr 的 Mineradio 项目的忠实重新定制,原项目采用 GPL-3.0 授权。