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

@tipkit/editor

v0.3.5

Published

TipKit 聚合入口:core + extensions + ui 组装,对外暴露 <TipKitEditor> / useTipKitEditor

Readme

@tipkit/editor

TipKit 聚合入口:一个 <TipKitEditor> 组件,组合依赖注入、编辑器实例与内容区。消费方无需感知内部包。

安装

pnpm add @tipkit/editor @tipkit/extensions @tipkit/themes

快速使用

"use client";

import { TipKitEditor } from "@tipkit/editor";
import type { EditorDeps } from "@tipkit/editor";
import { createBasicExtensions, createAdvancedExtensions } from "@tipkit/extensions";
import "@tipkit/themes/default.css";

const deps: EditorDeps = {
  uploadImage: async (file) => (await uploadToServer(file)).url,
};

export default function App() {
  return (
    <TipKitEditor
      deps={deps}
      placeholder="输入 / 打开斜杠菜单…"
      extensions={[...createBasicExtensions(), ...createAdvancedExtensions()]}
      onChange={(editor) => save(editor.getHTML())}
    />
  );
}

Props

| Prop | 类型 | 必填 | 说明 | | --- | --- | --- | --- | | deps | EditorDeps | 是 | 项目特定能力注入(上传 / KaTeX 等) | | extensions | Extension[] | 否 | 追加扩展;默认使用基础扩展集合 | | content | string \| Record<string, unknown> | 否 | 初始内容(HTML 或 JSON) | | placeholder | string | 否 | 空状态占位文案 | | onChange | (editor) => void | 否 | 内容更新回调 | | onCreate | (editor) => void | 否 | 编辑器就绪回调 | | immediatelyRender | boolean | 否 | SSR 传 false(默认 false) | | className | string | 否 | 容器类名 | | children | ReactNode \| (editor) => ReactNode | 否 | 渲染插槽,挂载浮层 / 工具栏 |

其他导出

  • buildToolbarGroups(editor):由编辑器计算基础工具栏分组数据
  • useTipKitEditor / EditorProvider / useEditorDeps:透传自 @tipkit/core
  • 类型:EditorDeps、ToolbarAction、ToolbarGroup、OutlineItem 等

完整示例

参考 apps/demo —— 含斜杠菜单、文字工具条、链接气泡、块手柄、表格控件等全部浮层。