@ansonlai/docx-redline-js 0.8.0 → 0.8.2

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +553 -486
  2. package/README.md +331 -309
  3. package/dist/docx-redline-js.esm.js +1209 -168
  4. package/dist/docx-redline-js.esm.js.map +4 -4
  5. package/dist/docx-redline-js.esm.min.js +107 -107
  6. package/dist/docx-redline-js.esm.min.js.map +4 -4
  7. package/dist/docx-redline.bundle.cjs +1209 -168
  8. package/dist/docx-redline.bundle.cjs.map +4 -4
  9. package/dist/docx-redline.bundle.js +1209 -168
  10. package/dist/docx-redline.bundle.js.map +4 -4
  11. package/docs/AGENT_KNOWLEDGE_BASE.md +69 -8
  12. package/docs/schemas/document-operations.schema.json +29 -0
  13. package/document/docx-document.js +416 -22
  14. package/engine/reconstruction-mode.js +183 -54
  15. package/engine/reconstruction-writer.js +18 -0
  16. package/index.d.ts +598 -575
  17. package/index.js +349 -348
  18. package/node/cli-help.js +5 -5
  19. package/node/cli.js +760 -754
  20. package/node/index.d.ts +1 -1
  21. package/package.json +2 -1
  22. package/pipeline/diff-engine.js +274 -258
  23. package/scripts/generate-word-comment-edge-case-fixture.ps1 +58 -0
  24. package/scripts/generate-word-comment-thread-fixture.ps1 +36 -0
  25. package/scripts/generate-word-header-footer-fixture.ps1 +32 -0
  26. package/scripts/generate-word-multi-section-fixture.ps1 +27 -0
  27. package/scripts/generate-word-package-integrity-cases.mjs +141 -0
  28. package/scripts/generate-word-thread-state-fixtures.ps1 +50 -0
  29. package/scripts/run-tests.mjs +14 -2
  30. package/scripts/word-com-package-integrity.ps1 +98 -0
  31. package/services/batch-operation-orchestrator.js +262 -259
  32. package/services/comment-replies.js +96 -95
  33. package/services/comment-thread-parts.js +280 -0
  34. package/services/document-inspection.js +366 -365
  35. package/services/document-operation-applier.js +230 -202
  36. package/services/document-operation-contract.js +17 -2
  37. package/services/error-recovery.js +6 -0
  38. package/services/headers-footers.js +206 -0
  39. package/services/operation-batch-compiler.js +1 -0
  40. package/services/operation-preflight.js +231 -218
  41. package/services/package-parts.js +80 -0
  42. package/services/standalone-docx-plumbing.js +631 -569
  43. package/services/standalone-operation-runner.d.ts +19 -3
package/node/cli-help.js CHANGED
@@ -182,11 +182,11 @@ export const CLI_COMMAND_HELP = Object.freeze({
182
182
  examples: [{ command: 'docx-redline reject reviewed.docx --author "Editor"' }]
183
183
  },
184
184
  'delete-comments': {
185
- summary: 'Delete comments by one author or all authors.',
186
- usage: 'docx-redline delete-comments <file.docx> (--author <name>|--all-authors) [options]',
187
- options: [HELP, ...MUTATION_DESTINATION_OPTIONS, option('allAuthors', '--all-authors', ALL_AUTHORS.description), option('noClobber', '--no-clobber', 'Alias of --no-overwrite.'), COMPACT],
188
- notes: ['Removing reviewer comments requires explicit user authorization.'],
189
- examples: [{ command: 'docx-redline delete-comments reviewed.docx --author "Reviewer"' }]
185
+ summary: 'Delete comments by id, by one author, or by all authors.',
186
+ usage: 'docx-redline delete-comments <file.docx> (--comment-id <id[,id]>|--author <name>|--all-authors) [options]',
187
+ options: [HELP, ...MUTATION_DESTINATION_OPTIONS, option('commentId', '--comment-id <id[,id]>', 'Delete these comment ids (from extract/inspect). Deleting a thread root also deletes its replies.'), option('allAuthors', '--all-authors', ALL_AUTHORS.description), option('noClobber', '--no-clobber', 'Alias of --no-overwrite.'), COMPACT],
188
+ notes: ['Removing reviewer comments requires explicit user authorization.', 'Unknown comment ids fail with COMMENT_NOT_FOUND and nothing is written.'],
189
+ examples: [{ command: 'docx-redline delete-comments reviewed.docx --author "Reviewer"' }, { command: 'docx-redline delete-comments reviewed.docx --comment-id 4' }]
190
190
  },
191
191
  validate: {
192
192
  summary: 'Validate revision markup and DOCX package wiring.',