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

fish-dock-plugin-filemgr

v1.2.1

Published

FISH Dock 文件管理插件:目录浏览 + 文件预览(Markdown / 图片 / Office / 代码)+ 文件暂存中转站 + 子灵动岛(1.2.0 起要求 FISH Dock ≥ 2.3.4)。

Readme

文件管理

把 FISH Dock 变成随手可用的文件工作台:左边逛目录、右边看内容,中间还能把常用文件先「暂存」起来,随时拖进别的程序。

功能

目录浏览 + 预览

  • 目录浏览:从磁盘根目录、用户目录、桌面 / 文档 / 下载逐层进入;支持把文件 / 文件夹直接拖进面板。
  • 预览:Markdown 渲染、图片(PNG / JPEG / GIF / WebP / BMP / AVIF / ICO / SVG)、Office 文本抽取(docx 段落与标题、xlsx 多工作表、pptx 每页文字,原生解析 OOXML,不需要装 Office)、代码高亮行号、纯文本与二进制兜底。
  • 上下并列:上半是文件夹浏览器(面包屑 + 列表 + 上一级 / 刷新 / 常用文件夹 / 固定),下半是预览;中间分隔条可拖动调高,高度会被记住。
  • 框选与拖入暂存:在列表里拖出选框可批量选中(Ctrl / Shift 点选切换),选中项直接拖到左侧暂存区即批量加入;拖到一半拖出列表会自动从「框选」切到「搬运」。
  • 常用文件夹:记住打开过的目录,浮层里快速跳转;可把目录「固定」到最上面。

选择文件夹

「打开文件夹」默认调用 Windows 原生文件夹选择框(pick-folder.ps1 + IFileOpenDialog),选完直接进入该目录。

宿主原本会在系统对话框抢走焦点时自动收起设置面板。插件只在弹出对话框的那一刻调用 bridge.js 的 hold(true),选完(或取消/报错)立刻在 finally 里 hold(false) 放开——平时浏览、拖放都不锁,点面板外面照常能关。

宿主没有 fish:hold 能力(官方发行版 ≤ v1.2.3)时,插件自动回落到内置自绘选择器(用后端 preview.tree 逐层浏览),功能完整,只是不锁面板:

| 宿主 | 「打开文件夹」 | 面板锁定 | |---|---|---| | 自行编译、带 fish:hold 的宿主 | Windows 原生对话框 | 仅对话框期间临时锁定 | | 官方发行版(≤ v1.2.3) | 内置选择器 | 不锁定 |

宿主侧要支持这条路,需要三处改动(都已在 FISH-Dock 上游以补丁形式验证过):

  1. sdk/browser/bridge.js 暴露 hold(on) → parent.postMessage({type:'fish:hold', ticket, on}, '*')
  2. Wakuwaku/src/pet/extension-page.js 收 fish:hold 写入 record.hold,并新增 onHold(record, on) 回调;park() / enter() / retire() 各自同步
  3. Wakuwaku/src/pet/settings.js 维护 pluginHold 标志,onBlur 判定里加 !pluginHold

只改插件包、不重编译宿主时,插件自动走内置选择器,功能完整不缺。

文件暂存(中转站)

  • 拖入文件或文件夹即加入暂存区,也可以右键 / 按钮添加。
  • 分组:暂存区支持多个分组标签,点击切换,标签可折叠;删除分组只走标签右侧的 ×。
  • 拖出:把暂存项直接拖到桌面、资源管理器、微信等外部程序。
  • 复制路径、复制为文件、多选批量、去重、清空,偏好持久化。

说明

  • 只读取路径白名单内的文件,路径解析后必须落在允许的根目录之下;UNC 路径一律拒绝。
  • 「打开文件夹」在支持 fish:hold 的宿主上会短暂启动系统 PowerShell 调起 Windows 原生文件夹对话框(pick-folder.ps1),用于拿到用户亲手选择的路径;不加 fish:hold 的宿主上不会启动子进程,走内置选择器。除此之外不启动任何子进程。
  • 页面运行在宿主沙箱里(default-src 'none'),PDF 与音视频不做内联播放,会提示用系统程序打开。
  • 不发起网络请求。

存储

偏好(布局、最近打开、额外根目录、暂存分组)保存在插件命名空间的 config/prefs.json。

开发

# 本地暂存(模拟官方 tools/stage-development.mjs 的产出)
node _stage_filemgr.mjs
# 产物
#   dist/filemgr.fish-plugin
#   _stage/filemgr/   ← 可直接用 FISH Dock 的「从文件安装」装上验证