Files
Tiptap-UI-Kit/package.json
T
benngaihkandClaude Fable 5 c915f0d506 feat!: v0.2 overhaul — reactive toolbar, AI document agent, 94% smaller bundle
编辑器交互(丝滑)
- 工具栏状态跟随光标:useReactiveEditor 组合式函数(shallowRef + triggerRef,
  绕过 Vue computed 值相等截断),16 个工具栏组件接入
- 输入防抖:分页计算 rAF 合帧 + 200ms 防抖,@update 事件防抖派发,
  卸载/重建前 flush 不丢最后输入;共享 debounce 工具(src/utils/debounce.ts)
- v-model 支持(HTML/JSON 双模式):监听器检测(ref<string>() 初值安全)、
  回环短路缓存、协作模式守卫
- 修复:标题下拉失焦、字数统计光标移动重算、LinkBubbleMenu 深度遍历、
  事件监听器泄漏、页数按内容/字体/容器尺寸自动重算

暗色模式与样式
- 修复 9 个组件暗色选择器(.dark 类 → data-theme 属性,44 处);
  setTheme 同步挂 .dark 类兜底
- 补齐 ::selection/caret-color、:focus-visible、prefers-reduced-motion、
  color-scheme、暗色滚动条、下拉/浮层过渡动画
- 落地页 blur 滤镜动画改为 transform-only(原会卡死合成器)

包体积(gzip 1.4MB → ~88KB,-94%)
- 修复 Vite 6 lib+ES 跳过 terser(自定义 libTerser 插件)
- KaTeX/mammoth/docx/file-saver 改为 external + 动态导入
- version 档位(minimal/basic/advanced/premium)真正裁剪扩展;
  组件默认 premium 保持 0.1.x 行为兼容
- 依赖重分类:antd 系转 peer、协作库转可选 peer;删除死依赖与
  278 个误提交的 .d.ts 构建产物;demo 构建目录分离

AI 文档助手(用文字描述编写和修改文档)
- documentTools:7 个结构化编辑工具(块索引 + 文本查找寻址、
  结构边界哨兵防跨单元格假匹配、多匹配消歧、replaceAll 单事务)
- runDocumentAgent:OpenAI function-calling 循环,6 家 provider 通用,
  超时兜底、abort、编辑器销毁保护、历史概要去重
- AiChatPanel:右下角聊天面板,步骤实时展示、IME 安全回车、
  features.aiChat 可关;工具集与循环公开导出供自定义集成
- 修复 anthropic/ollama 默认端点(原 anthropic key 会被发往 openai.com)

DX 与文档
- README 重写对齐真实 API;AGENTS.md 更新;locale 浏览器语言自动检测;
  字体列表跨平台化;5 套主题 CSS 随包发布;demo 刷新保持状态;
  API key 安全警示;测试 2 → 57 个

BREAKING CHANGE: ant-design-vue/@ant-design/icons-vue 转为 peer 依赖;
协作功能需自装 yjs/y-websocket/@tiptap/extension-collaboration*;
数学公式需自行 import 'katex/dist/katex.min.css';@update 事件防抖 200ms;
version="basic"/"minimal" 现在真正裁剪扩展(表格/公式/AI 不加载)。
迁移指南见 README「Migrating to 0.2」。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 00:05:07 +08:00

178 lines
4.7 KiB
JSON

{
"name": "tiptap-ui-kit",
"version": "0.2.0",
"description": "Beautiful Tiptap 3 + Vue 3 rich-text editor theme with AI support",
"type": "module",
"packageManager": "pnpm@9.15.9",
"main": "dist/index.esm.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.esm.js",
"default": "./dist/index.esm.js"
},
"./style.css": "./dist/style.css",
"./package.json": "./package.json"
},
"files": [
"dist"
],
"sideEffects": [
"*.css",
"**/*.css"
],
"scripts": {
"dev": "vite",
"build": "vite build",
"build:demo": "vite build --config vite.config.demo.ts",
"preview": "vite preview",
"typecheck": "vue-tsc --noEmit",
"test": "vitest",
"test:ui": "vitest --ui",
"test:run": "vitest run",
"test:coverage": "vitest run --coverage",
"prepare": "npm run build",
"prepublishOnly": "pnpm build",
"pack:check": "pnpm build && npm pack --dry-run",
"release": "pnpm build && pnpm publish --access public"
},
"peerDependencies": {
"@ant-design/icons-vue": "^7.0.1",
"@tiptap/core": "^3.0.0",
"@tiptap/extension-collaboration": "^3.0.0",
"@tiptap/extension-collaboration-cursor": "^2.26.2",
"@tiptap/pm": "^3.0.0",
"@tiptap/starter-kit": "^3.0.0",
"@tiptap/vue-3": "^3.0.0",
"ant-design-vue": "^4.0.0",
"vue": "^3.4.0",
"y-websocket": "^3.0.0",
"yjs": "^13.6.0"
},
"peerDependenciesMeta": {
"@tiptap/extension-collaboration": {
"optional": true
},
"@tiptap/extension-collaboration-cursor": {
"optional": true
},
"y-websocket": {
"optional": true
},
"yjs": {
"optional": true
}
},
"devDependencies": {
"@ant-design/icons-vue": "^7.0.1",
"@tiptap/core": "^3.7.2",
"@tiptap/extension-bubble-menu": "^3.7.2",
"@tiptap/extension-code-block-lowlight": "^3.7.1",
"@tiptap/extension-collaboration": "^3.13.0",
"@tiptap/extension-collaboration-cursor": "^2.26.2",
"@tiptap/extension-typography": "^3.7.2",
"@tiptap/extensions": "^3.11.1",
"@tiptap/pm": "^3.7.2",
"@tiptap/starter-kit": "^3.7.2",
"@tiptap/vue-3": "^3.7.2",
"@types/file-saver": "^2.0.7",
"@types/katex": "^0.16.8",
"@types/node": "^25.0.2",
"@vitejs/plugin-vue": "^5.2.1",
"@vitest/ui": "^4.0.18",
"@vue/test-utils": "^2.4.6",
"ant-design-vue": "^4.2.6",
"happy-dom": "^20.4.0",
"lowlight": "^3.3.0",
"sass-embedded": "^1.96.0",
"terser": "^5.44.1",
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vite-plugin-dts": "^4.3.0",
"vitest": "^4.0.18",
"vue": "^3.5.13",
"vue-tsc": "^2.1.10",
"vue-types": "^3.0.2",
"y-websocket": "^3.0.0",
"yjs": "^13.6.27"
},
"keywords": [
"tiptap",
"tiptap3",
"tiptap-editor",
"tiptap-vue",
"tiptap-template",
"tiptap-theme",
"vue3",
"vue",
"vue-component",
"vue-editor",
"rich-text-editor",
"wysiwyg",
"wysiwyg-editor",
"editor",
"theme",
"ui-kit",
"ai",
"ai-editor",
"ai-writing",
"collaboration",
"real-time-collaboration",
"markdown",
"prosemirror",
"contenteditable",
"text-editor",
"word-processor",
"notion",
"notion-editor",
"document-editor",
"typescript",
"dark-mode",
"i18n",
"cms"
],
"author": "benngaihk",
"license": "MIT",
"homepage": "https://github.com/benngaihk/Tiptap-UI-Kit#readme",
"bugs": {
"url": "https://github.com/benngaihk/Tiptap-UI-Kit/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/benngaihk/Tiptap-UI-Kit.git"
},
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=18.0.0",
"pnpm": ">=8.0.0"
},
"dependencies": {
"@tiptap/extension-character-count": "^3.0.0",
"@tiptap/extension-color": "^3.0.0",
"@tiptap/extension-font-family": "^3.7.2",
"@tiptap/extension-highlight": "^3.0.0",
"@tiptap/extension-image": "^3.0.0",
"@tiptap/extension-link": "^3.0.0",
"@tiptap/extension-placeholder": "^3.0.0",
"@tiptap/extension-subscript": "^3.7.2",
"@tiptap/extension-superscript": "^3.7.2",
"@tiptap/extension-table": "^3.0.0",
"@tiptap/extension-table-cell": "^3.13.0",
"@tiptap/extension-table-header": "^3.13.0",
"@tiptap/extension-table-row": "^3.13.0",
"@tiptap/extension-task-item": "^3.7.1",
"@tiptap/extension-task-list": "^3.7.1",
"@tiptap/extension-text-align": "^3.0.0",
"@tiptap/extension-text-style": "^3.0.0",
"@tiptap/extension-underline": "^3.0.0",
"docx": "^9.5.1",
"file-saver": "^2.0.5",
"katex": "^0.16.28",
"mammoth": "^1.11.0"
}
}