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

@naspk/fnui-theme

v0.1.0

Published

fnUI 的桌面端与移动端主题变量、基础样式和 Tailwind/UnoCSS 预设。

Readme

@naspk/fnui-theme

fnUI 的主题样式和可选的工具类集成。每个页面只引入一个平台的 TDesign 样式 和对应的 @naspk/fnui-theme/desktop.css 或 @naspk/fnui-theme/mobile.css, 并用 FnProvider 包裹界面。工具类配置不能替代这些样式或 Provider。

语义颜色

Tailwind CSS 和 UnoCSS 共用以下颜色名:

| 工具类颜色 | 对应变量 | | --- | --- | | fn-primary, fn-primary-hover, fn-primary-active, fn-primary-light | --fn-primary 等 | | fn-success, fn-warning, fn-danger | --fn-success 等 | | fn-page, fn-container, fn-nav | --fn-page 等 | | fn-text, fn-text-secondary, fn-text-muted | --fn-text 等 | | fn-border, fn-fill, fn-overlay | --fn-border 等 |

例如:bg-fn-container text-fn-text border-fn-border、 text-fn-primary、hover:bg-fn-primary-hover。颜色在使用该类的元素上解析, 因此会跟随最近的 FnProvider 及其亮暗主题和预设。请在 Provider 内使用; Provider 外的元素不会自动获得 --fn-* 变量。

这些预设不会加载 Tailwind 或 UnoCSS,也不会注册全局重置样式。应用应自行配置 工具链、扫描路径及其 CSS。TDesign 和 fnUI 的组件样式可能比普通工具类有更高 优先级;在组件内部包装普通元素使用工具类更可靠。调整组件自身外观时应检查 最终 CSS 的层级和选择器优先级。

Tailwind CSS v4

安装并按 Tailwind 官方方式配置 tailwindcss 和对应构建插件。在应用的 CSS 入口:

/* 按需省略 preflight,以避免重置 TDesign 的基础样式。 */
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/utilities.css" layer(utilities);
@import "@naspk/fnui-theme/tailwind.css";

然后在应用入口加载该 CSS、所选平台的 TDesign CSS 和 fnUI CSS。确保 Tailwind 能扫描应用的 Vue 文件;如果应用关闭了自动扫描,使用 @source 指定路径。 tailwind.css 只供 Tailwind v4 编译,不是浏览器直接使用的组件样式。

Tailwind CSS v3

在 ESM 配置文件 tailwind.config.mjs 中:

import fnui from '@naspk/fnui-theme/tailwind'

export default {
  content: ['./index.html', './src/**/*.{vue,js,ts}'],
  presets: [fnui],
  // 可避免 Tailwind preflight 与 TDesign 的基础样式冲突。
  corePlugins: { preflight: false },
}

按 Tailwind v3 的方式配置 PostCSS,并在应用 CSS 中加入 @tailwind base、 @tailwind components 和 @tailwind utilities。此入口是 ESM,不支持 require();已有 CommonJS 项目可将 Tailwind 配置改为 .mjs。

UnoCSS

安装 unocss,在 uno.config.ts 中:

import { defineConfig, presetWind3 } from 'unocss'
import presetFnUI from '@naspk/fnui-theme/unocss'

export default defineConfig({
  presets: [presetWind3(), presetFnUI()],
})

在 Vite 中添加 UnoCSS 插件,并在应用入口导入 virtual:uno.css。该预设只提供 颜色,不包含原子规则;上例的 presetWind3() 提供常用工具类。

Tailwind v3 和 UnoCSS 中的颜色值直接引用 CSS 变量,带 /50 等透明度修饰符 的行为取决于具体工具及版本,不作为本集成的兼容性保证。