Files
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

37 lines
883 B
JSON

{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "preserve",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true,
/* Paths */
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
"vue-types": ["node_modules/vue-types"]
},
/* Types */
"types": ["vite/client", "node"]
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
"exclude": ["node_modules", "dist", "src/tools/collaboration"]
}