5 Commits

Author SHA1 Message Date
wangdl
234122fcdb test: add extract_pdf_text unit tests (DOC-FULL-023)
- pdf_with_text_stream helper: build minimal PDFs with BT/ET text
- single/multiple text blocks, no BT/ET→empty, empty PDF→empty
- MAX_SCAN_BYTES limit respected, empty text filtered
- page_count from pages dict, default to 1

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 13:32:34 +08:00
wangdl
dc630ba030 feat: Document Runtime 核心增强 - anchors、文档解析、搜索
- anchors: 锚点处理增强
- document: 文档核心逻辑
- epub/markdown/pdf: 多格式解析增强
- search: 全文搜索增强
- FFI: 接口绑定更新 + UDL 定义

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 11:22:44 +08:00
wangdl
a81a9d7e1f fix: add reload_stale_events_v2 FFI export + update UDL with V2 types + XCFramework rebuild
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-09 19:58:07 +08:00
wangdl
bae6ef5726 feat: M3 completion — event buffer, FFI search/anchor, PDF strategy, quality fixes
Rust Core:
- events: global Mutex-buffered event queue (push/export/clear/update_position)
- image_meta: use ImageReader::format() for real decoded format instead of extension
- search: change match_start/match_end usize→u64 for FFI compatibility
- epub/pdf: module-level placeholder comments

FFI (UDL exposed, 12 total functions):
- Added: search_markdown_blocks, search_text_content, create_note_anchor
- Added: push_reading_event, update_reading_position, export_pending_events,
  clear_exported_events

Docs:
- README: synced DocumentBlock model (Table.headers + HorizontalRule),
  simplified dependency recommendations, removed nonexistent doc references
- docs/pdf-strategy.md: PDFKit vs PDFium vs MuPDF evaluation, 5 decisions,
  platform strategy matrix, roadmap

Build:
- .cargo/config.toml: cargo xtask alias
- xtask: CLI implementation (test/build-ios/fixtures commands)
- fixtures: markdown/sample.md (9 block types), text/sample.txt
- XCFramework rebuilt, Swift bindings regenerated (1977 lines)

58 tests pass, zero warnings.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 21:23:26 +08:00
wangdl
e76f253260 chore: init Rust workspace skeleton with crate structure 2026-05-30 18:33:50 +08:00