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-canvas-preview

v0.4.9

Published

Canvas preview panel for DeepSeek Harness — live-preview HTML artifacts, auto-sync, save-as, PNG/JPG/SVG export. DSH 画板预览插件:实时预览、另存为、PNG/JPG/SVG 导出。

Readme

🎨 dsh-canvas-preview

DeepSeek Harness 的画板预览插件 — AI 生成的网页产物,实时预览 · 一键高清导出

Canvas preview panel for DeepSeek Harness — live-preview AI-generated HTML artifacts and export them as high-res PNG/JPG in one click.

npm Platform: DeepSeek Harness License: MIT topic: dsh-plugin Author GitHub Release


🤔 什么是 DeepSeek Harness?

DeepSeek Harness(DSH) 是 DeepSeek 开源的 AI 智能体运行台:浏览器里跑一个能读写文件、执行命令、调用工具的 AI 编程助手。 它的每一项能力都是一个 Cordis 插件 —— 本项目就是其中之一。

DeepSeek Harness (DSH) is DeepSeek's open-source agent harness: a browser-based AI coding assistant whose every capability is a Cordis plugin. This project is one of them.


✨ 它解决什么问题 / What it solves

用 DSH 做内容创作时,AI 经常生成自包含 HTML 产物——架构图、信息图、网页原型、幻灯片…… 但你只能去文件夹里双击打开,来回切换窗口。

dsh-canvas-preview 把「Gemini / Claude 的 Canvas 画板体验」带进 DSH

| | | |---|---| | 🖼 画板页签 | 与「聊天」并排的独立视图,左侧文件列表 + 右侧沙箱实时预览 | | 🔄 自动同步 | 每 4 秒扫描工作区,AI 一保存你立刻看到,无需手动刷新 | | ↗️ 右上角通知卡 | AI 生成新产物瞬间弹出实时渲染缩略图,整卡可拖动、可展开、可调大小 | | 📂 另存为 | 原生 macOS 目录选择器,默认 HTML 同目录,可改存「下载」或任何位置 | | 📥 PNG/JPG/SVG 导出 | 位图:Chrome 无头 2x 高清(3200×2400)· ~2s;矢量:SVG 直提(瞬时 · 无限缩放)· 点击结果直达 Finder | | 🌓 细节体验 | 宽度三档(适配/1280/手机竖屏)· 深色预览 · 导出耗时显示 |

🏗 架构 / Architecture

双平面插件架构

双平面 Cordis 插件:Client 半(浏览器)注册画板页签与通知卡,通过独立 RPC 频道 /canvas(不占用官方 /api 拦截器)调用 Host 半(Node.js)的文件扫描与导出引擎。 导出采用「Chrome 后台启动 + 轮询截图文件 + 稳定即杀」策略——不受被墙字体影响,永不挂起。

🚀 安装 / Install

别人装只需要一条命令(会自动装包、写入 profile、尝试重启 Harness):

npx dsh-canvas-preview

然后打开 http://127.0.0.1:3080/ ,会话顶栏出现「画板」即可。

等价官方装包命令(包内已声明 dsh.bundle,会套用 cordis.patch.yml 启用画板):

dsh plugin --profile web add dsh-canvas-preview

npx 安装器同样会写入 profile 并尝试重启。)

本地开发(file: 链接,改源码即生效):

dsh plugin --profile web add \
  "dsh-canvas-preview@file:/绝对路径/dsh-canvas-preview"

然后在 ~/.dsh/profiles/web/cordis.patch.yml 启用(示例见 install/cordis.patch.example.yml)。

动态插件方式(创造模式,不写 profile)

  1. 克隆本仓库到任意位置
  2. 在 DSH 会话中对 Agent 说:

    dsh-canvas-preview/dynamic/ 的 host.js + client.js 定义并运行画板插件

  3. 批准一次插件运行 —— 画板页签即出现在会话顶部

🔐 访问范围 / What it accesses

| 访问 | 说明 | |---|---| | 工作区 HTML | 扫描会话 cwd 下的 .html / .htm,在沙箱 iframe 中预览 | | 本机 Chrome | PNG/JPG 导出时启动无头 Chrome 截图,写回工作区或指定目录 | | 网络 | 把产物发到第三方。被预览的 HTML 自己请求远程字体/图时除外 | | 凭据 | 不读取 API Key |

🔎 在哪找到 / Discover

  • npm:https://www.npmjs.com/package/dsh-canvas-preview
  • GitHub topic:dsh-plugin
  • 社区目录:https://deepseekharnessplugins.com/ (PR 合并后同步)

🗺 Roadmap

  • [x] 画板页签 · 文件列表 · 沙箱预览
  • [x] 会话 cwd 智能定位扫描根
  • [x] 自动同步(签名轮询,不重置用户选中)
  • [x] 宽度适配 / 深色预览
  • [x] 右上角产物通知卡(实时缩略图 + 整卡拖动 + 可调大小)
  • [x] PNG/JPG 导出(2x · ~2s · 抗字体墙 · 会话沙箱策略直传)
  • [x] 另存为(原生目录选择器)+ 导出后 Finder 定位
  • [x] v0.4 · 静态包dsh plugin add + __ModuleLoader__ 客户端包装
  • [x] SVG 矢量导出(直接提取 <svg> 块,瞬时完成,无限缩放不失真)
  • [ ] 自定义导出尺寸
  • [ ] 英文文档与演示 GIF

🤝 参与贡献 / Contributing

欢迎 Issue 反馈 bug 与功能建议;欢迎 Fork 后自由修改(MIT 协议)。 PR 会被认真审阅。开发备忘(沙箱策略、Chrome 挂死等硬核经验)见 dynamic/README.md

👤 作者 / Author

jiuyuechuwuhaoGitHub 主页

📄 License

MIT © 2026 jiuyuechuwuhao