@file-viewer/docx 0.3.35 → 0.3.36

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.
@@ -10016,6 +10016,8 @@ class HtmlRenderer {
10016
10016
  const rect = child.getBoundingClientRect();
10017
10017
  bottom = Math.max(bottom, rect.bottom);
10018
10018
  if (child.tagName.toLowerCase() == "article") {
10019
+ if (rect.bottom > bodyBottom + tolerance)
10020
+ return true;
10019
10021
  for (const block of Array.from(child.children)) {
10020
10022
  const blockRect = block.getBoundingClientRect();
10021
10023
  bottom = Math.max(bottom, blockRect.bottom);
@@ -10200,7 +10202,7 @@ class HtmlRenderer {
10200
10202
  getPageBodyBottom(page) {
10201
10203
  const lists = Array.from(page.children).filter(node => node.dataset.docxNoteList);
10202
10204
  const view = page.ownerDocument?.defaultView;
10203
- if (!lists.length || !view)
10205
+ if (!view)
10204
10206
  return page.getBoundingClientRect().bottom;
10205
10207
  let bottom = this.getPageNoteBottom(page);
10206
10208
  for (const list of lists) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@file-viewer/docx",
3
- "version": "0.3.35",
3
+ "version": "0.3.36",
4
4
  "description": "Pure HTML DOCX renderer fork for browser-based Word previews.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [