docx-diff-editor 1.0.42 → 1.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,8 +6,9 @@ A React component for DOCX document comparison with track changes visualization.
6
6
 
7
7
  - 📄 Compare two DOCX documents side by side
8
8
  - 🔍 Character-level diff with track changes
9
- - 📊 **Block-level diffing** for tables, lists, and images
10
- - Accept/reject individual changes
9
+ - 📊 **Block-level structural diffing** for tables, lists, paragraphs, and images
10
+ - 🔄 **Structure-aware merge** - inserted/deleted blocks appear in the editor with track marks
11
+ - ✅ Accept/reject individual changes (both text and structural)
11
12
  - 🎨 Visual track changes (insert, delete, format)
12
13
  - 📋 **Structural Changes Pane** for table rows, list items, images
13
14
  - 🤖 Extract enriched change context for LLM processing
@@ -312,6 +313,18 @@ The component supports three types of track changes:
312
313
 
313
314
  When comparing documents with structural differences (tables, lists, images), a floating pane appears showing these changes with Accept/Reject controls.
314
315
 
316
+ ### How It Works
317
+
318
+ The component uses a **structure-aware merge** approach:
319
+
320
+ 1. **Block alignment**: Documents are aligned at the block level (paragraphs, tables, lists) using content fingerprinting
321
+ 2. **Recursive merge**: Tables and lists are merged recursively (row-by-row, item-by-item)
322
+ 3. **Character-level diff**: Within matched blocks, character-level diffing is applied
323
+ 4. **Insert/delete marking**: New blocks get `trackInsert` marks; deleted blocks are preserved with `trackDelete` marks
324
+ 5. **Shared IDs**: Each structural change has a unique ID linking the track marks to the pane entry
325
+
326
+ This means inserted tables, paragraphs, and list items actually appear in the editor (with green highlighting), and deleted content remains visible (with red strikethrough) until you accept or reject the changes.
327
+
315
328
  ### What's Detected
316
329
 
317
330
  | Change Type | Description |