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

task-info-panel

v1.0.2

Published

React 任务信息侧边栏:SKU、任务类型、任务图片(按 custom_tag / label_type 分组)

Readme

task-info-panel

React 任务信息侧边栏组件:展示 SKU、任务类型、任务等级、产品类型、附件链接,以及按 custom_tag(Tabs)和 label_type 分组的任务图片。

安装

npm install task-info-panel
# 或
yarn add task-info-panel
# 或
pnpm add task-info-panel

依赖

  • reactreact-dom >= 17(peer)
  • 样式使用 Tailwind CSS 类名,请确保宿主项目已配置 Tailwind,或自行覆盖样式。

使用

import { TaskInfoPanel } from 'task-info-panel';

// 固定在左侧(由宿主控制布局)
<TaskInfoPanel className="fixed left-0 top-0 bottom-0" />

// 仅通过 props 传数据,不监听 postMessage
<TaskInfoPanel task={taskData} enablePostMessage={false} />

Props

| 属性 | 类型 | 默认值 | 说明 | |------|------|--------|------| | task | TaskData | - | 任务数据,不传则依赖 postMessage 或显示空状态 | | enablePostMessage | boolean | true | 是否监听 window.postMessage 更新任务数据 | | className | string | '' | 根节点额外 class |

数据类型

从包内导出:

  • TaskData:任务完整数据
  • TaskFileImageValueImageGroupByTypeImagesAssignmentItem

postMessage 协议

启用 enablePostMessage 时,可向页面发送任务数据,支持以下结构之一:

  • { payload: Partial<TaskData> }
  • { data: Partial<TaskData> }
  • { task: Partial<TaskData> }
  • 或直接为 Partial<TaskData> 对象

至少包含有效 sku 字符串才会更新面板。

本地开发 / 构建

cd task-info-panel
npm install
npm run build

发布前请先执行 npm run build,发布内容以 distREADME.md 为准。

task-info-panel