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

@zink-ning-lkr/dsh-chat-width

v0.2.1

Published

对话区宽度调节——加宽/收窄聊天内容区与用户气泡,滑块配置即时生效(自渲染 DOM,官方 client 通道)

Downloads

273

Readme

dsh-chat-width

对话区宽度调节插件(DSH Web GUI)。

功能

  • 对话区宽度:滑块调节消息列与输入框的整体内容宽度(480–1680px),拖动即时生效。
  • 用户气泡宽度:滑块调节用户气泡最大宽度(320–1200px,不超过容器 82%)。
  • 恢复默认:一键清空配置,回到官方原值(748px / 525px)。

原理

官方对话区宽度由 CSS 变量 --dsh-chat-content-width(默认 748px)控制,定义在会话根元素上; 输入框卡片宽度是它的衍生值(calc(+32px))。插件扫描样式表定位声明该变量的规则 → 命中 会话根元素 → inline 重设变量,消息列与输入框整体联动。用户气泡栈([data-time-hover-root] > :first-child) 注入变量驱动规则(min(var(--dsh-user-bubble-max), 82%))覆盖官方 525px 上限。

类名是构建混淆名,但变量名稳定——以变量名为锚,不依赖混淆类。若根元素定位失败,降级为 直接覆盖 [data-chat-flow] 的 max-width(输入框不联动,主体仍生效)。

配置存储

写入 ~/.dsh/settings.yamlchat-width 命名空间(可手改):

chat-width:
  width: 748      # 480–1680
  bubbleMax: 525  # 320–1200

读写走插件自带的 loopback 桥接(/api/dsh-chat-width/settings/describe|mutate)。 远程浏览器(remote-web-ui)不是 loopback 连接,配置自动降级为默认值。

结构

  • lib/index.js — Node half:注册 chat-width settings namespace + loopback 桥接路由。
  • lib/client.js — 浏览器 half:宽度控制器 + 设置 Tab(官方 slots 通道)。
  • scripts/build.sh — 构建/打包:校验双 half 语法并产出 npm pack tgz(插件生产线兼容)。

安装 / 下载

从 npm 安装(推荐)

dsh plugin --profile web add @zink-ning-lkr/dsh-chat-width

也可以手动安装依赖并装配:

npm install @zink-ning-lkr/dsh-chat-width

然后在 profile 的 package.json 中把 @zink-ning-lkr/dsh-chat-width 加入 dsh.profile.bundles

从 GitHub Release 下载

Releases 下载 当前版本的 zink-ning-lkr-dsh-chat-width-<版本号>.tgz,然后安装:

dsh plugin --profile web add ./zink-ning-lkr-dsh-chat-width-<版本号>.tgz

例如 v0.2.0 直链: https://github.com/zink-ning-lkr/dsh-chat-width/releases/download/v0.2.0/zink-ning-lkr-dsh-chat-width-0.2.0.tgz

本地构建

bash scripts/build.sh   # 校验双 half 语法,产出 zink-ning-lkr-dsh-chat-width-<version>.tgz

或直接使用开发台的插件生产线(dev_build_plugin 构建、dev_release_plugin 发 GitHub Release)。

本地开发 / 热装

profile package.jsondsh.profile.bundles 加入 @zink-ning-lkr/dsh-chat-width,依赖用 link: 指向本目录; 或使用 dev_install_package 热装(junction + loader.create,免重启)。

License

MIT © zink-ning (zink_ning)