@ansonlai/docx-redline-js 0.8.0 → 0.8.1

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 (40) hide show
  1. package/CHANGELOG.md +539 -486
  2. package/README.md +331 -309
  3. package/dist/docx-redline-js.esm.js +1083 -163
  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 +1083 -163
  8. package/dist/docx-redline.bundle.cjs.map +4 -4
  9. package/dist/docx-redline.bundle.js +1083 -163
  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-writer.js +18 -0
  15. package/index.d.ts +598 -575
  16. package/index.js +349 -348
  17. package/node/cli-help.js +5 -5
  18. package/node/cli.js +760 -754
  19. package/node/index.d.ts +1 -1
  20. package/package.json +2 -1
  21. package/scripts/generate-word-comment-edge-case-fixture.ps1 +58 -0
  22. package/scripts/generate-word-comment-thread-fixture.ps1 +36 -0
  23. package/scripts/generate-word-header-footer-fixture.ps1 +32 -0
  24. package/scripts/generate-word-multi-section-fixture.ps1 +27 -0
  25. package/scripts/generate-word-package-integrity-cases.mjs +141 -0
  26. package/scripts/generate-word-thread-state-fixtures.ps1 +50 -0
  27. package/scripts/word-com-package-integrity.ps1 +98 -0
  28. package/services/batch-operation-orchestrator.js +262 -259
  29. package/services/comment-replies.js +96 -95
  30. package/services/comment-thread-parts.js +280 -0
  31. package/services/document-inspection.js +366 -365
  32. package/services/document-operation-applier.js +230 -202
  33. package/services/document-operation-contract.js +17 -2
  34. package/services/error-recovery.js +6 -0
  35. package/services/headers-footers.js +206 -0
  36. package/services/operation-batch-compiler.js +1 -0
  37. package/services/operation-preflight.js +231 -218
  38. package/services/package-parts.js +80 -0
  39. package/services/standalone-docx-plumbing.js +631 -569
  40. 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.',