@file-viewer/docx 0.3.29 → 0.3.31

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
@@ -104,7 +104,7 @@ markup in the DOM, show comments by default, and enable the four read-only views
104
104
  import {
105
105
  collectDocxReviewChanges,
106
106
  renderAsync,
107
- setDocxReviewMode
107
+ renderDocument
108
108
  } from "@file-viewer/docx";
109
109
 
110
110
  const document = await renderAsync(file, container, null, {
@@ -112,7 +112,7 @@ const document = await renderAsync(file, container, null, {
112
112
  });
113
113
 
114
114
  const changes = collectDocxReviewChanges(document);
115
- setDocxReviewMode(container, "original"); // no reparse required
115
+ await renderDocument(document, container, null, { reviewMode: "original" });
116
116
  ```
117
117
 
118
118
  `renderChanges: true` is retained as a compatibility alias for `reviewMode: "all"`.
@@ -127,6 +127,20 @@ wants Word-style margin balloons can use `collectDocxReviewChanges()` together
127
127
  with the stable `data-docx-change-*` anchors; the renderer does not force that
128
128
  optional review UI on normal document previews.
129
129
 
130
+ Paragraph-mark revisions are resolved when rendering a review mode: deleted
131
+ marks join paragraphs in `final`/`simple`, and inserted marks join paragraphs
132
+ in `original`. Content stays within its table cell, section, or positioned
133
+ frame. Native Word-created fixtures verify paragraph boundaries, tabs, soft
134
+ breaks, mixed bold runs, CJK replacements, and table cell text against Word's
135
+ Accept All and Reject All files. The browser gate repeats these checks in
136
+ the main thread and a real Worker while reusing the parsed document.
137
+
138
+ Use `renderDocument()` with the returned parsed document when switching a view
139
+ that can change paragraph boundaries; it does not parse or upload the file again.
140
+ The synchronous `setDocxReviewMode()` helper changes CSS visibility only. It does
141
+ not rebuild paragraph structure or pagination and is not a substitute for that
142
+ render step. File Viewer's Word settings perform the render step automatically.
143
+
130
144
  `collectDocxReviewChanges()` returns logical Word review items rather than raw
131
145
  OOXML wrappers. Adjacent/nested revision fragments from the same paragraph,
132
146
  author, and edit session are coalesced; `ids` lists every source revision id.
@@ -330,3 +344,16 @@ node tests/regression/check-numbering-suffix.cjs
330
344
  ```
331
345
 
332
346
  The large database-design regression uses the cached rendered snapshot by default to avoid spending minutes rebuilding the full document in constrained CI. Set `DOCXJS_RERENDER_REGRESSION=1` when you need to regenerate it from the DOCX.
347
+
348
+ ## Maintainer releases
349
+
350
+ `publish.yml` checks out the exact stable release tag, builds the package, runs
351
+ semantic and native Word browser regressions, then publishes with npm provenance.
352
+ The npm trusted publisher must bind `@file-viewer/docx` to
353
+ `flyfish-dev/docxjs` and `publish.yml`; no long-lived npm token is required.
354
+ The workflow alone does not create that npm permission.
355
+
356
+ Manual dispatch defaults to a dry run and requires an existing release tag.
357
+ Retries verify the packed SHA-512 against the registry before skipping an
358
+ existing version. Different bytes or an uncertain write stop the run rather
359
+ than changing the version or repeating an authentication prompt.