Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
c6d9b26
feat: add function for mapping doc paragraphs by id
Dec 16, 2025
57beb16
feat: add function for flattening paragraph text but keep track of po…
Dec 16, 2025
e6968be
feat: add function for calculating text diffs using LCS
Dec 16, 2025
467ce85
feat: add function for calculating paragraph-level diffing
Dec 16, 2025
44bedd4
feat: add diffing extension
Dec 17, 2025
96d2e3b
test: add diffing tests
Dec 17, 2025
9f60c30
refactor: switch LCS algorith to Myers for performance
Dec 18, 2025
710f380
refactor: code structure
Dec 18, 2025
65c98b4
feat: compute text similarity using Levenshtein distance
Dec 19, 2025
9583614
feat: identify contiguous text changes as single operation
Dec 22, 2025
8cd8e58
feat: implement logic for diffing paragraph attributes
Dec 23, 2025
738bdc9
refactor: extract generic sequence diffing helper
Dec 23, 2025
5b1efa2
refactor: modify paragraph diffing to reuse generic helper
Dec 23, 2025
8b11027
refactor: extract operation reordering function
Dec 23, 2025
6760d6e
fix: standardize positions for text diffing
Dec 23, 2025
9c4f975
refactor: change text diffing logic to account for formatting
Dec 26, 2025
bb7e16c
refactor: change from "type" to "action"
Dec 26, 2025
5068fef
feat: support diffing non-textual inline nodes
Dec 26, 2025
6037da3
feat: include previous element when building add diff
Dec 29, 2025
64473b5
docs: add JSDoc to inline diffing
Dec 29, 2025
907dd3d
fix: handle arrays in attributes diff
Dec 29, 2025
37feb55
feat: implement generic diffing for all nodes
Dec 29, 2025
3541765
refactor: move paragraph utility functions
Dec 29, 2025
f9e1e54
feat: use generic diffing for diff computation command
Dec 29, 2025
b546c74
refactor: simplify grouping logic during inline diffing
Dec 29, 2025
98c495c
refactor: convert modules to typescript and improve documentation
Dec 29, 2025
f73460b
fix: diffing of inline node attributes
Dec 29, 2025
cf828f4
fix: diff positions for modified non-paragraph nodes
Dec 29, 2025
e59990a
feat: improve diff comparison for table rows
Dec 29, 2025
67860b1
fix: emit single diff when container node is deleted
Dec 30, 2025
321bf8d
fix: compute correct insertion position for first child node
Dec 30, 2025
6e64341
fix: remove unused position resolver for inline diffing
Dec 30, 2025
7e6532a
refactor: remove serialization/deserialization of run attrs during diff
Dec 30, 2025
8122309
fix: include node type when extracting content from paragraph
Dec 30, 2025
850ec91
refactor: include JSON nodes instead of PM nodes in diffs
Dec 30, 2025
7bc693d
refactor: simplify typescript interfaces
Dec 30, 2025
7c3a48c
refactor: extract insertion position calculation logic into helper
Dec 30, 2025
9101539
refactor: simplify resolution of inline node positions
Dec 30, 2025
2689cb9
refactor: remove unecessary exports
Dec 30, 2025
ab843ef
refactor: standardize diff attribute names for modifications
Dec 30, 2025
9158b75
docs: add JSDoc to compareDocuments command
Dec 30, 2025
90216ef
feat: add function for diffing marks
Dec 31, 2025
629bdaa
feat: take marks into account during diff computation
Dec 31, 2025
b6181ac
refactor: modify computeDiff signature to account for comments diffing
Dec 31, 2025
dbb8604
feat: add generic inline content tokenization function
Dec 31, 2025
e5d876b
refactor: use inline content tokenization function for paragraphs
Dec 31, 2025
96bf85c
feat: implement tokenization of comment data
Dec 31, 2025
ea3e4c8
refactor: change diffNodes signature to facilitate reuse
Dec 31, 2025
e552d6c
feat: allow specifying keys to be ignored when diffing attributes
Dec 31, 2025
fb6bbfd
feat: implement comments diffing hooks
Dec 31, 2025
6d829eb
feat: update compareDocuments command to support diffing comments
Dec 31, 2025
13ddf08
test: move test files to separate directory
Dec 31, 2025
e9e97ad
docs: improve TSDoc comments for interfaces
Dec 31, 2025
942f7e7
feat: initialize directory structure for diff replays
Jan 2, 2026
9714f88
feat: implement replay of non-paragraph nodes
Jan 2, 2026
3b31ab2
feat: implement deriving new marks from diff
Jan 2, 2026
eab97d0
docs: improve TSDoc comments
Jan 2, 2026
e1e6609
docs: improve typing
Jan 2, 2026
587142a
feat: implement replay of inline nodes and text
Jan 2, 2026
f3049a8
feat: implement replay of paragraph nodes
Jan 2, 2026
2ae4fee
feat: implement diff replay entrypoint
Jan 2, 2026
fd3d4bc
feat: add command for replaying diffs onto current document
Jan 2, 2026
656e97a
feat: add button to dev playground to allow comparing documents
Jan 2, 2026
6a8b836
feat: include diffing extension
Jan 2, 2026
98e80b4
feat: improve replay accuracy for inline/run attrs and tracked changes
Jan 2, 2026
17c4fef
fix: replay of formatting changes
Jan 5, 2026
e8464b0
fix: tracked change comment update
Jan 5, 2026
a9823f3
fix: set selection during track changes
luccas-harbour Mar 2, 2026
eb9e639
fix: adjust track changes during diff replay
luccas-harbour Mar 2, 2026
e894ef8
fix: linting errors
luccas-harbour Mar 2, 2026
4ff51c5
feat: add logic for replaying comment differences
luccas-harbour Mar 2, 2026
4e433d4
fix: adjust computation of comment position key
luccas-harbour Mar 2, 2026
74e2727
fix: adjust comment diffing logic
luccas-harbour Mar 2, 2026
b864146
fix: diffing of track change marks
luccas-harbour Mar 2, 2026
e6932c5
test: diff with track changes
luccas-harbour Mar 2, 2026
82f8813
fix: duplicate function defs
luccas-harbour Mar 2, 2026
29ea7c8
fix: replaying diffs with track changes
luccas-harbour Mar 2, 2026
0d1b3cd
chore: add param type
luccas-harbour Mar 2, 2026
e5b3791
fix: invalid test
luccas-harbour Mar 2, 2026
736540a
test: adjust existing tests
luccas-harbour Mar 2, 2026
c324be4
fix: replaying tracked changes
luccas-harbour Mar 3, 2026
192722c
fix: syncing of tracked changes after diff replay
luccas-harbour Mar 3, 2026
c51a31c
fix: correctly apply run attribute changes
luccas-harbour Mar 3, 2026
1f51019
fix(diffing): preserve duplicate same-type marks in mark diff and replay
luccas-harbour Mar 3, 2026
ee9a775
fix(diffing): preserve multi-block comment body edits in modified com…
luccas-harbour Mar 3, 2026
a7529fe
fix(diffing): allow replayDifferences to be called without options
luccas-harbour Mar 3, 2026
c033d21
fix(diffing): make replayDifferences side-effect free in can() checks
luccas-harbour Mar 3, 2026
e85bd04
fix(superdoc): clear active reply when replay deletion removes parent…
luccas-harbour Mar 3, 2026
dbc1065
fix(diffing): match inline node types by name across editor schemas
luccas-harbour Mar 3, 2026
eeaca1f
fix(superdoc): always flush replay tracked-change sync even with no c…
luccas-harbour Mar 3, 2026
29e930e
fix(superdoc): delete full comment subtree on replay thread removal
luccas-harbour Mar 3, 2026
19adaa3
fix(diffing): preserve existing comments when compareDocuments omits …
luccas-harbour Mar 3, 2026
876c46e
fix(comments-store): scope tracked-change stale pruning to active doc…
luccas-harbour Mar 3, 2026
1227521
fix(diffing): reuse transaction
luccas-harbour Mar 3, 2026
6bbe9c9
fix(superdoc): match replay comment updates by importedId before comm…
luccas-harbour Mar 3, 2026
6dd7e5e
fix(diffing): honor applyTrackedChanges=false by setting skipTrackCha…
luccas-harbour Mar 3, 2026
f5fccdf
fix(superdoc): handle replay delete events with importedId-first iden…
luccas-harbour Mar 3, 2026
4e8fcdf
fix(diffing): prevent compareDocuments from dispatching read-only tra…
luccas-harbour Mar 3, 2026
31c366a
fix(diffing): derive insertion anchors from old sequence context
luccas-harbour Mar 4, 2026
b2070ff
fix(superdoc): scope replay comment updates to active document
luccas-harbour Mar 4, 2026
dc6c94b
fix(superdoc): scope replay thread deletions to active document
luccas-harbour Mar 4, 2026
4941d58
fix(superdoc): preserve comment identity on replay updates
luccas-harbour Mar 4, 2026
6f74b3d
fix(diff-replay): include document identity in replayed comment events
luccas-harbour Mar 4, 2026
3be429e
fix(comments-store): treat importedId as live in tracked-change prune
luccas-harbour Mar 4, 2026
f438122
fix(comments-store): dedupe tracked-change sync by commentId and impo…
luccas-harbour Mar 4, 2026
9449216
fix(comments): keep replayed docxCommentJSON in export payloads
luccas-harbour Mar 4, 2026
009193c
fix(superdoc): preserve DOCX comment structure on replay add
luccas-harbour Mar 4, 2026
7f22766
fix(superdoc): replayed comment resolution persistence for export
luccas-harbour Mar 4, 2026
6fdc3e9
fix(superdoc): scope replay update active comment id to matched docum…
luccas-harbour Mar 4, 2026
916a3d1
fix(superdoc): stop replay comment updates from forcing active-thread…
luccas-harbour Mar 5, 2026
6fd5e45
test: add missing test documents
luccas-harbour Mar 5, 2026
3c8a4a7
test: adjust diff replay test
luccas-harbour Mar 5, 2026
9afedd8
fix(superdoc): update replay comment parent linkage fields on thread …
luccas-harbour Mar 5, 2026
aad7a87
fix(superdoc): scope replay add deduplication to active document context
luccas-harbour Mar 5, 2026
c4da408
fix(track-changes): preserve property attrs for ReplaceAroundStep upd…
luccas-harbour Mar 5, 2026
1bd0486
feat: implement diffing for styles
luccas-harbour Mar 6, 2026
f8f4941
feat: implement replay for style differences
luccas-harbour Mar 6, 2026
0c40190
feat: implement diffing for numbering
luccas-harbour Mar 6, 2026
af03e4e
feat: implement replay for numbering differences
luccas-harbour Mar 6, 2026
194bfda
fix(comments): scope tracked-change dedupe to active document
luccas-harbour Mar 6, 2026
d1c6b62
refactor(diffing): share deepEquals helper across replay modules
luccas-harbour Mar 6, 2026
42aa5f2
chore: add diffing example
luccas-harbour Mar 10, 2026
68755e5
fix(numbering): missing imports
luccas-harbour Mar 12, 2026
25a2ae4
chore: update lock file
luccas-harbour Mar 12, 2026
d478c73
test: add missing test documents
luccas-harbour Mar 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Focused examples that each demonstrate a single SuperDoc feature.
| Example | Description | Docs |
|---------|-------------|------|
| [track-changes](./track-changes) | Accept/reject workflow with suggesting mode | [Track Changes](https://docs.superdoc.dev/extensions/track-changes) |
| [diffing](./diffing) | Compare two DOCX files and replay directional diffs as tracked changes | - |
| [ai-redlining](./ai-redlining) | LLM-powered document review with tracked changes | [AI Agents](https://docs.superdoc.dev/getting-started/ai-agents) |
| [comments](./comments) | Threaded comments with resolve workflow and event log | [Comments](https://docs.superdoc.dev/modules/comments) |
| [custom-toolbar](./custom-toolbar) | Custom button groups, excluded items, and custom buttons | [Toolbar](https://docs.superdoc.dev/modules/toolbar) |
12 changes: 12 additions & 0 deletions examples/features/diffing/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SuperDoc Diffing Example</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
18 changes: 18 additions & 0 deletions examples/features/diffing/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "superdoc-diffing-example",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build"
},
"dependencies": {
"superdoc": "workspace:*",
"vue": "^3.5.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.2.0",
"typescript": "^5.7.0",
"vite": "^6.2.0"
}
}
Loading
Loading