refactor: extract editor action modules
This commit is contained in:
@@ -406,11 +406,14 @@ UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据
|
||||
|
||||
| 文件 | 原大小 | 现大小 | 变化 |
|
||||
|------|--------|--------|------|
|
||||
| `lib.rs` | 9,873 行 | 8,671 行 | **-12%** |
|
||||
| `lib.rs` | 9,873 行 | 8,181 行 | **-17%** |
|
||||
| `editor_runtime/mindmap_node_view.rs` | — | 909 行 | 新建 |
|
||||
| `editor_runtime/bridge_events.rs` | — | 149 行 | 新建 |
|
||||
| `editor_runtime/slash_actions.rs` | — | 237 行 | 新建 |
|
||||
| `editor_runtime/table_commands.rs` | — | 180 行 | 新建 |
|
||||
| `editor_runtime/bridge_dispatch.rs` | — | 86 行 | 新建 |
|
||||
|
||||
### editor_runtime/ 最终模块清单(16 模块,另有 `mod.rs`)
|
||||
### editor_runtime/ 最终模块清单(19 模块,另有 `mod.rs`)
|
||||
|
||||
| 模块 | 说明 | 来源 |
|
||||
|------|------|------|
|
||||
@@ -420,6 +423,7 @@ UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据
|
||||
| `block_hover_state.rs` | HoveredBlockState 共享类型 | 5-29 |
|
||||
| `block_menu_document.rs` | legacy JSON helper | 5-29 |
|
||||
| `block_menu_overlay.rs` | block menu 几何 | 5-29 |
|
||||
| `bridge_dispatch.rs` | host command kind 解析 | **本批新建** |
|
||||
| `bridge_events.rs` | 事件常量 + payload 类型 | **本批新建** |
|
||||
| `command_sync.rs` | 命令同步 | 5-28 P2 |
|
||||
| `content_layout.rs` | 内容布局 | 5-29 |
|
||||
@@ -430,6 +434,8 @@ UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据
|
||||
| `mindmap_node_view.rs` | mindmap shell 完整实现 | **本批新建**(5-28 P5) |
|
||||
| `overlays.rs` | overlay 管理 | 5-29 |
|
||||
| `persistence.rs` | 持久化 | 5-28 P2 |
|
||||
| `slash_actions.rs` | slash 菜单 action 数据 | **本批新建** |
|
||||
| `table_commands.rs` | table toolbar / option 命令 | **本批新建** |
|
||||
|
||||
### 未完成(后续独立任务)
|
||||
|
||||
@@ -448,3 +454,8 @@ UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据
|
||||
- 拖拽重排两条路径与块菜单“拷贝副本”不再读取/写回整文 HTML,改为 `move_top_level_block_with_history` / `duplicate_top_level_block_with_history` + `sync_persisted_editor_command`。
|
||||
- 删除本轮变成无调用方的 `block_menu_legacy_html.rs` 与 `apply_html_update`,generated island JS/WASM 已重新生成。
|
||||
- 已验证:`cargo fmt --manifest-path rust/Cargo.toml --all --check`、`cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml`、`cargo build --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml --target wasm32-unknown-unknown --release`、`wasm-bindgen --target web --out-dir rust/spikes/leptos-tiptap-spike/generated/island --out-name mnote-leptos-tiptap-spike-island rust/spikes/leptos-tiptap-spike/target/wasm32-unknown-unknown/release/mnote_leptos_tiptap_spike.wasm`、`task489`、`task488`、`task479`、临时 Playwright 拷贝副本 undo/redo + 块拖拽重排回归。
|
||||
- 2026-05-25:Codex 继续完成低风险模块提取。
|
||||
- 新增 `slash_actions.rs`,迁出 `SlashActionKind` / `SlashAction` / `SLASH_ACTIONS`,`lib.rs` 继续持有 slash 命令执行与 Leptos view。
|
||||
- 新增 `table_commands.rs`,迁出 table toolbar / option action、命令执行和 checked 状态计算。
|
||||
- 新增 `bridge_dispatch.rs`,迁出 `HostCommandKind` 及 host command payload 解析;真实 command 执行 match 仍留在 `lib.rs`。
|
||||
- 已验证:`cargo fmt --manifest-path rust/Cargo.toml --all --check`、`cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml`、`cargo test --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml command -- --test-threads=1`、wasm release build、`wasm-bindgen`、task489、task488、task479、临时 slash 插入简单表格 + 表格行 aux 命令 Playwright 回归。
|
||||
|
||||
Reference in New Issue
Block a user