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

@94ai-plus/nf-message

v1.0.0

Published

Vue 3 message service with legacy API, accessible notifications and dual themes

Readme

@94ai-plus/nf-message

HomePage

官网 · 项目仓库

Vue 3 消息提示,保留旧版外观、四种类型、自动关闭、悬停暂停、Escape 关闭与 8px 堆叠间距。支持 Chalk/OEM 主题、文本/VNode/可信 HTML、类型化实例和应用上下文隔离。

Installation

yarn add @94ai-plus/nf-message @94ai-plus/nf-theme-chalk vue

Usage

import NfMessage, { Message } from '@94ai-plus/nf-message'
import '@94ai-plus/nf-theme-chalk/nf-message.css'

app.use(NfMessage) // Options API: this.$openMessage.success('Saved')
Message.success('Saved')
const handler = Message({ message: 'Persistent', duration: 0, showClose: true })
handler.close()
Message.close(handler.id)
Message.closeAll()

默认导出是组件插件,不是可调用服务;总包也导出 Message。setup 中使用 useMessage() 继承当前 provider 的语言/注入并自动清理;应用专属服务可用 createMessage(appContext),其 closeAll 只处理自身消息。直接 Message 不隐式绑定其他应用,可用第二参数传入 appContext。

API

message: string / VNode;type: success / warning / info / error(默认 info);duration: 3000ms(<=0 常驻);offset: 20px;iconClass、customClass: 空字符串;showClose、center、dangerouslyUseHTMLString: false;onClose(handler) 在关闭时调用一次。zIndex 自动从 3001 递增,也可显式设置。四个类型快捷方法同样接受字符串、VNode 或 options。

返回 MessageHandler:id、el/$el、visible、closed、close()。不再返回 Vue 2 私有实例。SSR 返回 closed=true 的空操作 handler。关闭操作幂等;悬停移出后完整重新计时。普通字符串默认转义;HTML 模式仅用于可信内容。默认插槽覆盖 message,声明式组件不加入服务堆叠。消息挂到 body,组件主题跟随根 data-nf-theme;关闭按钮支持键盘和八语言 aria-label,正文由业务提供。

Build outputs

提供 ESM、CJS、browser ES/UMD、类型声明和 CSS。UMD 全局名 NfMessage,外置 Vue,不依赖 Element Plus。独立主题含 nf-message.css 与 SCSS,OEM 使用 @94ai-plus/nf-theme-oem/nf-message.css。

消息文档

全局默认配置

通过总包的 NfConfigProvider 的 nfMessage 配置项设置默认属性。支持响应式更新和嵌套继承,优先级为组件显式属性 → 最近一层配置 → 外层配置 → 组件原有默认值。undefined 继续继承,false、0 和空字符串保留;按属性合并,数组、对象和函数整体替换,不深度合并。初始化选项仍按组件原有生命周期生效,事件、插槽和原生 attributes 在组件上设置,必填业务数据仍需显式提供。详见全局配置文档。

在 Provider 后代组件的 setup 中调用 useMessage(),由返回的服务继承当前 Provider 的默认属性与语言;单次调用传入的选项优先,组件卸载时清理该服务创建的弹层。无应用/组件上下文的直接服务调用不读取组件树配置。

import { useMessage } from '@94ai-plus/nf-message'

// 在 Provider 后代组件的 setup 中执行
const message = useMessage()
message.success('保存成功')

Contributors

感谢每一位参与项目建设的贡献者!

最近三个月的贡献者气泡图

最近三个月的贡献者头像墙(使用姓名首字母)

以上为随本版本发布的贡献者统计快照,统计日期与分支见图中说明;仅统计 Git 非合并提交,头像使用姓名首字母,不是 GitLab 个人照片。

License

本项目采用 MIT License 开源许可。

Copyright (c) 2026-present Jiahe Zou, 94 Intelligent Technology Co., Ltd.