dsh-any-background 0.2.7 → 0.2.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 +7 -14
- package/README.zh.md +7 -14
- package/lib/client.js +1 -0
- package/lib/client.js.map +1 -1
- package/lib/index.js +35 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -87,6 +87,13 @@ A **DeepSeek Harness** appearance plugin: custom theme color, background wallpap
|
|
|
87
87
|
|
|
88
88
|
## Changelog
|
|
89
89
|
|
|
90
|
+
### v0.2.8
|
|
91
|
+
|
|
92
|
+
- **Fixed: produced / highlight opacity and blur were lost on reload** — The config shape is declared twice, once per half, and the node half (which sanitizes before writing to disk) never learned `producedOpacity` / `blurs.produced`. The sliders stayed live in memory, `writeConfig` silently dropped both fields, and the next load fell back to the defaults. The host now declares them in `PartBlurs`, `ThemeConfig` and `ProfileAppearance` — structure, defaults, and both sanitizers (the config itself plus the profile snapshot).
|
|
93
|
+
- **Saved profiles lost those two values as well** — A profile snapshot never carried the produced parameters, so applying one quietly reset that slider to its default. Profiles, the six presets and the day/night switch all carry them now.
|
|
94
|
+
- **New two-half drift guard** — When sanitizing, the host now logs a one-time warning for any field declared on only one side (`ignoring unknown config field "blurs.xxx"`), so this class of drift surfaces in the host log instead of silently discarding a setting.
|
|
95
|
+
- **Imported configs now refresh the whole UI** — Importing a theme JSON used to refresh only the background and colors, leaving the profile list, wallpaper rotation pool, day/night schedule and scheme control showing their pre-import values; the import now pushes that meta state too.
|
|
96
|
+
|
|
90
97
|
### v0.2.7
|
|
91
98
|
|
|
92
99
|
- **New "Produced / Highlights" sliders** — Code blocks in conversation content (language banner included), inline `code` highlight chips and produced chips now share one opacity + blur slider. The opacity is the alpha of each surface's **own background color**: 100% reproduces the host look byte-for-byte, and lowering it fades exactly that color out instead of stacking a second one on top of the original (previously the code block's outer wrapper stayed opaque, so the slider merely blended the plugin palette into it and the blur had nothing to reveal). The blur frosts that same layer with `backdrop-filter`. Code blocks in the document preview — which live outside `.md-code-block` and take their color from `--shiki-background` alone — are covered too.
|
|
@@ -95,20 +102,6 @@ A **DeepSeek Harness** appearance plugin: custom theme color, background wallpap
|
|
|
95
102
|
- **Host support narrowed to DSH 0.1.5-rc.2** — `engines.dsh` and `dsh.compatibility.dshReleases` now declare that single release (verified on it) and the old 8-version matrix is gone from the README. `panelOpacity` joined the full profile / export / day-night-schedule pipeline.
|
|
96
103
|
- **Six presets carry the new parameters** — workbench opacity follows each preset (Frosted glass 0.85, Midnight 0.8, Warm daylight 0.75, …); the produced slider defaults to 100% (the untouched host look).
|
|
97
104
|
|
|
98
|
-
### v0.2.6
|
|
99
|
-
|
|
100
|
-
- **Fixed the narrow-viewport (mobile layout) title bar splitting from the content area** — On narrow viewports the host renders a 52px fixed session-title bar (`.dsh-mobile-app-header`) outside the AppFrame columns. The main-background opacity only lived on the columns, so the bar showed the raw wallpaper and visibly split from the translucent content below it ([#11](https://github.com/Tkingxiao/dsh-any-background/issues/11)). The bar now rides the plugin-owned `--dsh-any-op-bg` variable, following the main-background opacity slider and theme switches automatically; it falls back to the host's default look when unset.
|
|
101
|
-
- **Main-background blur mirrored to `:root`** — A new global variable `--dsh-any-part-blur-global` (following the main-background blur slider) lets the title bar frost in sync; third-party styles can reference it too, matching the existing globals `--dsh-any-input-blur` / `--dsh-any-blur-settings` / `--dsh-any-blur-card-panels` (the element-scoped `--dsh-any-part-blur` never leaves the columns' subtree).
|
|
102
|
-
- **Fast boot, no white-screen wait** — Wallpapers no longer cross the RPC channel as base64. Uploads stream raw bytes straight to disk, and the persisted picture is served over HTTP and decoded by the browser natively, exactly like any `<img>`. A shared decode cache turns the four URL-keyed decodes of one wallpaper (palette extract, brightness verdict, low-res drag copy, intrinsic size) into one. Boot restore on a large wallpaper dropped from ~5.5 s to ~1.2 s (RPC read 3010 ms → ~170 ms, first decode 1464 ms → ~780 ms).
|
|
103
|
-
- **In-place wallpaper swaps always paint the new picture** — Upload, URL download and rotation all replace the file behind the same serve URL, which left every URL-keyed cache — the layer re-set guard, decode cache, brightness verdict and low-res copy — holding the old pixels. The image slot now carries a query-string revision like the video slot, so every swap gets a fresh URL and a fresh decode.
|
|
104
|
-
- **Race-free auto color extraction** — A wallpaper swap during the palette decode can no longer let the old picture's color overwrite the new one (guarded the same way as the brightness verdict).
|
|
105
|
-
- **Sturdier uploads** — Video uploads are capped at 2 GB, use their own temp file (a concurrent wallpaper upload can't corrupt them) and record the MIME server-side immediately; both upload routes now carry the same Host/Origin fence as the RPC channel.
|
|
106
|
-
- **Four new generated backgrounds** — Shader gains **Starfield** (three layers of twinkling stars over a slow nebula veil); patterns gain **Rain** (falling light streaks), **Contours** (drifting topographic flow lines) and **Fluid orbs** (slow drifting glow blobs). All are seeded and parameterized exactly like the existing presets.
|
|
107
|
-
- **Pause for generated backgrounds** — A pause/play button next to Regenerate stops the canvas animation loop without tearing the background down (session-only; regenerate or reload starts the loop again).
|
|
108
|
-
- **Reduced-motion respect** — With the OS `prefers-reduced-motion` preference set, generated backgrounds render their first frame and skip the animation loop entirely.
|
|
109
|
-
- **Network video URL wallpaper** — The "From URL" flow now recognizes video links: the server streams the download into the video slot (2 GB cap, 60 s inactivity timeout, MIME taken from Content-Type or the file extension) and records the MIME in the config; playback, snapshot capture and color extraction continue through the existing serve route.
|
|
110
|
-
- **Cleanup** — Removed the boot performance probe and dead static-snapshot helpers; URL-downloaded wallpapers are written to disk directly with no transient base64 string.
|
|
111
|
-
|
|
112
105
|
## Installation
|
|
113
106
|
|
|
114
107
|
### Method 1: npm install (Recommended)
|
package/README.zh.md
CHANGED
|
@@ -87,6 +87,13 @@
|
|
|
87
87
|
|
|
88
88
|
## 更新日志
|
|
89
89
|
|
|
90
|
+
### v0.2.8
|
|
91
|
+
|
|
92
|
+
- **修复:产出物 / 高亮内容的透明度与模糊度刷新即丢** — 配置结构在插件两半边各声明一份,node 半边(按自己的结构净化后落盘)一直没跟上 `producedOpacity` 与 `blurs.produced`:滑块当次有效(内存里是对的),`writeConfig` 落盘时却把这两个字段静默丢掉,刷新自然回到默认值。现已在宿主侧补齐:`PartBlurs` / `ThemeConfig` / `ProfileAppearance` 结构与默认值,以及两处净化表(整份配置 + 档案快照)。
|
|
93
|
+
- **档案快照同样会丢这两个值** — 保存的档案一直没带产出物参数,套用档案会把产出物滑块悄悄重置回默认;档案、六套预设与昼夜切换现在都完整携带。
|
|
94
|
+
- **新增「两半边结构漂移」守护** — 宿主净化配置时,对任何「只在一侧声明过」的字段打一次警告日志(`ignoring unknown config field "blurs.xxx"`),让这类不同步在宿主日志里当场暴露,而不是静默吞掉一个设置项。
|
|
95
|
+
- **导入配置后界面状态补齐** — 导入 JSON 时此前只刷新背景与配色,档案列表、壁纸轮换池、昼夜调度与明暗分段控件仍显示导入前的旧值;现在导入会一并同步这部分元状态。
|
|
96
|
+
|
|
90
97
|
### v0.2.7
|
|
91
98
|
|
|
92
99
|
- **新增「产出物 / 高亮内容」滑块** — 对话里的代码块(含语言顶栏)、行内 `code` 高亮芯片与产出物 chip 现在共用一支透明度 + 模糊度滑块。透明度是这些表面**自身背景色的 alpha**:100% 与宿主原样逐色一致,下调时淡出的就是它原本那块颜色,而不是在旧背景上再叠一层新色(此前代码块外层仍不透明,滑块只是在原色上混入插件调色板颜色,模糊也因此看不见效果);模糊度用 `backdrop-filter` 给同一层表面加磨砂。文档预览里不在 `.md-code-block` 内、只靠 `--shiki-background` 上色的代码块也一并覆盖。
|
|
@@ -95,20 +102,6 @@
|
|
|
95
102
|
- **宿主支持收敛** — 只面向 **DSH 0.1.5-rc.2**(已在该版本上验证):`engines.dsh` 与 `dsh.compatibility.dshReleases` 只声明这一项,README 删除旧的 8 版本矩阵;`panelOpacity` 进入档案 / 导出导入 / 昼夜切换的完整链路。
|
|
96
103
|
- **六套预设同步新参数** — 工作台透明度随预设给出(毛玻璃 0.85 / 暗夜紫 0.8 / 暖阳 0.75 等),产出物滑块默认 100%(即宿主原样)。
|
|
97
104
|
|
|
98
|
-
### v0.2.6
|
|
99
|
-
|
|
100
|
-
- **修复窄视口(移动端布局)顶栏与内容区割裂** — 窄视口下宿主在对话列之外另有一个 52px 高的固定会话标题条(`.dsh-mobile-app-header`),主背景不透明度此前只写在三列上,该标题条便直接透出清晰壁纸,与下方半透明的内容区明显割裂([#11](https://github.com/Tkingxiao/dsh-any-background/issues/11))。现在标题条复用插件自有的 `--dsh-any-op-bg` 变量,自动跟随「主背景不透明度」滑块与主题切换;未设置时回退宿主默认外观。
|
|
101
|
-
- **主背景模糊镜像到 `:root`** — 新增全局变量 `--dsh-any-part-blur-global`(跟随「主背景模糊」滑块),顶栏据此同步磨砂效果;第三方样式也可直接引用,与既有全局变量 `--dsh-any-input-blur` / `--dsh-any-blur-settings` / `--dsh-any-blur-card-panels` 一致(元素级的 `--dsh-any-part-blur` 在列子树之外继承不到)。
|
|
102
|
-
- **启动提速,告别白屏等待** — 壁纸不再以 base64 走 RPC 通道。上传以原始字节流直接落盘,持久化的图片通过 HTTP 路由由浏览器原生解码显示,与普通 `<img>` 完全一致。共享解码缓存把同一张壁纸的四次按 URL 解码(取色、明暗判定、拖动降采样、尺寸读取)合并为一次。大壁纸启动恢复从 ~5.5 s 降到 ~1.2 s(RPC 读取 3010 ms → ~170 ms,首次解码 1464 ms → ~780 ms)。
|
|
103
|
-
- **原地替换壁纸后必然显示新图** — 上传、网址下载与轮换都发生在同一个 serve URL 背后,此前所有按 URL 键控的缓存——图层重设守卫、解码缓存、明暗判定与低清拷贝——都还握着旧像素。图片槽现与视频槽一样携带查询串版本号,每次替换都会得到新 URL、触发新解码。
|
|
104
|
-
- **自动取色无竞态** — 取色解码期间壁纸被替换时,旧图颜色不再有机会覆盖新图(与明暗判定采用同一套单调守卫)。
|
|
105
|
-
- **上传更健壮** — 视频上传上限 2 GB、使用独立临时文件(并发的壁纸上传不会损坏它)、并在服务端立即记录 MIME;两个上传路由与 RPC 通道一样加上了 Host/Origin 围栏。
|
|
106
|
-
- **四个新动态背景预设** — Shader 新增**星空**(缓慢星云幕布上的三层闪烁星点);几何图案新增**雨滴**(下落的光痕)、**等高线**(漂移的地形流线)与**流体光斑**(缓慢漂移的柔光色球),均与既有预设一样可调参数、可锁种子。
|
|
107
|
-
- **动态背景可暂停** — 「重新生成」旁新增暂停/播放按钮,直接停掉画布动画循环而不拆除背景(仅当前会话有效,重新生成或刷新后恢复播放)。
|
|
108
|
-
- **尊重系统减弱动态偏好** — 系统开启 `prefers-reduced-motion` 时,动态背景只渲染首帧、不再运行动画循环。
|
|
109
|
-
- **网络视频 URL 壁纸** — 「从网址」流程现可识别视频链接:服务端以流式下载写入视频槽(上限 2 GB、60 秒无数据超时,MIME 取自 Content-Type 或扩展名)并写入配置;播放、截帧与取色沿用既有 serve 路由。
|
|
110
|
-
- **清理** — 移除启动性能探针与静态快照死代码;网址下载的壁纸直接写盘,不再经过临时 base64 字符串。
|
|
111
|
-
|
|
112
105
|
## 安装
|
|
113
106
|
|
|
114
107
|
### 方式一:npm 安装(推荐)
|
package/lib/client.js
CHANGED