npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-ui-dafeng-customizer

v0.1.3

Published

DSH Web UI 界面美化插件:主题颜色 + 背景图片(URL / 本地上传 / 透明度),配置经 settings 持久化、跨重启保留。

Readme

dsh-ui-dafeng-customizer

DSH(DeepSeek Harness)Web UI 界面美化插件:

  • 🎨 主题颜色:10 个预设色板 + 取色器 + 恢复默认;覆盖品牌 token 链与 DeepSeek 静态蓝,亮/暗模式同步
  • 🖼️ 背景图片:粘贴 URL 或 📁 上传本地图片(JPG/PNG/WebP/GIF,大图自动压缩到 1920px 内)
  • 🎚️ 透明度:0–100% 滑块实时调节,同时把各面板背景调为半透明让壁纸透出
  • ✅ 生效自检:设置页内置自检框(getComputedStyle 真实计算值)
  • 💾 配置持久化:经 settings 命名空间写入 $DSH_HOME/settings.yaml,重启 DSH 自动恢复

安装

发布到 npm 后,一行命令安装到 web profile:

npx @deepseek-ai/dsh plugin --profile web add dsh-ui-dafeng-customizer

重启 dsh web 后生效。使用入口:设置 → 界面美化。

包结构

dsh-ui-dafeng-customizer/
├── package.json        # dsh.bundle.patch + dsh.client 清单(组合层声明)
├── cordis.patch.yml    # 组合补丁:insert 本插件行
├── lib/
│   ├── index.js        # Host 半区:注册 settings 命名空间(持久化)
│   └── client.js       # Client 半区:设置页 + 主题色 + 壁纸 + 上传(__ModuleLoader__ bundle)
└── README.md

工作原理

  • 组合层:package.json 声明 "dsh": { "bundle": { "patch": "./cordis.patch.yml" } } → dsh plugin 识别为 profile 插件层;启动时组合器把 cordis.patch.yml 叠加进 web 组合。
  • Client bundle:"dsh": { "client": { "platform": "web", "inject": [...] } } → clientModules 服务增量扫描,lib/client.js 以 window.__ModuleLoader__.load(...) 格式加载 (require('react') 取 React,导出 { apply, inject })。
  • 持久化:Host 注册 settings 命名空间 dsh-ui-dafeng-customizer(schemastery 风格的可调用函数作为 schema, 不能直接传 zod 对象,否则运行时报 schema is not a function); Client 通过 connection.api.settings.describe / mutate 读写,不依赖自定义 RPC。
  • 主题色:theme.overrideTokens(快照 → presenter → body 内联)为主通道, 另注入 body { --x: <色值> !important } CSS 为辅助层(token 定义在 body 上, 覆盖必须作用在 body 才能生效)。
  • 壁纸:body::before 固定层(z-index:-1; pointer-events:none)。

发布

方式 A:GitHub Actions(推荐)

仓库已带 .github/workflows/publish.yml:打 v* 标签自动发布。

# 1. 在 GitHub 仓库设置 → Secrets and variables → Actions 添加 NPM_TOKEN
#    (npm 官网 → Access Tokens → Generate New Token,选 "Publish" 权限)

# 2. 发布新版本(自动打 tag 并推送,触发 CI)
npm version patch        # 或 minor / major(同时把 version 写入 package.json)
git push --tags

# 3. 等 GitHub Action 跑完 → npm 上即出现新版本

也支持在 Actions 页面手动运行(workflow_dispatch)。 前置步骤:把本目录推到一个 GitHub 仓库(git init && git add . && git commit && git remote add origin <url> && git push -u origin main)。

方式 B:本地直接发布

npm login               # 首次:输入 npm 用户名 / 密码 / OTP
npm version patch       # 可选:版本 +1 并打 tag
npm publish             # 自动执行 prepublishOnly 校验

发布后安装

npx @deepseek-ai/dsh plugin --profile web add dsh-ui-dafeng-customizer

(如需 scope:改 package.json 的 name 为 @<你的scope>/dsh-ui-dafeng-customizer。)

开发注意

  • Client 半区是真实插件环境:没有动态包的 styles.insert / host.call 内置, 样式用原生 DOM <style> 实现,持久化走 settings Remote。
  • 上传的图片以 data URL 存进 settings.yaml(大图会被自动压缩,注意体积)。
  • 新增功能保持 ctx.effect 清理所有副作用(样式标签、token 层、debounce)。