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-xhl/dsh-hero-flex

v0.1.1

Published

DSH hero flex seat: occupies the conversation header's corner seat (conversation.session.header.corner) at the lowest priority and hosts a plugin-additive flex row (hero.flex) in the hero / blank-session top-right corner, beside the re-painted right-sideb

Readme

dsh-hero-flex

DSH 插件:把hero / 空白会话页右上角的 flex(原 file-explorer 里“替代原始 右侧栏展开按钮”的那一块)抽成独立插件,并暴露一个插件可追加的槽位。

作用

  • 接管 conversation.session.header.corner(single/session 座位)的 priority -1 (最低 shadowing 优先级)→ 替换 shell 自带的右侧栏展开按钮(priority 0) 及其他占用者。

  • 渲染一行 hero flex:

    [ hero.flex 槽位条目(插件可追加) ] [ 重绘的右侧栏展开按钮 ]
  • 通过注册时的 children: { 'hero.flex': { kind: 'list', scope: 'session' } } 声明 hero.flex 子槽位 —— 任何插件都能往 hero 右上角 flex 里安装自己的组件。

其他插件如何接入

// 在插件的 apply() 里:
ctx.slots.inject('hero.flex', () =>
  ctx.slots.register(
    { name: 'hero.flex', id: '<你的唯一 id>', order: 10, label: '…' },
    (props) => <YourComponent sessionId={props.sessionId} />,
  ))
  • slots.inject 自带「等待声明」机制:hero-flex 安装后声明 hero.flex 时才会注册; 未安装 hero-flex 时 effect 永不触发,不会报错。
  • 条目是 session 作用域:组件自动获得标准 session kit(sessionId、 useSession、useSessions 等)。
  • 有记录会话时 header 的 utilities 座位渲染,hero.flex 条目自动隐藏 (只留重绘的展开按钮),避免与标题栏功能图标重复。

与 dsh-file-explorer 的关系

file-explorer 原先自己占用 corner 座位(priority -1)。现在它改为: 只把 HeroGroup 注册进 hero.flex(不再占用 corner、不再有 shell.overlay 浮层回退)——未安装本插件时 file-explorer 的 hero 按钮组 完全不显示,符合“没注入这个插件,hero 也不显示”的预期。

两者并存时互不冲突。

验证(profile test)

  • conversation.session.header.corner 的占用者:hero-flex(priority -1,active); shell 展开按钮(0,shadowed)、git-gui corner(1,shadowed)。
  • hero.flex 已声明(declared by corner 条目),file-explorer 条目 (id file-explorer,order 10)active。
  • 不安装 hero-flex:file-explorer 不渲染 hero 按钮组(无回退浮层)。