dsh-any-background 0.2.8 → 0.2.9

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 CHANGED
@@ -66,9 +66,9 @@ A **DeepSeek Harness** appearance plugin: custom theme color, background wallpap
66
66
  - **Precise HSL / RGB Input** — Enter exact color values numerically with instant bidirectional sync to the wheel.
67
67
  - **Smart Color Extraction** — One click derives a theme color from your wallpaper by sampling the visible region, quantizing, and filtering out gray / near-black / near-white pixels. Video wallpapers contribute via an auto-captured frame. Fully client-side.
68
68
  - **Eyedropper** — Hover the wallpaper to preview a color and click to pick it as the theme color.
69
- - **Background Wallpaper** — Upload any image as your wallpaper. Drag to pan and scroll to zoom inside a viewport-proportional editor.
69
+ - **Background Wallpaper** — Upload any image as your wallpaper. Drag to pan and scroll to zoom inside a viewport-proportional editor (one finger to pan, two to pinch-zoom on touchscreens).
70
70
  - **Video Wallpaper** — Use a video as a live wallpaper: muted looping playback that survives refreshes (file persistence + HTTP streaming with Range seek), with an auto-captured frame powering the preview, theme-color extraction, and the position editor.
71
- - **Position Editor** — One shared editor for images and videos: drag to pan, scroll to zoom, one-click reset. Image and video placements are stored separately and never overwrite each other.
71
+ - **Position Editor** — One shared editor for images and videos: drag to pan, scroll or pinch to zoom, one-click reset. Image and video placements are stored separately and never overwrite each other.
72
72
  - **Layout Modes** — Fit / Fill / Stretch / Tile / Center for both images and videos; in Fit mode the editor-committed framing stays consistent across window resizes and cross-monitor moves.
73
73
  - **Generated Dynamic Backgrounds** — Choose mesh gradient, Shader, or geometric patterns with adjustable spread, intensity, and seed locking.
74
74
  - **Per-surface Interface Opacity** — Independent sliders for the main background, sidebar, cards & panels (including the dropdowns and menus around the dialog), the input & controls (composer box, Cordis panel), the settings panel, the conversation text frame, the trajectory view, the better-sidebar workbench, and produced / highlighted content.
@@ -80,6 +80,8 @@ A **DeepSeek Harness** appearance plugin: custom theme color, background wallpap
80
80
  - **Appearance Presets & Profiles** — Six one-click presets (Default / Frosted glass / Minimal / Midnight / Cyber / Warm daylight) plus named profiles: save the current look and re-apply it anytime. A two-step confirm guards deletion.
81
81
  - **Wallpaper Rotation** — Add images to a rotation pool (thumbnail picker included) and let the wallpaper change by shuffle or order on every refresh, daily, or weekly. Advancing copies the chosen image into the active wallpaper slot, so export/import and color extraction keep working unchanged.
82
82
  - **Day/Night Auto Switch** — Assign a day profile and a night profile; the plugin switches automatically at fixed clock times or by following the OS dark mode.
83
+ - **Custom Font** — Upload a ttf / otf / woff / woff2 file (up to 100 MB) and apply it to the whole interface through `@font-face`; toggle it off or remove it at any time. Fonts stream as raw bytes and persist in the plugin data dir; code blocks keep their monospace stack.
84
+ - **Per-part Text Outline** — The same nine surface groups as the interface page, each with its own `-webkit-text-stroke`: width 0–4 px (0 = off) and a color of auto-contrast / gray / black / white / accent / custom. Code blocks, inline `code` and icons are exempted automatically, so multi-color syntax never smears.
83
85
  - **Forced Interface Scheme** — Force light or dark token palettes regardless of the accent color's lightness; in `Auto` both the surface and font directions follow the accent's lightness (dark pick → light fonts, light pick → dark fonts), falling back to the wallpaper's perceived brightness when no color is picked.
84
86
  - **File-based Persistence** — All settings are stored on the filesystem under `~/.dsh/.dsh-any-background-data/`, not `localStorage`.
85
87
  - **Bilingual** — Full Chinese / English UI with automatic locale detection.
@@ -87,6 +89,18 @@ A **DeepSeek Harness** appearance plugin: custom theme color, background wallpap
87
89
 
88
90
  ## Changelog
89
91
 
92
+ ### v0.2.9
93
+
94
+ - **Fixed: opacity and blur sliders looked inert until each was dragged once** — Not a defaults problem: two gates stood in the application path. ① `applyCustomTokensNow()` returned early whenever there was no palette, and `paletteTokens()` returns exactly null when **no color is picked and no scheme is forced** — so the four opacity sliders' alpha variables were never written at all. ② `applyWp()` additionally gated the call behind `rHasColor() || rBgDark() !== null || ...`, all false on a fresh install, so it was never even invoked. Opacity now applies unconditionally, falling back to the host's own resolved surface tokens when the plugin has no palette (`readHostOpacityTokens()`, the same host fallback the workbench-panel slider already used). The sliders only supply the alpha — colors still come from the host skin, so a custom host theme survives.
95
+ - **Defaults moved to mid-scale** — Every per-part opacity now defaults to 0.5 and every blur to 30px (half of the 0–60px range), so a fresh install shows the controls working instead of appearing to do nothing. **Fresh installs only:** existing `theme-config.json` files are untouched. The wallpaper's own alpha (`wallpaperOpacity`) stays at 100% — halving it would dim every newly uploaded picture. The server-side `DEFAULT_CONFIG` was updated in lockstep, since one-sided declarations are exactly what silently dropped fields in v0.2.8.
96
+ - **Fresh installs now persist immediately and re-read once** — When `theme-config.json` is missing, the `read` RPC writes the defaults straight to disk and returns `firstRun`; the client then persists the browser half's full default set, calls `loadPersisted()` again, and runs `applyWp()` so the interface paints from a config that genuinely exists on disk.
97
+ - **Mobile / touch support for the background editor** — The editor only understood a mouse, so on a phone or tablet the wallpaper could neither be dragged nor zoomed. One finger now pans the picture and two fingers pinch to zoom, with the image point that started under your fingers staying pinned to them — which means a two-finger drag pans while it scales, both falling out of the same relation. The touch listeners are attached natively with `passive: false` on purpose: React registers `touchmove` passively at the root, where `preventDefault()` is a no-op, so the page would scroll and the browser would pinch-zoom the whole viewport behind the open dialog; the preview also declares `touch-action: none` to cover the same ground declaratively. Lifting one of two fingers re-baselines the pan against the finger still down, so the picture no longer snaps back by its offset.
98
+
99
+ - **New "Font" settings page** — A fifth page, right after "Interface", holding two new capabilities: the custom interface font and per-part text outlines.
100
+ - **Custom font** — Upload a ttf / otf / woff / woff2 file and apply it to the entire interface. Raw bytes POST to `/dsh-any-background/font/upload` (never base64 through the RPC channel, capped at 100 MB); the server sniffs the real container from its magic bytes, names the slot accordingly, and serves it back from `/dsh-any-background/font` as an `@font-face` source. The host's base font token `--dsw-font-family` is re-scoped to `'DAnyFont', <original host stack>` while the code stack stays untouched. The font can be disabled (file kept) or removed (file deleted), and a rejected upload rolls back to whatever was applied before. Like wallpapers, font files are machine-local — they stay out of profiles and theme exports.
101
+ - **Per-part text outline** — Nine groups, each with its own outline width (0–4 px, 0.5 steps, 0 = off) and color. Colors are stored as **preset keys**, not resolved values: "auto" inverts the font direction (light glyphs get a dark outline) and "accent" follows the current primary, so both re-derive automatically with the theme. Code blocks, inline `code`, icons and placeholders are explicitly exempted.
102
+ - **Known trade-off** — `-webkit-text-stroke` may clip by about 1px inside some single-line ellipsis containers; multi-line containers are unaffected.
103
+
90
104
  ### v0.2.8
91
105
 
92
106
  - **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).
@@ -94,14 +108,6 @@ A **DeepSeek Harness** appearance plugin: custom theme color, background wallpap
94
108
  - **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
109
  - **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
110
 
97
- ### v0.2.7
98
-
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.
100
- - **New better-sidebar workbench sliders** — `panelOpacity` / `blurs.panel` drive dsh-better-sidebar's bottom workbench panel through `[data-dsh-bottom-panel]` and the native right sidebar through `[data-sidebar-right-panel]`, re-scoping the panel's surface tokens to the plugin palette (dedicated token remap + panel blur rules). Without that plugin the row is hidden and the sliders are inert.
101
- - **Popover blur fixed** — A new `POPOVER_BLUR_RULE` makes the "card" blur slider land on dropdown / popover surfaces as well, not just the panels inside the dialog.
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.
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).
104
-
105
111
  ## Installation
106
112
 
107
113
  ### Method 1: npm install (Recommended)
@@ -145,6 +151,7 @@ pnpm dsh web
145
151
  ## Compatibility
146
152
 
147
153
  - **[`dsh web`](https://github.com/deepseek-ai/deepseek-harness) 0.1.5-rc.2** — This release targets `0.1.5-rc.2` only (verified on it); `engines.dsh` and `dsh.compatibility.dshReleases` in `package.json` declare that single release as well.
154
+ - **[DSHA](https://github.com/DSH-APP/DSHA)** — DeepSeek Harness Android launcher (ROOT-free, Termux-free). Its bundled `dsh` is `0.1.5-rc.2`, the exact release this plugin targets, so it is compatible; the mobile UI shell is provided by `dsh-web-mobile`.
148
155
  - **[deepseek-harness-desktop](https://github.com/anywhere-labs/deepseek-harness-desktop)** — Supported
149
156
 
150
157
  ## Star History
package/README.zh.md CHANGED
@@ -66,9 +66,9 @@
66
66
  - **精确 HSL / RGB 输入** — 通过数值精确输入颜色,与色轮实时双向同步。
67
67
  - **智能取色** — 一键从壁纸提取主题色:采样可见区域、量化像素、剔除灰色/近黑/近白,选出现量最大的鲜亮色。视频壁纸自动截帧参与取色。纯客户端完成。
68
68
  - **吸管取色** — 在壁纸上悬停预览颜色,点击即可选为主题色。
69
- - **背景壁纸** — 上传任意图片作为壁纸,在视口比例的编辑器中拖动平移、滚轮缩放。
69
+ - **背景壁纸** — 上传任意图片作为壁纸,在视口比例的编辑器中拖动平移、滚轮缩放(触屏上单指拖动、双指捏合缩放)。
70
70
  - **视频壁纸** — 上传视频作为动态壁纸:静音循环播放、刷新不丢失(落盘持久化 + HTTP 流式播放,支持 Range seek);自动截取一帧用于预览、主题色提取与位置编辑参考。
71
- - **位置编辑器** — 图片与视频共用同一套编辑器:拖动平移、滚轮缩放、一键重置;图片与视频的位置状态各自独立保存,互不覆盖。
71
+ - **位置编辑器** — 图片与视频共用同一套编辑器:拖动平移、滚轮或双指缩放、一键重置;图片与视频的位置状态各自独立保存,互不覆盖。
72
72
  - **布局模式** — 适应 / 填充 / 拉伸 / 平铺 / 居中五种排布,图片与视频通用;「适应」模式下编辑器提交的构图在窗口缩放、跨屏移动后保持一致。
73
73
  - **动态生成背景** — 支持网格渐变、Shader、几何图案,可调节扩散范围、色彩强度并锁定种子。
74
74
  - **分部位界面透明度** — 主背景、侧边栏、卡片面板(含对话框周围的选项框/菜单)、输入框与控件(发送框、Cordis 插件面板)、设置面板、对话文本框、轨迹页、better-sidebar 工作台、产出物/高亮内容各自独立滑块。
@@ -80,6 +80,8 @@
80
80
  - **外观预设与配置档案** — 六套一键预设(默认 / 毛玻璃 / 极简白 / 暗夜紫 / 赛博 / 暖阳),外加自定义命名档案:随时保存当前观感、随时套回,删除有二次确认保护。
81
81
  - **壁纸轮换** — 把多张图片加入轮换池(缩略图选择器),按随机或顺序、每次刷新 / 每天 / 每周的频率自动更换;切换时服务端把所选图片复制进当前壁纸槽,导出/导入与取色管线完全不用改。
82
82
  - **昼夜自动切换** — 指定日间与夜间两套配置,按固定时段或跟随系统深色模式自动切换。
83
+ - **自定义字体** — 上传一个 ttf / otf / woff / woff2 字体文件(上限 100 MB),通过 `@font-face` 应用到整个界面的文字;可随时停用或移除。字体按原始字节流式上传并持久化到插件数据目录,代码块仍保持等宽字体。
84
+ - **分组文字描边** — 沿用界面页那九个「透明度 / 模糊」分组,为每个分组单独加 `-webkit-text-stroke` 描边:粗细 0–4 px(0 = 关闭),颜色支持自动反色 / 灰 / 黑 / 白 / 主题色 / 自定义。代码块、`inline code` 与图标自动豁免,多色语法不会糊成一团。
83
85
  - **强制界面明暗** — 无论主题色明暗如何,都能强制生成亮色/暗色整套令牌;「自动」下配色与字体方向由主题色明度驱动(深色 → 浅字,浅色 → 深字),未选主题色时按壁纸画面亮度判断。
84
86
  - **文件持久化** — 所有设置保存到文件系统 `~/.dsh/.dsh-any-background-data/`,不再依赖 `localStorage`。
85
87
  - **中英双语** — 完整的中英文界面,自动跟随语言设置。
@@ -87,6 +89,17 @@
87
89
 
88
90
  ## 更新日志
89
91
 
92
+ ### v0.2.9
93
+
94
+ - **修复:初次安装时透明度与模糊度滑块「要手动拖一次才生效」** —— 根因不是默认值,而是应用链路有两道门槛:① `applyCustomTokensNow()` 遇到没有调色板的情况直接 return,而**没选主题色且没强制明暗**时 `paletteTokens()` 正是返回 null,于是四个透明度滑块的 alpha 变量从头到尾没被写过;② `applyWp()` 外面还有一层 `rHasColor() || rBgDark() !== null || ...` 的门,初次安装全部落空,连 apply 都没调用。现在透明度无条件应用,没有自有调色板时回落去读宿主已解析的表面 token(`readHostOpacityTokens()`,与工作台面板 opacity 的宿主回落同源)——滑块只提供 alpha,配色仍由宿主皮肤决定。
95
+ - **默认值改为中档** —— 各分组透明度默认 0.5、模糊默认 30px(滑块量程 0–60px 的一半),初次安装即可看到滑块生效,不再是「看起来没反应」。**只影响首次安装**:已有 `theme-config.json` 的用户不受任何影响。壁纸本身的透明度(`wallpaperOpacity`)保持 100%,否则首次上传的壁纸会被直接压暗一半。服务端 `DEFAULT_CONFIG` 同步更新——两侧不同步正是 v0.2.8 静默丢字段的原因。
96
+ - **首次安装即落盘并强制重读一次** —— `read` RPC 检测到 `theme-config.json` 不存在时立刻把默认值写盘并返回 `firstRun`;客户端收到后 `persistConfig()` 写入浏览器侧的完整默认集,再 `loadPersisted()` 重读一次并 `applyWp()`,确保界面是从磁盘上真实存在的配置渲染出来的。
97
+ - **手机端背景位置调整适配** —— 背景编辑器此前只认鼠标,触屏设备上壁纸既拖不动也缩放不了。现在单指拖动画面、双指捏合缩放,且**捏合起手时手指下方的画面会始终钉在手指上**——所以「双指一边拖动一边缩放」由同一条关系式自然得出,不需要额外分支。触摸事件以 `passive: false` 原生挂载是有意为之:React 在根节点注册的 `touchmove` 是被动的,`preventDefault()` 在那里形同空操作,页面会在弹窗背后跟着滚动、浏览器还会把整个视口一起缩放;容器同时声明 `touch-action: none`,从声明式一侧兜住同样的行为。双指抬起其中一指时会以仍按住的那根手指重新建立平移基准,画面不会再按原偏移量弹回去。
98
+ - **新增「字体」设置页** — 设置面板在「界面」之后多出一页,收纳两组新能力:自定义字体与分组文字描边。
99
+ - **自定义字体** — 上传 ttf / otf / woff / woff2 文件应用到整个界面。文件以原始字节 POST 到 `/dsh-any-background/font/upload`(不走 RPC base64,上限 100 MB),服务端按魔数嗅探真实容器格式并据此命名落盘,再由 `/dsh-any-background/font` 提供 `@font-face` 源;宿主的基础字体令牌 `--dsw-font-family` 被收敛为 `'DAnyFont', <宿主原字体栈>`,代码块等宽字体不受影响。支持停用(保留文件)与移除(删除文件),上传失败会回滚到原有字体。字体文件与壁纸一样是本机资源,不进配置档案与导出包。
100
+ - **分组文字描边** — 九个界面分组各自独立的描边粗细(0–4 px,0.5 步进,0 = 关闭)与颜色;颜色存的是**预设键**而非解析后的色值:「自动」按字体明暗取反色(浅字配深描边),「主题色」跟随当前主色,二者都会随主题自动重算。代码块、行内 `code`、图标与 placeholder 显式豁免,多色语法着色不会糊。
101
+ - **已知取舍** — `-webkit-text-stroke` 在部分单行省略号容器边缘可能有 1px 级裁切;多行容器正常。
102
+
90
103
  ### v0.2.8
91
104
 
92
105
  - **修复:产出物 / 高亮内容的透明度与模糊度刷新即丢** — 配置结构在插件两半边各声明一份,node 半边(按自己的结构净化后落盘)一直没跟上 `producedOpacity` 与 `blurs.produced`:滑块当次有效(内存里是对的),`writeConfig` 落盘时却把这两个字段静默丢掉,刷新自然回到默认值。现已在宿主侧补齐:`PartBlurs` / `ThemeConfig` / `ProfileAppearance` 结构与默认值,以及两处净化表(整份配置 + 档案快照)。
@@ -94,14 +107,6 @@
94
107
  - **新增「两半边结构漂移」守护** — 宿主净化配置时,对任何「只在一侧声明过」的字段打一次警告日志(`ignoring unknown config field "blurs.xxx"`),让这类不同步在宿主日志里当场暴露,而不是静默吞掉一个设置项。
95
108
  - **导入配置后界面状态补齐** — 导入 JSON 时此前只刷新背景与配色,档案列表、壁纸轮换池、昼夜调度与明暗分段控件仍显示导入前的旧值;现在导入会一并同步这部分元状态。
96
109
 
97
- ### v0.2.7
98
-
99
- - **新增「产出物 / 高亮内容」滑块** — 对话里的代码块(含语言顶栏)、行内 `code` 高亮芯片与产出物 chip 现在共用一支透明度 + 模糊度滑块。透明度是这些表面**自身背景色的 alpha**:100% 与宿主原样逐色一致,下调时淡出的就是它原本那块颜色,而不是在旧背景上再叠一层新色(此前代码块外层仍不透明,滑块只是在原色上混入插件调色板颜色,模糊也因此看不见效果);模糊度用 `backdrop-filter` 给同一层表面加磨砂。文档预览里不在 `.md-code-block` 内、只靠 `--shiki-background` 上色的代码块也一并覆盖。
100
- - **新增 better-sidebar 工作台滑块** — 通过 `[data-dsh-bottom-panel]` 与 `[data-sidebar-right-panel]` 为 dsh-better-sidebar 的底部工作台面板提供独立的透明度(`panelOpacity`)与模糊度(`blurs.panel`);面板表面按插件调色板重新着色,并新增强度更高的可复用规则(面板令牌重映射 + 面板模糊)。未安装该插件时该行不显示,滑块无副作用。
101
- - **弹出层模糊归位** — 新增 `POPOVER_BLUR_RULE`:「卡片」模糊滑块现在同时落到下拉菜单 / 弹出层这类弹出表面,不再只影响对话框内的面板。
102
- - **宿主支持收敛** — 只面向 **DSH 0.1.5-rc.2**(已在该版本上验证):`engines.dsh` 与 `dsh.compatibility.dshReleases` 只声明这一项,README 删除旧的 8 版本矩阵;`panelOpacity` 进入档案 / 导出导入 / 昼夜切换的完整链路。
103
- - **六套预设同步新参数** — 工作台透明度随预设给出(毛玻璃 0.85 / 暗夜紫 0.8 / 暖阳 0.75 等),产出物滑块默认 100%(即宿主原样)。
104
-
105
110
  ## 安装
106
111
 
107
112
  ### 方式一:npm 安装(推荐)
@@ -145,6 +150,7 @@ pnpm dsh web
145
150
  ## 兼容性
146
151
 
147
152
  - **[`dsh web`](https://github.com/deepseek-ai/deepseek-harness) 0.1.5-rc.2** — 当前版本只面向 `0.1.5-rc.2`(已在该版本上验证);`package.json` 的 `engines.dsh` 与 `dsh.compatibility.dshReleases` 也只声明这一项。
153
+ - **[DSHA](https://github.com/DSH-APP/DSHA)** — DeepSeek Harness 安卓启动器(免 ROOT、免 Termux)。其包内 dsh 同为 `0.1.5-rc.2`,即本插件的目标版本,故兼容;移动端界面由 `dsh-web-mobile` 提供。
148
154
  - **[deepseek-harness-desktop](https://github.com/anywhere-labs/deepseek-harness-desktop)** — 支持
149
155
 
150
156
  ## Star History