pdftract/crates
jedarden cd1b6377b6 feat(pdftract-saddv): implement inspector JSON-tree click navigation
Add data-span-index attribute to span rectangles for click navigation
between SVG canvas and JSON-tree panel. Updated render_spans() to use
enumerate() for tracking indices. Added unit tests for index assignment.

Created demo HTML file demonstrating the full click navigation feature:
- Click span rect -> scroll JSON tree to matching entry
- Highlight target node with yellow background for 2 seconds
- Auto-open ancestor <details> elements
- Smooth scrollIntoView with center alignment

Acceptance criteria:
- PASS: data-span-index attribute added to all spans
- PASS: Click handler scrolls tree to matching node
- PASS: .highlighted class applied for 2 seconds
- PASS: Ancestor details auto-opened before scroll
- PASS: 9 unit tests pass including new span_index test

Closes: pdftract-saddv

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 03:35:24 -04:00
..
pdftract-cer-diff docs(pdftract-aawrz): add LICENSE-MIT and LICENSE-APACHE files 2026-05-23 10:36:28 -04:00
pdftract-cli feat(pdftract-saddv): implement inspector JSON-tree click navigation 2026-05-24 03:35:24 -04:00
pdftract-core feat(pdftract-oh30a): implement per-page readability aggregation 2026-05-24 03:28:41 -04:00
pdftract-libpdftract feat(pdftract-juc): implement Standard 14 font metrics registry 2026-05-23 14:04:02 -04:00
pdftract-py docs(pdftract-aawrz): add LICENSE-MIT and LICENSE-APACHE files 2026-05-23 10:36:28 -04:00