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

@bytesurging/editor

v0.1.5

Published

Quill-based rich text editor for teleprompter scripts

Readme

@bytesurging/editor

基于 ReactQuill + Quill 的提词器富文本编辑器组件,支持目录锚点、侧边栏 TOC、工具栏样式和内容回传。

功能

  • 富文本编辑:加粗、下划线、文字颜色、背景色
  • 目录锚点:选中文本一键“设为目录”/“取消目录”
  • 自动 TOC:自动识别 h1~h6 生成目录项
  • 左侧目录导航:点击目录滚动到内容锚点
  • 输出回调:onUpdate 返回 html、json(Delta)、text
  • 可编辑/只读、全屏模式、工具栏和目录开关

安装

pnpm add @bytesurging/editor
# 或
npm i @bytesurging/editor

依赖 React 18+

快速开始

import { TeleprompterEditor } from '@bytesurging/editor'

export default function Page() {
  return (
    <TeleprompterEditor
      placeholder="在此输入提词内容…"
      showToolbar
      showTocSidebar
      tocSidebarTitle="目录"
      onUpdate={({ html, json, text }) => {
        // 保存到后端
        console.log({ html, json, text })
      }}
    />
  )
}

初始化与保存

编辑器支持用 HTML 或 Quill Delta JSON 初始化:

<TeleprompterEditor content={savedJsonOrHtml} />

建议保存时优先存 json(可编辑性最好):

<TeleprompterEditor
  content={savedJson}
  onUpdate={({ json }) => {
    // save json
  }}
/>

API(TeleprompterEditor)

  • content?: string | DeltaLike | Record<string, unknown>
  • placeholder?: string
  • editable?: boolean
  • onUpdate?: (params: { html: string; json: DeltaLike; text: string }) => void
  • editorRef?: (editor: QuillLike | null) => void
  • showToolbar?: boolean
  • showTocSidebar?: boolean
  • tocSidebarTitle?: string
  • showAiCheck?: boolean
  • aiCheckLabel?: string
  • onAiCheck?: (text: string) => void
  • aiCheckDisabled?: boolean
  • fullScreen?: boolean
  • className?: string
  • contentScrollMaxHeight?: string | number

导出项

import {
  TeleprompterEditor,
  getTextFromEditor,
  EditorToolbar,
  TocProvider,
  TocSidebar,
} from '@bytesurging/editor'

本地开发

cd packages/editor
pnpm install
pnpm dev

本地预览入口在 packages/editor/dev,发布到 npm 时仅包含 dist/。

构建

pnpm build

产物:dist/(ESM + CJS + d.ts)