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

@coralai/console-ui

v0.1.0

Published

sps console 的界面套件契约 —— 插件的浏览器半区经宿主注入的 require 拿到它,写出和内建同一水准的界面。

Downloads

130

Readme

@coralai/console-ui

sps console 的界面套件契约。插件的浏览器半区装它拿类型; 运行时由宿主经注入的 require('@coralai/console-ui') 交给它宿主自己的那一份实例

window.__SpsModuleLoader__.load({
  id: 'my-plugin',
  contractVersion: 1,
  factory: (require) => {
    const { useDialog, AnimatedSelect, apiGet } = require('@coralai/console-ui')
    const slots = require('@coralai/console-slots')
    slots.registerSlot('plugin.config', {
      match: ({ pluginKey }) => pluginKey === 'my-plugin',
      render: () => /* … */ null,
    })
  },
})

🔴 这个包不做 i18n

插件用的是自己的语言表 —— 把 console 的 message key 变成契约,插件永远也拿不到那些 key。 需要文案的组件(DialogProvider)由调用方把默认文案传进来。

模块表里为什么是这几个

判据是共不共享实例,不是好不好用:

| | 为什么必须由宿主给 | |---|---| | react / react-dom | 两份 React ⇒ hooks 直接炸 | | @tanstack/react-query | 要读宿主 QueryClientProvider 的 context | | @coralai/console-ui | useDialog 要落到宿主那一个 DialogProvider 上 | | @coralai/console-slots | 注册面 | | lucide-react | ⚠️ 不共享也能用 —— 放进来纯粹省体积,是刻意的例外 |

纯计算/纯渲染的库(framer-motion、日期库…)自己打包进去就行。 表里每多一个名字,升它的大版本就是一次对所有 UI 插件的破坏性变更。