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

@xinpaiyun/nova-admin-ui

v0.1.0

Published

Nova 应用运营后台公用运行时组件库:平台运营页面、公共组件与工具,应用直接 import 复用,无需复制模板。

Readme

@xinpaiyun/nova-admin-ui

新湃云平台「运营后台公用页面」运行时组件包。把各应用 admin 中重复的运营菜单页(平台用户、商家管理、套餐版本、操作记录、管理员账号、岗位权限、操作日志、平台总览、租户订阅)沉淀为可复用组件,应用侧不再自行复制实现。

页面清单

| 组件 | 对应菜单 | | --- | --- | | PlatformDashboardPage | 平台总览 | | PlatformUsersPage | 平台用户 | | PlatformTenantsPage | 商家管理 | | PlatformEditionsPage | 套餐版本 | | TenantSubscriptionsPage | 租户订阅 | | PlatformAuditLogsPage | 操作记录 | | PlatformSystemUsersPage | 管理员账号 | | PlatformSystemRolesPage | 岗位权限 | | PlatformSystemLogsPage | 操作日志 | | ChangePasswordModal | 修改密码弹窗 | | PageShell / SimpleTable / StatusTag / CodeText / useCapabilityAccess | 公共组件与 hooks |

接入方式

1. 安装并引入样式

pnpm add @xinpaiyun/nova-admin-ui

在应用入口引入样式(类名均带 aui- 前缀,不会污染宿主样式):

import '@xinpaiyun/nova-admin-ui/styles.css'

2. 在根部注入 AdminUiProvider

包内页面不直接发请求,通过 AdminUiProvider 注入运行时能力:

  • api:最小 HTTP 适配器,由应用负责 baseURL、Token 注入、租户上下文、错误翻译和 {code, message, data} 解包(可直接复用应用现有 request 封装的 get/post/put);
  • canAccess:菜单权限判定,缺省视为全部允许。
import { AdminUiProvider } from '@xinpaiyun/nova-admin-ui'
import { request } from './api/request'
import { useAuthStore } from './stores/authStore'

<AdminUiProvider
  api={request}
  canAccess={(permission) => useAuthStore.getState().canAccess(permission)}
>
  <AppRoutes />
</AdminUiProvider>

3. 在路由中直接挂载页面

import { PlatformTenantsPage } from '@xinpaiyun/nova-admin-ui'

<Route path="/platform/tenants" element={<PlatformTenantsPage />} />

约定

  • 端点固定为平台侧路径(如 /tenant/user/list/audit-logs),lib 页面本身就是平台运营页,不做租户 scope 切换;
  • 权限 + 能力开关由 useCapabilityAccess(permission, capabilityCode) 统一校验;
  • React Query queryKey 统一使用 ['nova-admin-ui', ...] 前缀,避免与宿主缓存冲突;
  • 构建为源码发布(exports 直接指向 src/*.ts),由宿主应用的 Vite 负责编译,样式/主题跟随宿主 antd 配置。