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

@yanivjs/gamma-mini-editor

v0.0.3

Published

Public Vue 3 + Tiptap document/card editor core for SPA embedding

Readme

Gamma Mini Editor

@yanivjs/gamma-mini-editor 是公开发布到 npm 的 Vue 3 + Tiptap 文档/卡片编辑器核心包。仓库保留了从同级 gamma-project 同步编辑器核心源码的维护脚本,但当前项目本身是独立 Vite/Vue 库工程,最终产物是可被普通 Vue SPA 引用的 npm 包。

环境要求

  • Node.js 版本需满足当前 Vite / TypeScript 工具链要求。
  • 包管理器使用 [email protected](见 packageManager)。
  • 仓库开发安装按 .npmrc 分 registry:默认公共包走官方 npm,@tiptap scope 走 Verdaccio,用于解析源码依赖中的 @tiptap/*-isheji* 版本。
  • 需要从源项目同步编辑器源码时,默认要求同级存在 ../gamma-project,也可以通过 GAMMA_PROJECT_DIR 指定路径。
  • 当前源码不依赖提交到仓库的 .env;本地私有环境变量请使用未跟踪的 .env.local

仓库开发

本仓库按普通 Yarn 项目维护:

yarn install
yarn dev
yarn build

.npmrc 只能按 scope 分流,不能按版本号分流;因为私有 fork 和公开 Tiptap 包都在 @tiptap scope 下,所以 @tiptap 统一走 Verdaccio,并要求 Verdaccio 能代理公开 Tiptap 包。

需要从 gamma-project 刷新编辑器核心源码时再执行:

yarn sync:src

该同步只拷贝编辑器核心,并保留本仓面向 npm 发布的最小类型、样式和 stub 边界。

本地 yarn dev 使用 src/App.vue 作为测试壳,测试数据来自 src/mockData.js

  • mockCardData:编辑器文档 JSON。
  • mockThemeData:主题 JSON,传入 setThemeStyle

本地 mock 只保留编辑器实际消费的数据,不保留接口响应包络。

同步范围

会同步

| 内容 | 说明 | | ---- | ---- | | src/components/tiptap | Tiptap 节点、插件和编辑器核心 UI | | src/components/editor/EditorContent.vue | 对外渲染入口组件 | | src/components/SvgIcon、色板组件 | 编辑器依赖的基础 UI | | src/stores/docEditor.ts | 文档编辑状态 | | src/utils/cardTemplates.tschangeTheme.ts、颜色/图片工具 | 卡片渲染和主题能力 | | src/assets/image/editorsrc/assets/image/side_tool、编辑器样式 | 编辑器素材与样式 |

不会同步

  • 登录、支付、用户、请求层、接口封装等 gamma-project 业务。
  • AI 配图、邀请、通知、深度研究等产品功能。
  • gamma-project 专用 store、hooks、业务类型和图片素材。

本仓保留的边界文件

  • src/stores/mediaDrawer.ts:媒体抽屉 stub。编辑器节点可编译运行,但不接入 AI 配图面板。
  • src/hooks/index.ts:空导出,明确不暴露宿主业务 hooks。
  • src/types/theme.tsThemeDetail / ThemeStyleConfig 的唯一来源。
  • src/gamma-mini-editor.public.d.ts:对外 API 声明模板,构建时会合并主题类型生成 dist/gamma-mini-editor.es.d.ts

不会保留组件旁路声明文件,例如 src/components/editor/EditorContent.d.ts。对外类型统一从 src/gamma-mini-editor.public.d.ts 生成。

对外入口

包入口为 src/lib.ts,当前导出:

  • EditorContentComponent
  • injectCardStyleVariables
  • updateCardDimensions
  • cardDimensions
  • getAspectRatio
  • CardSizeManager
  • setThemeStyle
  • createEditorPinia
  • VERSION
  • ThemeDetailThemeStyleConfig

使用者需要引入样式:

import '@yanivjs/gamma-mini-editor/style.css'

宿主应用需要安装并注册 Pinia。可直接使用本包导出的 createEditorPinia() 创建实例。

npm 发布

从仓库根目录发布,不要 cd dist

yarn build
npm publish --dry-run --registry https://registry.npmjs.org
npm publish --registry https://registry.npmjs.org --access public

完整步骤见 PUBLISH.md