|
|
b1b1c88a74
|
chore(biome): 引入 Biome v2.5 monorepo 配置并格式化全量源码
新增根 biome.json(v2.5,v2 起原生支持 monorepo,子包自动向上查找):
- formatter: 2 空格缩进、单引号、行宽 100、LF、尾逗号、箭头函数括号
(匹配现有代码风格)
- linter: recommended preset + 项目化裁剪
- useTemplate/useTemplate off(geometry.ts 故意保留字符串拼接,
且测试用精确浮点断言锁定行为)
- noNonNullAssertion off(测试与 DOM 访问里的 ! 是惯用写法)
- noConsole off(4 个 lib 用 console.error/warn 做错误上报)
- CSS 关闭 noDescendingSpecificity/noDuplicateProperties
(手写 CSS 的 fallback 模式)
- useImportType/useNodejsImportProtocol/noUnusedVariables warn
- vcs.useIgnoreFile 自动读 .gitignore;排除 public/target/node_modules/
dist/.dioxus/static + Tailwind 入口 input.css(含 @theme 等 Biome 无法
解析的 at-rules)
首次格式化覆盖 29 个源文件:import 排序、node: 协议、引号/缩进统一,
并修复 index.ts 两处 forEach 回调隐式返回值(useIterableCallbackReturn)。
90 个 vitest 用例全绿,确认无语义改动。
|
2026-07-02 17:54:46 +08:00 |
|
|
|
8ff051689f
|
refactor(tiptap): export isValidUrl and UploadImageNodeView for testability
|
2026-06-24 10:04:59 +08:00 |
|
|
|
d099db4140
|
refactor(tiptap): move coordinator to editor.storage, drop dead Markdown html option
|
2026-06-23 18:39:38 +08:00 |
|
|
|
6b44a9c036
|
fix(tiptap): clean up pending upload on NodeView.destroy to prevent blob leak
|
2026-06-23 18:36:47 +08:00 |
|
|
|
71df6abe5d
|
refactor(tiptap): drop redundant single-arg mergeAttributes call
|
2026-06-23 18:35:05 +08:00 |
|
|
|
18ae6a915e
|
refactor(tiptap): type coordinatorRef via Pick<UploadCoordinator> instead of duck typing
|
2026-06-23 18:34:37 +08:00 |
|
|
|
cee4f3f3ef
|
fix(upload): address code review findings
final code review 后的修复:
1. blob 检查收紧(Important): md.contains("blob:") 误伤合法讨论 blob URL
的代码块/正文,改为检测 markdown 图片语法 ](blob: 才算占位符泄漏
2. 重试错误原地更新(Minor): seen_error_ids 去重逻辑导致重试后再失败时
顶部提示停留在旧错误文案;改为已存在 id 时原地更新 message
3. destroy 清理 coordinatorRef(Minor): destroy() 调 setUploadCoordinator(null),
避免 NodeView 指向已销毁的 coordinator(防御性)
4. 删除 NodeView 未用的 editor 字段(Nit): 死代码清理
验证: cargo test (384 passed) / clippy (本次零警告) / dx check / tiptap build 全过
|
2026-06-22 15:49:23 +08:00 |
|
|
|
5d527778a5
|
feat(editor): wire UploadCoordinator and custom Image in TiptapEditorInstance
- index.ts: 替换 Image.configure 为 UploadImage(自定义扩展+NodeView)
- index.ts: editor 创建后实例化 UploadCoordinator 并注入 NodeView
- index.ts: FileHandler onPaste/onDrop 改走 coordinator.insertUploading
- index.ts: 暴露 removeUploadByUploadId 供 Rust ×关闭调用
- index.ts: destroy 清理 coordinator
- upload-image.ts: 修正 import 来源(Image 来自 extension-image, mergeAttributes 来自 core)
|
2026-06-22 15:28:40 +08:00 |
|
|
|
57bea05aa3
|
feat(editor): add custom Image extension with upload-state NodeView
|
2026-06-22 15:25:25 +08:00 |
|