53 Commits
Author SHA1 Message Date
Ben Ngai e0889d798f fix release authentication checks (#14)
Fail releases when npm authentication is unavailable and verify the published version.
2026-08-03 14:47:09 +08:00
benngaihkandClaude Fable 5 ffd9323ce0 docs: v0.2.0 发布文档 — 新增 CHANGELOG,补充 AI 助手演示模式/接管视觉,同步实测体积
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
v0.2.0
2026-07-15 16:44:06 +08:00
benngaihkandClaude Fable 5 739d053a9f feat(ai): 新增 aiSettings 功能开关,demo 站隐藏 AI 设置入口
公开站点上访客不会填自己的 API Key——features.aiSettings=false 时
隐藏面板齿轮、设置弹窗与演示文案里的「设定 AI」按钮,只保留面向
开发者的工程 .env 配置指引。库默认仍开启(内部工具场景可用)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 15:56:52 +08:00
benngaihkandClaude Fable 5 54fd81acde fix(ai): AI 接管时的滚动与光标跟随重做
旧实现三个问题:scrollIntoView 连页面 body 一起滚、每步强制居中导致
画面跳动、光标坐标只在事务时计算一次(滚动时飘在旧位置)。

现在:只滚编辑器自己的滚动容器且仅当修改点离开舒适区(上15%/下25%)
时才滚到 60% 处;光标/高亮锚定文档位置、每帧重算屏幕坐标(滚动中钉
在内容上),事务时同步刷新遮罩原点+光标+滚动(不依赖 rAF,后台标签
页安全);光标过渡缩短到 0.22s 减小跟随滞后。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 15:28:25 +08:00
benngaihkandClaude Fable 5 7537c93374 fix(ai): 接管遮罩裁剪到文档可视区,不再盖住页面头部
Word 模式下 ProseMirror 元素比视口高,直接用其边界会让遮罩和
「AI 正在编辑」徽标画到页面 header 上;改为取 编辑区 ∩ 滚动容器
可视区 ∩ 视口 的交集。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 14:51:26 +08:00
benngaihkandClaude Fable 5 c29d79314b feat(ai): 演示动画拉长到 6 秒以上并加重接管视觉
演示脚本每类指令拆成 2-3 步编辑(标题→内容→说明),光标多次飞行、
高亮多次闪烁;节奏 900ms 读取 + 1300ms/步 + 1200ms 收尾 ≈ 6.3s。
高亮透明度 18%→28% 加描边、持续 1.8s;光标加宽发光、旗标放大。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 14:27:49 +08:00
benngaihkandClaude Fable 5 ac59d1c88a feat(ai): AI 编辑接管遮罩与跟随光标
AI agent 运行期间:编辑区盖呼吸描边遮罩(拦截用户输入避免并发冲突)
+「AI 正在编辑文档…」徽标;带 ⚡AI 旗标的大光标跟随每次修改位置平滑
移动,自动滚动跟随并闪烁高亮变更区域。演示模式节奏同步放缓便于观察。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 14:17:48 +08:00
benngaihkandClaude Fable 5 9d22dd9edd feat(ai): AI 助手未配置时进入演示模式
未配置真实 AI 时不再只报「未设定」:本地模拟 agent 按指令关键词
(表格/列表/标题/摘要/加粗)真实编辑文档并回放步骤,结尾说明
接入方式(工程 .env 配置 VITE_AI_* 或自填 API Key)。
与续写/润色等功能的 simulateAiStream 演示惯例保持一致。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 14:04:37 +08:00
benngaihkandClaude Fable 5 1a757fe5e5 chore: retrigger vercel deploy for becbf57
Vercel 未对 becbf57 触发自动部署(部署记录停留在 c915f0d),空提交重新触发。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 13:52:45 +08:00
benngaihkandClaude Fable 5 becbf57c9a fix(demo): 落地页功能徽章浮到预览窗口之上
浮动标签容器缺 z-index(auto),被 z-index:1 的预览窗口遮住只露半截;
提升到 z-index:2,徽章按设计意图探出窗口边缘悬浮展示。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 11:26:43 +08:00
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
benngaihk 7c6f5be3eb Remove private notes and promotional draft v0.1.1 2026-07-06 18:10:18 +08:00
benngaihk fac59824ef Fix release publish without npm token 2026-07-06 18:06:24 +08:00
benngaihk e552df0a96 Fix release changelog generation 2026-07-06 18:02:49 +08:00
benngaihk ac403ca4ae docs: refine Dev.to article copy 2026-07-06 18:02:32 +08:00
benngaihk 1e6d1ad9ea Merge branch 'claude/improve-ai-discoverability-x6ePM' 2026-07-06 18:00:39 +08:00
benngaihk ff0b034c8d Fix CI workflow action versions 2026-07-06 17:59:16 +08:00
benngaihk 89e2c844a1 Fix package distribution entrypoints 2026-07-06 17:56:49 +08:00
benngaihk a91e35eaf2 Merge pull request #10 from benngaihk/claude/fix-issue-9-Sceh0 2026-02-22 02:28:58 +08:00
Claude 3930bead02 feat: add slash command menu and drag handle support (#9)
Implement Notion-style slash command (/) menu for block type selection.
When typing "/" at the start of a line, a filterable dropdown menu appears
with options to insert headings, lists, quotes, code blocks, tables,
images, and dividers. Supports keyboard navigation (arrow keys, enter,
escape) and real-time text filtering.

- Add SlashCommandExtension (ProseMirror plugin for "/" detection)
- Add SlashCommandMenu Vue component with grouped, filterable items
- Add slash-command.css with light/dark mode and responsive styles
- Add slashCommand feature flag to FeatureConfig
- Add i18n translations (zh-CN, zh-TW, en-US) for all menu items
- Wire up extension and component in TiptapProEditor

Usage: `<TiptapProEditor :features="{ slashCommand: true, dragHandleMenu: true }" />`

https://claude.ai/code/session_017Y3iMHQTK3yU2z5LnpFJ8c
2026-02-21 17:27:57 +00:00
Claude d26c7d3f2b docs: add Dev.to promotional article for AI discoverability
https://claude.ai/code/session_019MzbBVKakXma9GDhz9bBMx
2026-02-13 14:23:30 +00:00
benngaihk ea9a5d190a Merge pull request #8 from benngaihk/claude/improve-ai-discoverability-x6ePM v0.1.0 2026-02-13 21:26:47 +08:00
Claude a0acdc1504 feat: improve AI and search engine discoverability
- Optimize README with comparison table, use cases, and keyword-rich
  positioning to help AI models recommend this project when users ask
  about Tiptap Vue templates
- Add comprehensive SEO meta tags (Open Graph, Twitter Cards, description)
  to index.html for better social sharing and search indexing
- Expand package.json keywords from 17 to 33 covering more search terms
  (tiptap-template, vue-editor, ai-editor, notion-editor, etc.)
- Add public/llms.txt for AI crawler discoverability (emerging standard
  similar to robots.txt but for LLM crawlers)

https://claude.ai/code/session_019MzbBVKakXma9GDhz9bBMx
2026-02-13 11:49:03 +00:00
benngaihk f90ec2d997 Merge pull request #7 from benngaihk/claude/inline-interface-plugins-Knk9D 2026-02-12 09:07:55 +08:00
Claude 14e2ab5a22 feat(demo): add inline editor interface with hot-swappable plugin system
Add a new demo mode showcasing two key features:

1. Inline Editor Interface - A compact, borderless editor without
   Word-mode A4 layout, suitable for comments, chat, and inline editing
   scenarios. Features a minimal toolbar, clean card-based design, and
   proper dark mode support.

2. Pluggable Feature System - An interactive panel demonstrating runtime
   plugin hot-swapping. Users can toggle individual toolbar features
   (undo/redo, heading, text format, font size, lists, alignment, links,
   code blocks, format clear) on/off with smooth animations. Includes
   4 presets (Minimal, Writer, Standard, Full) and All On/Off controls.

The demo header now includes a mode switcher ("Full Editor" / "Inline +
Plugins") allowing users to toggle between the existing full editor and
the new inline demo.

https://claude.ai/code/session_01QKwrYxqcHKFYY8wdkcrCk9
2026-02-12 01:05:25 +00:00
benngaihk fcdf538e00 Merge remote-tracking branch 'origin/claude/mobile-view-detection-0Uc1W' 2026-02-12 00:15:02 +08:00
Claude 936b068433 refactor(demo): replace toggle-off patterns with select-then-format and add AI showcase
- Replace all "click format → type → click format again" patterns with
  "type text → select word → apply format" approach for bold, italic,
  underline, strikethrough, superscript, and subscript demos
- Add proper ProseMirror text position finding (findLastTextPos) and
  context-aware subtext selection (selectSubtext) for precise formatting
- Add new AI-Powered Writing demo section (section 8) with:
  - Cursor movement to AI toolbar button
  - Simulated AI streaming output with variable-speed typing
  - AI feature list with batch select-and-bold formatting
- Add simulateAiStream() helper with natural variable delays
- Add AI button selector (.ai-toolbar-trigger) to findToolbarButton
- Update table row 2 to showcase "AI Writing" instead of "Tables"

https://claude.ai/code/session_01M8EpGm7UcKnKF2AwH1yvej
2026-02-11 16:11:57 +00:00
benngaihk b6271aa09e Merge remote-tracking branch 'origin/claude/review-project-feedback-gib6O' 2026-02-11 23:59:32 +08:00
benngaihk 913dd92547 Merge remote-tracking branch 'origin/claude/mobile-view-detection-0Uc1W' 2026-02-11 23:59:25 +08:00
Claude 42d2f09b8c feat: 重写演示脚本,全面展示编辑器特色功能
演示现在覆盖 9 个核心功能模块:
1. 标题 (H1/H2) + 居中对齐 (Heading Dropdown + Align)
2. 富文本格式 (Bold, Italic, Underline, Strikethrough)
3. 有序列表 + 选中加粗 (Ordered List + Select & Bold)
4. 上标/下标 (E=mc² / H₂O)
5. 数据表格 (3x3 Table with header + cell navigation)
6. 代码块 (TypeScript syntax highlighting)
7. 引用块 (Blockquote)
8. 无序列表 (Bullet List - 技术栈/主题/i18n/AI)
9. 分隔线 + 加粗结语 (HR + Bold conclusion)

增强 findToolbarButton 支持:
- 下拉按钮 (.tt-dropdown-btn) 和直接按钮 (.tt-toolbar-button)
- Align 动态图标查找 (align-left/center/right/menu)
- Table/Math/Superscript/Subscript 等更多图标映射

https://claude.ai/code/session_01M8EpGm7UcKnKF2AwH1yvej
2026-02-11 15:57:22 +00:00
Claude 9de81f3477 feat: 新增自定义插入模板和图库功能
模板插入功能:
- 内置 5 种常用模板:会议纪要、周报、日报、项目方案、需求文档
- 支持通过 customTemplates prop 传入自定义模板
- 模板以卡片网格形式展示,点击即插入

图库功能:
- 自动扫描当前文档中已插入的图片(去重)
- 支持多选后批量插入
- 支持通过 images prop 传入外部图片源
- 空状态友好提示

两个功能均已注册到 EditorToolbar 和 ToolbarNav,
配置项已加入 toolbarConfig,三语翻译已完成。

https://claude.ai/code/session_01Hr9pgvogG36bJNv3oVbpHW
2026-02-11 15:53:40 +00:00
benngaihk 78e77d8cdf Merge remote-tracking branch 'origin/claude/review-project-feedback-gib6O' 2026-02-11 23:41:35 +08:00
benngaihk 63bb5fc9a8 Merge remote-tracking branch 'origin/claude/mobile-view-detection-0Uc1W' 2026-02-11 23:41:29 +08:00
Claude b4eb534417 fix: 修复上传下拉菜单不消失问题,新增批量图片上传和视频上传支持
- 修复点击上传选项后下拉菜单不消失的 bug(ToolbarDropdownButton 显式关闭 dropdown)
- 图片上传支持批量选择多个文件(添加 multiple 属性)
- 新增视频上传功能:Video 节点扩展 + 视频上传入口
- 新增中/英/繁体三语视频相关翻译

https://claude.ai/code/session_01Hr9pgvogG36bJNv3oVbpHW
2026-02-11 15:40:04 +00:00
Claude 4c44b1a20a feat: 增强自动演示,结合 page-agent 动画光标 + Maestro 声明式动作
参考 alibaba/page-agent 实现:
- 添加平滑动画光标 (ease-in-out cubic + requestAnimationFrame)
- 距离自适应动画时长 (200ms ~ 800ms)
- 紫色渐变点击涟漪效果
- 工具栏按钮悬停/按下视觉反馈

参考 Maestro 实现声明式动作 API:
- tapOn(buttonId) - 移动光标到按钮并点击
- moveToEditor() - 光标跟随编辑器光标
- typeText() - 逐字输入,光标自动跟随
- selectText() - 选中文本并移动光标
- findToolbarButton() - 按 data-level/anticon class/选择器查找按钮

演示流程现在展示真实用户操作:
光标移动到 H1 按钮 → 点击 → 移到编辑区打字 → 移到列表按钮 → 点击...

https://claude.ai/code/session_01M8EpGm7UcKnKF2AwH1yvej
2026-02-11 15:36:45 +00:00
benngaihk 24816d3f28 Merge pull request #6 from benngaihk/claude/mobile-view-detection-0Uc1W 2026-02-11 22:25:09 +08:00
Claude b0a473ac96 feat: 手机浏览器下去掉设备外框,直接全屏展示编辑器
手机上浏览时不再显示 iPhone 外壳,改为像 PC 模式一样
直接渲染内容,同时取消 430px 宽度限制,全屏展示。

https://claude.ai/code/session_01M8EpGm7UcKnKF2AwH1yvej
2026-02-11 13:37:03 +00:00
Claude b7141e90fd feat: 手机浏览器自动隐藏 PC/Pad 设备切换选项
检测到手机浏览器时,DeviceSwitcher 只保留 Mobile 选项,
不再展示 Desktop 和 Tablet 预览模式。同时在 App.vue 中
自动将初始设备视图设为 mobile。

https://claude.ai/code/session_01M8EpGm7UcKnKF2AwH1yvej
2026-02-11 13:14:12 +00:00
benngaihk bbb4d1f8b8 Merge pull request #5 from benngaihk/claude/review-issues-optimize-ei0EL 2026-02-11 21:05:25 +08:00
Claude ff0fbb7b3e feat: enhance editor preview with cooler effects and mobile support
- Animated conic-gradient glow backdrop that rotates behind the window
- Smooth entrance animation (slide up + scale + fade)
- Toolbar buttons glow/highlight as formatting is applied
- AI button pulses with glow effect during AI demo step
- Code syntax highlighting (purple keywords, green strings)
- AI-generated content with gradient badge and card style
- TransitionGroup slide-in animation for each new line
- Gradient cursor with glow shadow
- Floating labels with backdrop-filter blur, pop-in animation
- Added 4th label (Word Export) with document icon
- Mobile: horizontal label strip below editor (replaces hidden floats)
- Small phone: scaled-down toolbar, content area, and font sizes
- Tokyo Night color scheme for dark mode
- Hover lift effect with enhanced shadow

https://claude.ai/code/session_01WFT6qpPsSBX1BM3BGnfA2w
2026-02-11 12:26:21 +00:00
Claude 13d9bd013c feat: add animated editor preview to landing page
Inspired by Maestro's impressive product showcase approach, adds a live
auto-typing editor preview directly in the landing page hero section.
The preview shows a realistic editor window with toolbar, typewriter
effect, and floating feature labels, so visitors immediately see the
editor in action without clicking "Try Demo" first.

https://claude.ai/code/session_01WFT6qpPsSBX1BM3BGnfA2w
2026-02-11 12:04:24 +00:00
Claude 1bacaed5a2 feat: add automated editor demo for product showcase
Create an EditorAutoDemo component that simulates a real workflow
(writing a daily work report) by programmatically typing text and
applying formatting in the editor. The demo showcases:

- Auto-typing with configurable speed
- Headings (H1, H2), paragraphs, bold text
- Ordered lists, bullet lists
- Blockquote for issues/blockers
- Code block with syntax highlighting
- Horizontal rule divider
- Play/Stop/Replay controls

Integrated into the demo app header bar for easy access.

https://claude.ai/code/session_01WFT6qpPsSBX1BM3BGnfA2w
2026-02-11 11:56:10 +00:00
benngaihk c26781e2cb Add sponsor page with WeChat and Alipay QR codes 2026-02-10 00:23:13 +08:00
benngaihk 608cfb50e0 Add sponsor page with payment QR codes
Add a new sponsor.html donation page with a bilingual (zh/en) UI for supporting the author. The page includes styled components, language toggle, WeChat and Alipay payment buttons that open a QR modal, copy-to-clipboard feedback (toast), keyboard accessibility (Esc to close), and a GitHub social link. Also add two image assets (IMG_8528.JPG, IMG_8529.JPG) used as the QR code images.
2026-02-10 00:10:37 +08:00
benngaihk 174c939d0e Update README.md 2026-02-09 23:40:24 +08:00
benngaihk c6763d7be1 Remove legacy docs/scripts and update UI components
Cleanup: delete legacy documentation, release/promotion scripts and packaged archive to streamline the repository. Removed files include CHANGELOG.md, OPENSOURCE_STRATEGY.md, PROJECT_IMPROVEMENTS.md, SCREENSHOTS.md, TESTING.md, scripts/build-release.sh, scripts/moltbook-bot.cjs, scripts/moltbook-monitor.cjs, scripts/moltbook-smart-bot.cjs, and tiptap-ui-kit-v0.1.0.zip. Also apply updates to two Vue components: src/features/advanced/code-block/CodeBlockDropdown.vue and src/features/basic/text-format/TextFormatButtons.vue (minor UI/behavior tweaks).
2026-02-09 23:35:35 +08:00
benngaihk a82744c29a Merge pull request #4 from benngaihk/claude/review-issues-optimize-ei0EL 2026-02-09 23:18:26 +08:00
Claude bbaa297c3e feat: add Word document import and export support (#1)
Add the ability to import .docx files into the editor and export
editor content as .docx files. Uses mammoth for import (docx→HTML)
and docx library for export (HTML→docx).

New features:
- Word import: drag-and-drop .docx file upload with mammoth conversion
- Word export: export editor content as .docx with headings, lists,
  tables, code blocks, links, and text formatting preserved
- Toolbar button with dropdown menu for import/export actions
- Full i18n support (zh-CN, zh-TW, en-US)
- Integrated into both EditorToolbar and ToolbarNav toolbar systems

New files:
- src/features/advanced/word/wordImport.ts
- src/features/advanced/word/wordExport.ts
- src/features/advanced/word/WordButton.vue
- src/features/advanced/word/index.ts

Closes #1

https://claude.ai/code/session_01WFT6qpPsSBX1BM3BGnfA2w
2026-02-09 14:25:23 +00:00
benngaihk b94e1018d8 Merge pull request #3 from benngaihk/claude/review-issues-optimize-ei0EL 2026-02-09 22:14:44 +08:00
Claude 6aa629c70a fix: auto-switch to code block when selecting multiple lines (#2)
When selecting multiple lines of plain text and clicking the inline code
button, the editor now detects the multi-block selection and creates a
code block instead of applying inline code marks to each line separately.

- Single line selection: toggles inline code (existing behavior)
- Multi-line selection: creates a code block with plaintext language
- In code block: clicking again exits back to paragraph
- Button active state now reflects both inline code and code block

Fixes #2

https://claude.ai/code/session_01WFT6qpPsSBX1BM3BGnfA2w
2026-02-09 14:07:57 +00:00