dsh-any-background 0.2.5 → 0.2.6
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 +15 -3
- package/README.zh.md +15 -3
- package/lib/client.js +812 -382
- package/lib/client.js.map +1 -1
- package/lib/index.js +347 -20
- package/package.json +133 -121
package/README.md
CHANGED
|
@@ -81,6 +81,20 @@ A **DeepSeek Harness** appearance plugin that lets you fully customize the Web U
|
|
|
81
81
|
|
|
82
82
|
## Recent Optimizations
|
|
83
83
|
|
|
84
|
+
### v0.2.6
|
|
85
|
+
|
|
86
|
+
- **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.
|
|
87
|
+
- **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).
|
|
88
|
+
- **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).
|
|
89
|
+
- **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.
|
|
90
|
+
- **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).
|
|
91
|
+
- **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.
|
|
92
|
+
- **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.
|
|
93
|
+
- **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).
|
|
94
|
+
- **Reduced-motion respect** — With the OS `prefers-reduced-motion` preference set, generated backgrounds render their first frame and skip the animation loop entirely.
|
|
95
|
+
- **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.
|
|
96
|
+
- **Cleanup** — Removed the boot performance probe and dead static-snapshot helpers; URL-downloaded wallpapers are written to disk directly with no transient base64 string.
|
|
97
|
+
|
|
84
98
|
### v0.2.5
|
|
85
99
|
|
|
86
100
|
- **Wallpaper MIME fixed — GIF/APNG wallpapers now work** — `readWallpaper` unconditionally re-declared every stored image as `image/jpeg`, even though URL-fetched PNG/WebP/GIF bytes are written under the same file. The real format is now sniffed from the magic bytes on every read, so animated GIF wallpapers (and PNG/WebP color profiles) survive refreshes correctly.
|
|
@@ -89,9 +103,6 @@ A **DeepSeek Harness** appearance plugin that lets you fully customize the Web U
|
|
|
89
103
|
- **Wallpaper rotation** — A rotation pool on the Background page: add images (thumbnail strip), choose shuffle/in-order and every-refresh/daily/weekly cadence, or hit "Switch now". The chosen image is copied into the active wallpaper slot server-side, so all existing pipelines (boot restore, export, color extraction) work unchanged.
|
|
90
104
|
- **Day/night auto switch** — Pick a day and a night profile and a trigger — fixed clock times or the OS `prefers-color-scheme` — and the plugin applies the matching profile automatically (checked every 30 s; appearance only, wallpaper untouched).
|
|
91
105
|
- **Forced interface scheme** — A Light/Dark/Auto segmented control on the Color page regenerates the whole token palette in the forced direction instead of deriving it from the accent lightness.
|
|
92
|
-
|
|
93
|
-
### v0.2.5 fixes & polish
|
|
94
|
-
|
|
95
106
|
- **Forced light/dark now actually differ — truthiness bug in the scheme check** — `buildTokens` derived the direction with `scheme ?? lit < 0.55`; a `scheme='light'` string is truthy, so both forced directions rendered the dark branch. The comparison is now explicit and the two token sets (78 of 79 entries) differ correctly.
|
|
96
107
|
- **Accent lightness remapping under a forced scheme** — When the forced direction contradicts the pick's band (a light accent under forced dark), the lightness is mirrored into the target band (dark 0.14–0.44 / light 0.6–0.88) before building tokens; hue and saturation carry over and the stored pick itself is untouched.
|
|
97
108
|
- **Auto-mode light/dark rules rebuilt** — With a picked color, the font and surface directions both follow the accent lightness (very dark → white fonts, very light → black fonts; no more fighting the wallpaper verdict). Without a pick, the font direction follows the wallpaper's perceived (Rec.709) brightness, and the global scheme flag (native controls, `color-scheme`) stays aligned with the palette direction.
|
|
@@ -139,6 +150,7 @@ pnpm dsh web
|
|
|
139
150
|
## Compatibility
|
|
140
151
|
|
|
141
152
|
- **[`dsh web`](https://github.com/deepseek-ai/deepseek-harness)** — Full support on both the npm release and the new source build. The plugin auto-detects which client-module table the host ships (the new `@deepseek-ai/dsh-client-store` or the legacy `@deepseek-ai/dsh-client-runtime`) and resolves `defineStore` accordingly at runtime.
|
|
153
|
+
- **Declared release matrix** — `dsh.compatibility.dshReleases` in `package.json` declares all 8 public npm releases from `0.1.2-alpha.4` through `0.1.5-rc.2` (`0.1.2-alpha.4`, `0.1.2-alpha.5`, `0.1.2-rc.1`, `0.1.3-alpha.2`, `0.1.5-alpha.1`, `0.1.5-alpha.2`, `0.1.5-rc.1`, `0.1.5-rc.2`) individually as `compatible`.
|
|
142
154
|
- **[deepseek-harness-desktop](https://github.com/anywhere-labs/deepseek-harness-desktop)** — Supported
|
|
143
155
|
|
|
144
156
|
## Star History
|
package/README.zh.md
CHANGED
|
@@ -81,6 +81,20 @@
|
|
|
81
81
|
|
|
82
82
|
## 近期优化
|
|
83
83
|
|
|
84
|
+
### v0.2.6
|
|
85
|
+
|
|
86
|
+
- **修复窄视口(移动端布局)顶栏与内容区割裂** — 窄视口下宿主在对话列之外另有一个 52px 高的固定会话标题条(`.dsh-mobile-app-header`),主背景不透明度此前只写在三列上,该标题条便直接透出清晰壁纸,与下方半透明的内容区明显割裂([#11](https://github.com/Tkingxiao/dsh-any-background/issues/11))。现在标题条复用插件自有的 `--dsh-any-op-bg` 变量,自动跟随「主背景不透明度」滑块与主题切换;未设置时回退宿主默认外观。
|
|
87
|
+
- **主背景模糊镜像到 `:root`** — 新增全局变量 `--dsh-any-part-blur-global`(跟随「主背景模糊」滑块),顶栏据此同步磨砂效果;第三方样式也可直接引用,与既有全局变量 `--dsh-any-input-blur` / `--dsh-any-blur-settings` / `--dsh-any-blur-card-panels` 一致(元素级的 `--dsh-any-part-blur` 在列子树之外继承不到)。
|
|
88
|
+
- **启动提速,告别白屏等待** — 壁纸不再以 base64 走 RPC 通道。上传以原始字节流直接落盘,持久化的图片通过 HTTP 路由由浏览器原生解码显示,与普通 `<img>` 完全一致。共享解码缓存把同一张壁纸的四次按 URL 解码(取色、明暗判定、拖动降采样、尺寸读取)合并为一次。大壁纸启动恢复从 ~5.5 s 降到 ~1.2 s(RPC 读取 3010 ms → ~170 ms,首次解码 1464 ms → ~780 ms)。
|
|
89
|
+
- **原地替换壁纸后必然显示新图** — 上传、网址下载与轮换都发生在同一个 serve URL 背后,此前所有按 URL 键控的缓存——图层重设守卫、解码缓存、明暗判定与低清拷贝——都还握着旧像素。图片槽现与视频槽一样携带查询串版本号,每次替换都会得到新 URL、触发新解码。
|
|
90
|
+
- **自动取色无竞态** — 取色解码期间壁纸被替换时,旧图颜色不再有机会覆盖新图(与明暗判定采用同一套单调守卫)。
|
|
91
|
+
- **上传更健壮** — 视频上传上限 2 GB、使用独立临时文件(并发的壁纸上传不会损坏它)、并在服务端立即记录 MIME;两个上传路由与 RPC 通道一样加上了 Host/Origin 围栏。
|
|
92
|
+
- **四个新动态背景预设** — Shader 新增**星空**(缓慢星云幕布上的三层闪烁星点);几何图案新增**雨滴**(下落的光痕)、**等高线**(漂移的地形流线)与**流体光斑**(缓慢漂移的柔光色球),均与既有预设一样可调参数、可锁种子。
|
|
93
|
+
- **动态背景可暂停** — 「重新生成」旁新增暂停/播放按钮,直接停掉画布动画循环而不拆除背景(仅当前会话有效,重新生成或刷新后恢复播放)。
|
|
94
|
+
- **尊重系统减弱动态偏好** — 系统开启 `prefers-reduced-motion` 时,动态背景只渲染首帧、不再运行动画循环。
|
|
95
|
+
- **网络视频 URL 壁纸** — 「从网址」流程现可识别视频链接:服务端以流式下载写入视频槽(上限 2 GB、60 秒无数据超时,MIME 取自 Content-Type 或扩展名)并写入配置;播放、截帧与取色沿用既有 serve 路由。
|
|
96
|
+
- **清理** — 移除启动性能探针与静态快照死代码;网址下载的壁纸直接写盘,不再经过临时 base64 字符串。
|
|
97
|
+
|
|
84
98
|
### v0.2.5
|
|
85
99
|
|
|
86
100
|
- **修复壁纸 MIME 错标 — GIF/APNG 壁纸可用了** — `readWallpaper` 此前无条件把所有图片按 `image/jpeg` 回读,而经网址抓取的 PNG/WebP/GIF 字节都写在同一个文件里。现在每次读取都从文件头嗅探真实格式,动图 GIF 壁纸(以及 PNG/WebP 的色彩配置)在刷新后可以正确保留。
|
|
@@ -89,9 +103,6 @@
|
|
|
89
103
|
- **壁纸轮换** — 「背景」页新增轮换池:添加图片(缩略图条)、选择随机/顺序与每次刷新/每天/每周频率,或点「立即切换」。服务端把所选图片复制进当前壁纸槽,启动还原、主题导出、取色等既有管线零改动。
|
|
90
104
|
- **昼夜自动切换** — 选定日间/夜间两套档案与触发方式(固定时段或系统 `prefers-color-scheme`),插件自动套用匹配的档案(每 30 秒检查一次;只切换外观,不动壁纸)。
|
|
91
105
|
- **强制界面明暗** — 「色彩」页新增亮色/暗色/自动分段控件,强制后整套配色令牌按所选方向重新生成,而不再依据主题色明度推导。
|
|
92
|
-
|
|
93
|
-
### v0.2.5 修复与体验优化
|
|
94
|
-
|
|
95
106
|
- **修复强制亮/暗无差别 — 方向判定真值 bug** — `buildTokens` 此前用 `scheme ?? lit < 0.55` 推导方向,`scheme='light'` 时字符串真值导致亮色/暗色都走深色分支。现改为显式比较,两套令牌(79 项中 78 项)正确区分。
|
|
96
107
|
- **强制方向自动重映射主题色明度** — 强制方向与主题色明度冲突时(如浅色主题色 + 强制暗色),把明度镜像映射进目标区间(深色带 0.14–0.44 / 亮色带 0.6–0.88)再构建令牌,色相与饱和度保留,保存的主题色本身不变。
|
|
97
108
|
- **自动模式明暗规则重构** — 有主题色时字体与表面方向统一由主题色明度驱动(过深 → 白字,过浅 → 黑字,与壁纸判定结果不再打架);未选主题色时按壁纸感知亮度(Rec.709)判断字体方向;全局明暗标志(`color-scheme`、原生控件)与配色方向保持一致。
|
|
@@ -139,6 +150,7 @@ pnpm dsh web
|
|
|
139
150
|
## 兼容性
|
|
140
151
|
|
|
141
152
|
- **[`dsh web`](https://github.com/deepseek-ai/deepseek-harness)** — 同时兼容 npm 发布版与新版源码构建。插件会自动检测宿主携带的客户端模块表(新版 `@deepseek-ai/dsh-client-store` 或旧版 `@deepseek-ai/dsh-client-runtime`),并在运行时据此解析 `defineStore`。
|
|
153
|
+
- **兼容版本声明** — `package.json` 的 `dsh.compatibility.dshReleases` 对 npm 上 `0.1.2-alpha.4` 至 `0.1.5-rc.2` 间的全部 8 个公开发布版本(`0.1.2-alpha.4`、`0.1.2-alpha.5`、`0.1.2-rc.1`、`0.1.3-alpha.2`、`0.1.5-alpha.1`、`0.1.5-alpha.2`、`0.1.5-rc.1`、`0.1.5-rc.2`)逐项声明为 `compatible`。
|
|
142
154
|
- **[deepseek-harness-desktop](https://github.com/anywhere-labs/deepseek-harness-desktop)** — 支持
|
|
143
155
|
|
|
144
156
|
## Star History
|