dsh-bloomglass 0.1.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,23 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-bloomglass contributors
4
+ Copyright (c) 2026 webkubor
5
+ Copyright (c) 2026 SenryLee
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # dsh-bloomglass
2
+
3
+ 一个 DeepSeek Harness Web 主题插件:十套 OKLCH 莫兰迪配色打底,可选一张壁纸铺满窗口、界面以磨砂玻璃叠上去。官方 Light / Dark / System 仍然掌权。
4
+
5
+ ## 效果展示
6
+
7
+ 10 套配色,每套都有亮色与暗色(底色 / 正文色 / 强调色 / 层级面色):
8
+
9
+ ![10 套莫兰迪配色](docs/showcase/palette-board.png)
10
+
11
+ | 亮色 · 黛蓝 | 暗色 · 天青 |
12
+ | --- | --- |
13
+ | ![亮色](docs/showcase/ui-mist-light.png) | ![暗色](docs/showcase/ui-ripple-plain.png) |
14
+
15
+ 同一配色与窗口,只多了壁纸层 —— 表面色按玻璃浓度转为半透明,文字与边框保持不透明:
16
+
17
+ ![壁纸与磨砂玻璃](docs/showcase/ui-ripple-glass.png)
18
+
19
+ ## 功能
20
+
21
+ - **10 套配色**:黛蓝 / 朱砂 / 桃夭 / 天青 / 竹青 / 赭石 / 青金 / 琥珀 / 落霞 / 青莲,明暗自适应
22
+ - **壁纸 + 磨砂**:本地 JPEG / PNG / WebP / GIF,无大小限制
23
+ - **一个独立设置栏**:设置 → Bloom Glass,含配色选择 + 玻璃浓度 / 模糊 / 饱和 / 压暗滑杆 + 保存 / 删除,不往「通用」页插行
24
+ - 壁纸关闭时是纯配色模式;打开后表面色按玻璃浓度转为半透明(文字与边框始终不透明)
25
+ - 只走官方 `overrideTokens` 覆盖层,从不 `setTheme('custom')`;不写 `settings.yaml`,不请求任何远程 URL
26
+
27
+ 数据位置:壁纸存 IndexedDB,旋钮存 `localStorage`。
28
+
29
+ ## 安装
30
+
31
+ `dsh web` 需已在运行。
32
+
33
+ ```sh
34
+ dsh plugin --profile web add github:CosmoSail/dsh-bloomglass
35
+ ```
36
+
37
+ 装完**重启 `dsh web`**(刷新页面不够),然后打开 **设置 → Bloom Glass**。
38
+
39
+ 首次启动会一次性读取这两个键——`localStorage` 的 `dsh-bloom-variant`(配色)、`dsh-frosted-window:knobs`(玻璃参数),以及 `dsh-frosted-window` 这个 IndexedDB 库里的壁纸——把先前保存的选择接过来。之后写入的是本插件自己的键,不再回读。
40
+
41
+ ## 开发
42
+
43
+ ```sh
44
+ git clone https://github.com/CosmoSail/dsh-bloomglass.git
45
+ cd dsh-bloomglass
46
+ npm install
47
+ npm test # vitest,56 个用例
48
+ npm run typecheck
49
+ npm run build # tsdown → lib/index.js + lib/client.js
50
+ npm run showcase # 重新生成 docs/showcase 下的演示页
51
+ ```
52
+
53
+ `lib/` 随仓库提交(`dsh plugin add github:` 依赖它,也免去用户本地构建),因此**改完源码请重新构建再提交**。
54
+
55
+ **上游代码源**——本包的源码整合自下面两个上游项目:
56
+
57
+ | 上游代码源 | 取用内容 |
58
+ | --- | --- |
59
+ | [dsh-bloom-theme](https://github.com/webkubor/dsh-bloom-theme) `0.13.4`(`81ab8a0`)<br>MIT © 2026 webkubor | 色板数据、token 编译层、组件与玻璃样式表 |
60
+ | [dsh-frosted-window](https://github.com/SenryLee/dsh-frosted-window) `0.1.0`(`ccee61d`)<br>MIT © 2026 SenryLee | 壁纸上传与 IndexedDB 持久化、磨砂呈现器、玻璃样式、设置面板 |
61
+
62
+ 除 `src/client/tokens.ts`(统一 token 管线)与 `src/client/css/palette-css.ts`(配色选择区样式)为本包新写外,其余源码均取自上述**上游代码源**。两份原始版权声明见 [LICENSE](LICENSE),再次分发请保留。
63
+
64
+ 契约:按官方 [package-and-install](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/develop/basic/publish.md) 以 `dsh.bundle` + `dsh.client` 分发。
65
+
66
+ ## 许可
67
+
68
+ MIT,见 [LICENSE](LICENSE)。
@@ -0,0 +1,9 @@
1
+ # 随包分发的 patch —— 由 package.json 的 dsh.bundle.patch 引用。
2
+ #
3
+ # 有了它,`dsh plugin add` 之后插件会被自动 insert 进 profile 的 boot graph,
4
+ # 用户不必再手动编辑 ~/.dsh/profiles/web/cordis.patch.yml。
5
+ #
6
+ # 本插件是纯客户端主题:不禁用任何官方插件,只把自己插进去。
7
+ - insert:
8
+ - id: dsh-bloomglass
9
+ name: dsh-bloomglass
@@ -0,0 +1,66 @@
1
+ # Showcase images
2
+
3
+ These images are **synthetic**. They are generated by `scripts/generate-showcase.mjs`, which
4
+ renders this package's *real* stylesheets (`COMPONENT_CSS`, `BLOOM_GLASS_CSS`, `GLASS_CSS`,
5
+ `PALETTE_CSS`) and its *real* token pipeline (`bloomglassTokens`) against a mock of DSH's DOM
6
+ shape — the same class-name hooks (`_sidebarCol`, `_bubble`, `_composer`, `_card`, `_markdown`,
7
+ `data-slot="sidebar"`, …) that the theme's CSS targets.
8
+
9
+ Because nothing but placeholder copy is ever loaded, these images contain **no real session,
10
+ title, message, file name, or account information**. Nothing had to be blurred or redacted:
11
+ there was never anything private in the render.
12
+
13
+ ## Wallpaper and its rights
14
+
15
+ The wallpaper used by the renders is `Orion_Lorand_1992.jpg` — a third-party astrophotograph of
16
+ the Orion Nebula. **It is not covered by this package's MIT licence.** It carries the
17
+ photographer's watermark and is credited to **Fényes Lóránd**. It is committed here by the
18
+ repository owner's explicit decision; if you fork this repository, that image does not come with
19
+ any right to redistribute it — replace it or drop it.
20
+
21
+ A rights-clean alternative ships alongside: `scripts/generate-wallpaper.mjs` draws deep-sky
22
+ clouds procedurally, pixel by pixel (domain-warped fractal noise, stars, vignette), and encodes
23
+ them with a minimal PNG writer over Node's built-in `zlib`, producing `wallpaper.png`. Point the
24
+ `WALLPAPER` constant in `generate-showcase.mjs` at `url("wallpaper.png")` to render the whole
25
+ showcase with no third-party image at all.
26
+
27
+ Either image keeps plenty of fine detail, which is what makes the frosted backdrop blur visible:
28
+ blurring a smooth gradient looks identical to not blurring it.
29
+
30
+ ## Frost settings used
31
+
32
+ The wallpaper shot runs with the frost dialled right down so the background image stays legible
33
+ behind the panels — glass **0.30**, blur **0px**, dim **0**, saturate **100%**.
34
+
35
+ | knob | showcase | plugin range | note |
36
+ | --- | --- | --- | --- |
37
+ | glass | 0.30 | 0.18 – 0.82 | inside range |
38
+ | blur | **0px** | **8 – 64** | **below the slider floor** |
39
+ | dim | 0 | 0 – 0.65 | inside range (minimum) |
40
+ | saturate | 100% | 1 – 2 | inside range (minimum) |
41
+
42
+ The blur value is deliberately outside the range the UI can produce: the showcase exists to show
43
+ the wallpaper, and at the stock defaults (glass 0.46 / blur 28px / dim 0.28) the plates cover the
44
+ whole window and smear a detailed image past recognition. Do not read 0px as a default — the
45
+ slider stops at 8px.
46
+
47
+ ## Regenerating
48
+
49
+ ```sh
50
+ npm run showcase # wallpaper.png + the .html pages
51
+ ```
52
+
53
+ Then screenshot each page with a headless Chromium browser **at 2× device scale**. The source
54
+ pages are laid out for a 1440×900 (or 1180×880 for the palette board) viewport; rendering at 2×
55
+ yields 2880×1800 files that stay sharp on HiDPI displays and on browsers showing the README at a
56
+ scaled column width. A 1× render looks soft as soon as the display is scaled.
57
+
58
+ ```sh
59
+ msedge --headless=new --disable-gpu --hide-scrollbars \
60
+ --force-device-scale-factor=2 --screenshot=ui-ripple-plain.png \
61
+ --window-size=1440,900 "file:///abs/path/docs/showcase/ui-ripple-plain.html"
62
+ ```
63
+
64
+ Both generators import the TypeScript sources directly, so they need Node ≥ 22.6 (native type
65
+ stripping; developed on Node 24). The `.html` pages, the wallpaper, and the rendered `.png` files
66
+ are all committed, so the results are reproducible without running anything.
Binary file
Binary file