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

@ufjs/iconmind

v0.1.3

Published

IconMind icons for fjs — one <icon-mind /> tag, painted by Flutter on the app and inline SVG on the web

Readme

@ufjs/iconmind

IconMind(MIT,2,437 个图标)包成一个 fjs 模块:一个标签, 两端各画各的。

仓库里的 demo 就是这么用它的:一条 npm 依赖,没有别的。

使用者要做的事

npm i @ufjs/iconmind
<template>
  <!-- App 上 Flutter 绘制,Web 上内联 SVG -->
  <icon-mind name="agent" :size="28" color="#5b4bde" @tap="onTap" />
  <icon-mind name="firewall" variant="duotone" weight="bold" />
</template>

没有第二步:不用写脚本,不用改 package.json,不用手动列图标。组件也不用 import, <icon-mind /> 是模块的 widget,由工具链注册。

为什么不用配置

模块自带一步构建(package.jsonfjs.prepareprepare.mjs)。fjs 在每次 build / dev / Vite 启动前调用它,它做三件事:

  1. 扫描 app 的源码,找出模板里写了哪些 <icon-mind name="…" />
  2. @iconmind/icons 取出这些图标的形状,写 .fjs/modules/iconmind/icons.json
  3. 把这些名字写成 types.d.ts,于是 name 能补全、写错是编译错误。

产物两端各取所需:Web 侧替身组件 import('fjs/data/icons.json'),打包器切成单独 chunk(页面不画图标就不下载);App 侧由 fjs 拷进 Flutter 宿主 assets,Dart 读 assets/fjs/modules/iconmind/icons.json

产物里只有页面真的写了的那几个图标——2,437 个里用了 6 个就带 6 个(约 1 KB), 和上游包的 tree-shaking 是一个效果,但 app 不用维护清单。

名字来自数据时

扫描只能看见字面量。名字是接口返回、路由参数拼出来的,放项目根的 iconmind.json

{ "icons": ["rag-pipeline", "shield-ellipsis"] }

这是模块自己的配置文件,只在需要时出现,不占 app 的 package.json。

写了一个不存在的 slug,构建会当场停下并提示相近的名字,而不是在界面上留一块 空白。

一个图标就两个字段

[路径, 是否闭合]。几何是权重无关的(一个 weight 就是一个 stroke width), duotone 由 closed 推出来:闭合形状铺 20% 填充,开放形状加 20% 的 halo。两端 照同样两条规则画,所以天然一致。

props

| prop | 默认 | 说明 | |------|------|------| | name | — | iconmind.dev/icons 上的 slug | | size | 24 | 逻辑像素 | | color | 主题色 / currentColor | #rgb / #rrggbb / #aarrggbb | | variant | outline | outline | duotone | | weight | regular | thin | regular | bold | | @tap | — | App 上来自 widget 的 dispatch,Web 上由替身组件转发 |

name 的类型来自钩子生成的 interface FjsIcons(和路由名的 FjsRoutes 同一个 套路)。还没生成过时它是空的,IconName 退回 string,一样能用。名字来自数据 时照常 as IconName

Flutter 侧

flutter/ 是 Dart 包 fjs_iconmind,注册 <icon-mind /> 这个标签,外加两个 调试用的 host 函数(iconmind.count / iconmind.has)。fjs 生成 Flutter 宿主时 自动加依赖、注册调用和 asset(autolink),不用手改 pubspec.yamlmain.dart