docxodus 3.8.0 → 3.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.
@@ -27,6 +27,8 @@ var DocxodusPagination = (() => {
27
27
  var DEFAULT_PAGE_WIDTH = 612;
28
28
  var DEFAULT_PAGE_HEIGHT = 792;
29
29
  var DEFAULT_MARGIN = 72;
30
+ var MAX_FOOTNOTE_AREA_RATIO = 0.6;
31
+ var MIN_BODY_CONTENT_HEIGHT = 72;
30
32
  function pxToPt(px) {
31
33
  return px * 0.75;
32
34
  }
@@ -67,6 +69,7 @@ var DocxodusPagination = (() => {
67
69
  * @param options - Pagination options
68
70
  */
69
71
  constructor(staging, container, options = {}) {
72
+ this.pendingFootnoteContinuation = null;
70
73
  this.stagingElement = typeof staging === "string" ? document.getElementById(staging) : staging;
71
74
  this.containerElement = typeof container === "string" ? document.getElementById(container) : container;
72
75
  if (!this.stagingElement) {
@@ -217,9 +220,13 @@ var DocxodusPagination = (() => {
217
220
  /**
218
221
  * Measures the height of footnotes for given IDs (in points).
219
222
  * Creates a temporary container to measure the footnotes.
223
+ * @param footnoteIds - IDs of footnotes to measure
224
+ * @param contentWidth - Width for measurement
225
+ * @param continuation - Optional continuation content to include first
220
226
  */
221
- measureFootnotesHeight(footnoteIds, contentWidth) {
222
- if (footnoteIds.length === 0 || this.footnoteRegistry.size === 0) {
227
+ measureFootnotesHeight(footnoteIds, contentWidth, continuation) {
228
+ const hasContinuation = continuation && continuation.remainingElements.length > 0;
229
+ if (footnoteIds.length === 0 && !hasContinuation || this.footnoteRegistry.size === 0) {
223
230
  return 0;
224
231
  }
225
232
  const measureContainer = document.createElement("div");
@@ -229,6 +236,14 @@ var DocxodusPagination = (() => {
229
236
  measureContainer.style.left = "-9999px";
230
237
  const hr = document.createElement("hr");
231
238
  measureContainer.appendChild(hr);
239
+ if (hasContinuation) {
240
+ const contWrapper = document.createElement("div");
241
+ contWrapper.className = "footnote-continuation";
242
+ for (const el of continuation.remainingElements) {
243
+ contWrapper.appendChild(el.cloneNode(true));
244
+ }
245
+ measureContainer.appendChild(contWrapper);
246
+ }
232
247
  for (const id of footnoteIds) {
233
248
  const footnote = this.footnoteRegistry.get(id);
234
249
  if (footnote) {
@@ -242,12 +257,109 @@ var DocxodusPagination = (() => {
242
257
  return heightPt;
243
258
  }
244
259
  /**
245
- * Adds footnotes to a page container.
260
+ * Measures the height of just the continuation content (in points).
246
261
  */
247
- addPageFootnotes(pageBox, footnoteIds, dims) {
248
- if (footnoteIds.length === 0 || this.footnoteRegistry.size === 0) {
262
+ measureContinuationHeight(continuation, contentWidth) {
263
+ if (!continuation || continuation.remainingElements.length === 0) {
264
+ return 0;
265
+ }
266
+ const measureContainer = document.createElement("div");
267
+ measureContainer.style.position = "absolute";
268
+ measureContainer.style.visibility = "hidden";
269
+ measureContainer.style.width = `${contentWidth}pt`;
270
+ measureContainer.style.left = "-9999px";
271
+ const hr = document.createElement("hr");
272
+ measureContainer.appendChild(hr);
273
+ for (const el of continuation.remainingElements) {
274
+ measureContainer.appendChild(el.cloneNode(true));
275
+ }
276
+ this.stagingElement.appendChild(measureContainer);
277
+ const rect = measureContainer.getBoundingClientRect();
278
+ const heightPt = pxToPt(rect.height);
279
+ this.stagingElement.removeChild(measureContainer);
280
+ return heightPt;
281
+ }
282
+ /**
283
+ * Splits a footnote element into parts that fit within the available height.
284
+ * Returns the elements that fit and the elements that need to continue.
285
+ */
286
+ splitFootnoteToFit(footnoteElement, availableHeightPt, contentWidth) {
287
+ const footnoteContent = footnoteElement.querySelector(".footnote-content");
288
+ if (!footnoteContent) {
289
+ return { fits: [footnoteElement.cloneNode(true)], overflow: [] };
290
+ }
291
+ const children = Array.from(footnoteContent.children);
292
+ if (children.length <= 1) {
293
+ return { fits: [footnoteElement.cloneNode(true)], overflow: [] };
294
+ }
295
+ const fits = [];
296
+ const overflow = [];
297
+ let currentHeight = 0;
298
+ const hrMeasure = document.createElement("div");
299
+ hrMeasure.style.position = "absolute";
300
+ hrMeasure.style.visibility = "hidden";
301
+ hrMeasure.style.width = `${contentWidth}pt`;
302
+ hrMeasure.style.left = "-9999px";
303
+ const hr = document.createElement("hr");
304
+ hrMeasure.appendChild(hr);
305
+ this.stagingElement.appendChild(hrMeasure);
306
+ const hrHeight = pxToPt(hrMeasure.getBoundingClientRect().height);
307
+ this.stagingElement.removeChild(hrMeasure);
308
+ currentHeight = hrHeight;
309
+ const footnoteNumber = footnoteElement.querySelector(".footnote-number");
310
+ for (let i = 0; i < children.length; i++) {
311
+ const child = children[i];
312
+ const measureContainer = document.createElement("div");
313
+ measureContainer.style.position = "absolute";
314
+ measureContainer.style.visibility = "hidden";
315
+ measureContainer.style.width = `${contentWidth}pt`;
316
+ measureContainer.style.left = "-9999px";
317
+ measureContainer.appendChild(child.cloneNode(true));
318
+ this.stagingElement.appendChild(measureContainer);
319
+ const childHeight = pxToPt(measureContainer.getBoundingClientRect().height);
320
+ this.stagingElement.removeChild(measureContainer);
321
+ if (currentHeight + childHeight <= availableHeightPt) {
322
+ fits.push(child.cloneNode(true));
323
+ currentHeight += childHeight;
324
+ } else {
325
+ for (let j = i; j < children.length; j++) {
326
+ overflow.push(children[j].cloneNode(true));
327
+ }
328
+ break;
329
+ }
330
+ }
331
+ return { fits, overflow };
332
+ }
333
+ /**
334
+ * Measures a single footnote's height.
335
+ */
336
+ measureSingleFootnoteHeight(footnoteId, contentWidth) {
337
+ const footnote = this.footnoteRegistry.get(footnoteId);
338
+ if (!footnote) return 0;
339
+ const measureContainer = document.createElement("div");
340
+ measureContainer.style.position = "absolute";
341
+ measureContainer.style.visibility = "hidden";
342
+ measureContainer.style.width = `${contentWidth}pt`;
343
+ measureContainer.style.left = "-9999px";
344
+ measureContainer.appendChild(footnote.cloneNode(true));
345
+ this.stagingElement.appendChild(measureContainer);
346
+ const rect = measureContainer.getBoundingClientRect();
347
+ const heightPt = pxToPt(rect.height);
348
+ this.stagingElement.removeChild(measureContainer);
349
+ return heightPt;
350
+ }
351
+ /**
352
+ * Adds footnotes to a page container, including continuation content.
353
+ */
354
+ addPageFootnotes(pageBox, footnoteIds, dims, continuation, partialFootnotes) {
355
+ const hasContinuation = continuation && continuation.remainingElements.length > 0;
356
+ if (footnoteIds.length === 0 && !hasContinuation) {
249
357
  return;
250
358
  }
359
+ if (this.footnoteRegistry.size === 0 && !hasContinuation) {
360
+ return;
361
+ }
362
+ const partialFootnoteIds = new Set(partialFootnotes?.map((p) => p.footnoteId) || []);
251
363
  const footnotesDiv = document.createElement("div");
252
364
  footnotesDiv.className = `${this.cssPrefix}footnotes`;
253
365
  footnotesDiv.style.position = "absolute";
@@ -257,10 +369,39 @@ var DocxodusPagination = (() => {
257
369
  footnotesDiv.style.boxSizing = "border-box";
258
370
  const hr = document.createElement("hr");
259
371
  footnotesDiv.appendChild(hr);
372
+ if (hasContinuation) {
373
+ const contWrapper = document.createElement("div");
374
+ contWrapper.className = "footnote-continuation";
375
+ for (const el of continuation.remainingElements) {
376
+ contWrapper.appendChild(el.cloneNode(true));
377
+ }
378
+ footnotesDiv.appendChild(contWrapper);
379
+ }
260
380
  for (const id of footnoteIds) {
261
- const footnote = this.footnoteRegistry.get(id);
262
- if (footnote) {
263
- footnotesDiv.appendChild(footnote.cloneNode(true));
381
+ const partial = partialFootnotes?.find((p) => p.footnoteId === id);
382
+ if (partial) {
383
+ const footnote = this.footnoteRegistry.get(id);
384
+ if (footnote) {
385
+ const partialDiv = document.createElement("div");
386
+ partialDiv.className = "footnote-item";
387
+ partialDiv.dataset.footnoteId = id;
388
+ const numberSpan = footnote.querySelector(".footnote-number");
389
+ if (numberSpan) {
390
+ partialDiv.appendChild(numberSpan.cloneNode(true));
391
+ }
392
+ const contentSpan = document.createElement("span");
393
+ contentSpan.className = "footnote-content";
394
+ for (const el of partial.fittingElements) {
395
+ contentSpan.appendChild(el.cloneNode(true));
396
+ }
397
+ partialDiv.appendChild(contentSpan);
398
+ footnotesDiv.appendChild(partialDiv);
399
+ }
400
+ } else {
401
+ const footnote = this.footnoteRegistry.get(id);
402
+ if (footnote) {
403
+ footnotesDiv.appendChild(footnote.cloneNode(true));
404
+ }
264
405
  }
265
406
  }
266
407
  pageBox.appendChild(footnotesDiv);
@@ -296,6 +437,7 @@ var DocxodusPagination = (() => {
296
437
  /**
297
438
  * Flows measured blocks into page containers.
298
439
  * Implements a single-pass, forward-only algorithm that is compatible with future lazy loading.
440
+ * Supports footnote continuation - long footnotes can split across pages.
299
441
  */
300
442
  flowToPages(blocks, dims, startPageNumber, sectionIndex) {
301
443
  const pages = [];
@@ -306,15 +448,23 @@ var DocxodusPagination = (() => {
306
448
  let prevMarginBottomPt = 0;
307
449
  let currentFootnoteIds = [];
308
450
  let currentFootnoteHeight = 0;
451
+ let currentContinuation = this.pendingFootnoteContinuation;
452
+ let nextPageContinuation = null;
453
+ let currentPartialFootnotes = [];
454
+ if (currentContinuation && currentContinuation.remainingElements.length > 0) {
455
+ currentFootnoteHeight = this.measureContinuationHeight(currentContinuation, dims.contentWidth);
456
+ }
309
457
  const finishPage = () => {
310
- if (currentContent.length === 0) return;
458
+ if (currentContent.length === 0 && !currentContinuation) return;
311
459
  const page = this.createPage(
312
460
  dims,
313
461
  pageNumber,
314
462
  sectionIndex,
315
463
  currentContent,
316
464
  pageInSection,
317
- currentFootnoteIds
465
+ currentFootnoteIds,
466
+ currentContinuation,
467
+ currentPartialFootnotes.length > 0 ? currentPartialFootnotes : void 0
318
468
  );
319
469
  pages.push(page);
320
470
  pageNumber++;
@@ -323,7 +473,14 @@ var DocxodusPagination = (() => {
323
473
  remainingHeight = dims.contentHeight;
324
474
  prevMarginBottomPt = 0;
325
475
  currentFootnoteIds = [];
326
- currentFootnoteHeight = 0;
476
+ currentPartialFootnotes = [];
477
+ currentContinuation = nextPageContinuation;
478
+ nextPageContinuation = null;
479
+ if (currentContinuation && currentContinuation.remainingElements.length > 0) {
480
+ currentFootnoteHeight = this.measureContinuationHeight(currentContinuation, dims.contentWidth);
481
+ } else {
482
+ currentFootnoteHeight = 0;
483
+ }
327
484
  };
328
485
  for (let i = 0; i < blocks.length; i++) {
329
486
  const block = blocks[i];
@@ -340,7 +497,11 @@ var DocxodusPagination = (() => {
340
497
  let additionalFootnoteHeight = 0;
341
498
  if (newFootnoteIds.length > 0 && this.footnoteRegistry.size > 0) {
342
499
  const combinedFootnoteIds = [...currentFootnoteIds, ...newFootnoteIds];
343
- const totalFootnoteHeight = this.measureFootnotesHeight(combinedFootnoteIds, dims.contentWidth);
500
+ const totalFootnoteHeight = this.measureFootnotesHeight(
501
+ combinedFootnoteIds,
502
+ dims.contentWidth,
503
+ currentContinuation
504
+ );
344
505
  additionalFootnoteHeight = totalFootnoteHeight - currentFootnoteHeight;
345
506
  }
346
507
  const isFirstOnPage = currentContent.length === 0;
@@ -355,6 +516,9 @@ var DocxodusPagination = (() => {
355
516
  neededHeight = effectiveMarginTop + block.heightPt + collapsedMargin + nextBlock.heightPt + nextBlock.marginBottomPt + additionalFootnoteHeight;
356
517
  }
357
518
  const effectiveRemainingHeight = remainingHeight - currentFootnoteHeight;
519
+ const bodyContentUsed = dims.contentHeight - remainingHeight;
520
+ const maxFootnoteArea = dims.contentHeight * MAX_FOOTNOTE_AREA_RATIO;
521
+ const maxFootnoteExpansion = Math.max(0, maxFootnoteArea - currentFootnoteHeight);
358
522
  if (blockSpace <= effectiveRemainingHeight) {
359
523
  currentContent.push(block.element.cloneNode(true));
360
524
  remainingHeight -= effectiveMarginTop + block.heightPt + block.marginBottomPt;
@@ -363,15 +527,93 @@ var DocxodusPagination = (() => {
363
527
  currentFootnoteIds.push(...newFootnoteIds);
364
528
  currentFootnoteHeight += additionalFootnoteHeight;
365
529
  }
366
- } else if (block.heightPt + block.marginTopPt + block.marginBottomPt + additionalFootnoteHeight <= dims.contentHeight) {
367
- finishPage();
368
- const newPageFootnoteHeight = blockFootnoteIds.length > 0 ? this.measureFootnotesHeight(blockFootnoteIds, dims.contentWidth) : 0;
369
- const newPageSpace = block.marginTopPt + block.heightPt + block.marginBottomPt;
370
- currentContent.push(block.element.cloneNode(true));
371
- remainingHeight = dims.contentHeight - newPageSpace;
372
- prevMarginBottomPt = block.marginBottomPt;
373
- currentFootnoteIds = [...blockFootnoteIds];
374
- currentFootnoteHeight = newPageFootnoteHeight;
530
+ } else if (block.heightPt + block.marginTopPt + block.marginBottomPt <= dims.contentHeight) {
531
+ const blockSpaceWithoutFootnotes = effectiveMarginTop + block.heightPt + block.marginBottomPt;
532
+ const minBodySpaceNeeded = bodyContentUsed + blockSpaceWithoutFootnotes + MIN_BODY_CONTENT_HEIGHT;
533
+ const canExpandFootnotes = minBodySpaceNeeded <= dims.contentHeight;
534
+ if (newFootnoteIds.length > 0 && blockSpaceWithoutFootnotes <= effectiveRemainingHeight) {
535
+ currentContent.push(block.element.cloneNode(true));
536
+ remainingHeight -= effectiveMarginTop + block.heightPt + block.marginBottomPt;
537
+ prevMarginBottomPt = block.marginBottomPt;
538
+ const availableForFootnotes = Math.min(
539
+ maxFootnoteArea,
540
+ dims.contentHeight - bodyContentUsed - blockSpaceWithoutFootnotes
541
+ );
542
+ for (const footnoteId of newFootnoteIds) {
543
+ const footnote = this.footnoteRegistry.get(footnoteId);
544
+ if (!footnote) continue;
545
+ const footnoteHeight = this.measureSingleFootnoteHeight(footnoteId, dims.contentWidth);
546
+ const spaceLeftForFootnotes = availableForFootnotes - currentFootnoteHeight;
547
+ if (footnoteHeight <= spaceLeftForFootnotes) {
548
+ currentFootnoteIds.push(footnoteId);
549
+ currentFootnoteHeight += footnoteHeight;
550
+ } else {
551
+ if (spaceLeftForFootnotes > 20) {
552
+ const { fits, overflow } = this.splitFootnoteToFit(
553
+ footnote,
554
+ spaceLeftForFootnotes,
555
+ dims.contentWidth
556
+ );
557
+ if (fits.length > 0) {
558
+ currentFootnoteIds.push(footnoteId);
559
+ currentPartialFootnotes.push({
560
+ footnoteId,
561
+ fittingElements: fits
562
+ });
563
+ nextPageContinuation = {
564
+ footnoteId,
565
+ remainingElements: overflow
566
+ };
567
+ currentFootnoteHeight = availableForFootnotes;
568
+ } else {
569
+ nextPageContinuation = {
570
+ footnoteId,
571
+ remainingElements: Array.from(footnote.querySelectorAll(".footnote-content > *")).map((el) => el.cloneNode(true))
572
+ };
573
+ if (nextPageContinuation.remainingElements.length === 0) {
574
+ nextPageContinuation.remainingElements = [footnote.cloneNode(true)];
575
+ }
576
+ }
577
+ } else {
578
+ nextPageContinuation = {
579
+ footnoteId,
580
+ remainingElements: Array.from(footnote.querySelectorAll(".footnote-content > *")).map((el) => el.cloneNode(true))
581
+ };
582
+ if (nextPageContinuation.remainingElements.length === 0) {
583
+ nextPageContinuation.remainingElements = [footnote.cloneNode(true)];
584
+ }
585
+ }
586
+ }
587
+ }
588
+ } else if (canExpandFootnotes && newFootnoteIds.length > 0) {
589
+ const expandedFootnoteSpace = Math.min(maxFootnoteArea, additionalFootnoteHeight + currentFootnoteHeight);
590
+ const bodySpaceAfterExpansion = dims.contentHeight - expandedFootnoteSpace;
591
+ if (blockSpaceWithoutFootnotes <= bodySpaceAfterExpansion - bodyContentUsed) {
592
+ currentContent.push(block.element.cloneNode(true));
593
+ remainingHeight = bodySpaceAfterExpansion - bodyContentUsed - blockSpaceWithoutFootnotes;
594
+ prevMarginBottomPt = block.marginBottomPt;
595
+ currentFootnoteIds.push(...newFootnoteIds);
596
+ currentFootnoteHeight = expandedFootnoteSpace;
597
+ } else {
598
+ finishPage();
599
+ const newPageFootnoteHeight = blockFootnoteIds.length > 0 ? this.measureFootnotesHeight(blockFootnoteIds, dims.contentWidth, currentContinuation) : currentContinuation ? this.measureContinuationHeight(currentContinuation, dims.contentWidth) : 0;
600
+ const newPageSpace = block.marginTopPt + block.heightPt + block.marginBottomPt;
601
+ currentContent.push(block.element.cloneNode(true));
602
+ remainingHeight = dims.contentHeight - newPageSpace;
603
+ prevMarginBottomPt = block.marginBottomPt;
604
+ currentFootnoteIds = [...blockFootnoteIds];
605
+ currentFootnoteHeight = newPageFootnoteHeight;
606
+ }
607
+ } else {
608
+ finishPage();
609
+ const newPageFootnoteHeight = blockFootnoteIds.length > 0 ? this.measureFootnotesHeight(blockFootnoteIds, dims.contentWidth, currentContinuation) : currentContinuation ? this.measureContinuationHeight(currentContinuation, dims.contentWidth) : 0;
610
+ const newPageSpace = block.marginTopPt + block.heightPt + block.marginBottomPt;
611
+ currentContent.push(block.element.cloneNode(true));
612
+ remainingHeight = dims.contentHeight - newPageSpace;
613
+ prevMarginBottomPt = block.marginBottomPt;
614
+ currentFootnoteIds = [...blockFootnoteIds];
615
+ currentFootnoteHeight = newPageFootnoteHeight;
616
+ }
375
617
  } else {
376
618
  if (currentContent.length > 0) {
377
619
  finishPage();
@@ -382,12 +624,13 @@ var DocxodusPagination = (() => {
382
624
  }
383
625
  }
384
626
  finishPage();
627
+ this.pendingFootnoteContinuation = nextPageContinuation;
385
628
  return pages;
386
629
  }
387
630
  /**
388
631
  * Creates a page container element.
389
632
  */
390
- createPage(dims, pageNumber, sectionIndex, content, pageInSection, footnoteIds = []) {
633
+ createPage(dims, pageNumber, sectionIndex, content, pageInSection, footnoteIds = [], continuation, partialFootnotes) {
391
634
  const pageBox = document.createElement("div");
392
635
  pageBox.className = `${this.cssPrefix}box`;
393
636
  pageBox.style.width = `${dims.pageWidth}pt`;
@@ -441,8 +684,9 @@ var DocxodusPagination = (() => {
441
684
  contentArea.appendChild(el);
442
685
  }
443
686
  pageBox.appendChild(contentArea);
444
- if (footnoteIds.length > 0) {
445
- this.addPageFootnotes(pageBox, footnoteIds, dims);
687
+ const hasContinuation = continuation && continuation.remainingElements.length > 0;
688
+ if (footnoteIds.length > 0 || hasContinuation) {
689
+ this.addPageFootnotes(pageBox, footnoteIds, dims, continuation, partialFootnotes);
446
690
  }
447
691
  const footerSource = this.selectFooter(sectionIndex, pageInSection, pageNumber);
448
692
  if (footerSource) {
@@ -123,6 +123,7 @@ export declare class PaginationEngine {
123
123
  private pageGap;
124
124
  private hfRegistry;
125
125
  private footnoteRegistry;
126
+ private pendingFootnoteContinuation;
126
127
  /**
127
128
  * Creates a new pagination engine.
128
129
  *
@@ -156,10 +157,26 @@ export declare class PaginationEngine {
156
157
  /**
157
158
  * Measures the height of footnotes for given IDs (in points).
158
159
  * Creates a temporary container to measure the footnotes.
160
+ * @param footnoteIds - IDs of footnotes to measure
161
+ * @param contentWidth - Width for measurement
162
+ * @param continuation - Optional continuation content to include first
159
163
  */
160
164
  private measureFootnotesHeight;
161
165
  /**
162
- * Adds footnotes to a page container.
166
+ * Measures the height of just the continuation content (in points).
167
+ */
168
+ private measureContinuationHeight;
169
+ /**
170
+ * Splits a footnote element into parts that fit within the available height.
171
+ * Returns the elements that fit and the elements that need to continue.
172
+ */
173
+ private splitFootnoteToFit;
174
+ /**
175
+ * Measures a single footnote's height.
176
+ */
177
+ private measureSingleFootnoteHeight;
178
+ /**
179
+ * Adds footnotes to a page container, including continuation content.
163
180
  */
164
181
  private addPageFootnotes;
165
182
  /**
@@ -173,6 +190,7 @@ export declare class PaginationEngine {
173
190
  /**
174
191
  * Flows measured blocks into page containers.
175
192
  * Implements a single-pass, forward-only algorithm that is compatible with future lazy loading.
193
+ * Supports footnote continuation - long footnotes can split across pages.
176
194
  */
177
195
  private flowToPages;
178
196
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,YAAY,EAAE,MAAM,CAAC;IACrB,yDAAyD;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,8BAA8B;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,UA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footnotes can occupy
12
+ // This allows footnotes to expand upward into body content space when needed
13
+ const MAX_FOOTNOTE_AREA_RATIO = 0.6; // 60% of content height
14
+ // Minimum body content height per page (to avoid pages with only footnotes)
15
+ const MIN_BODY_CONTENT_HEIGHT = 72; // 1 inch minimum body content
11
16
  /**
12
17
  * Converts pixels to points (assuming 96 DPI screen).
13
18
  */
@@ -58,6 +63,7 @@ export class PaginationEngine {
58
63
  * @param options - Pagination options
59
64
  */
60
65
  constructor(staging, container, options = {}) {
66
+ this.pendingFootnoteContinuation = null;
61
67
  this.stagingElement =
62
68
  typeof staging === "string"
63
69
  ? document.getElementById(staging)
@@ -231,9 +237,13 @@ export class PaginationEngine {
231
237
  /**
232
238
  * Measures the height of footnotes for given IDs (in points).
233
239
  * Creates a temporary container to measure the footnotes.
240
+ * @param footnoteIds - IDs of footnotes to measure
241
+ * @param contentWidth - Width for measurement
242
+ * @param continuation - Optional continuation content to include first
234
243
  */
235
- measureFootnotesHeight(footnoteIds, contentWidth) {
236
- if (footnoteIds.length === 0 || this.footnoteRegistry.size === 0) {
244
+ measureFootnotesHeight(footnoteIds, contentWidth, continuation) {
245
+ const hasContinuation = continuation && continuation.remainingElements.length > 0;
246
+ if ((footnoteIds.length === 0 && !hasContinuation) || this.footnoteRegistry.size === 0) {
237
247
  return 0;
238
248
  }
239
249
  // Create a temporary measurement container
@@ -245,6 +255,15 @@ export class PaginationEngine {
245
255
  // Add separator line (same as will be rendered)
246
256
  const hr = document.createElement("hr");
247
257
  measureContainer.appendChild(hr);
258
+ // Add continuation content first (if any)
259
+ if (hasContinuation) {
260
+ const contWrapper = document.createElement("div");
261
+ contWrapper.className = "footnote-continuation";
262
+ for (const el of continuation.remainingElements) {
263
+ contWrapper.appendChild(el.cloneNode(true));
264
+ }
265
+ measureContainer.appendChild(contWrapper);
266
+ }
248
267
  // Add footnotes
249
268
  for (const id of footnoteIds) {
250
269
  const footnote = this.footnoteRegistry.get(id);
@@ -262,12 +281,121 @@ export class PaginationEngine {
262
281
  return heightPt;
263
282
  }
264
283
  /**
265
- * Adds footnotes to a page container.
284
+ * Measures the height of just the continuation content (in points).
285
+ */
286
+ measureContinuationHeight(continuation, contentWidth) {
287
+ if (!continuation || continuation.remainingElements.length === 0) {
288
+ return 0;
289
+ }
290
+ const measureContainer = document.createElement("div");
291
+ measureContainer.style.position = "absolute";
292
+ measureContainer.style.visibility = "hidden";
293
+ measureContainer.style.width = `${contentWidth}pt`;
294
+ measureContainer.style.left = "-9999px";
295
+ // Add separator line
296
+ const hr = document.createElement("hr");
297
+ measureContainer.appendChild(hr);
298
+ // Add continuation content
299
+ for (const el of continuation.remainingElements) {
300
+ measureContainer.appendChild(el.cloneNode(true));
301
+ }
302
+ this.stagingElement.appendChild(measureContainer);
303
+ const rect = measureContainer.getBoundingClientRect();
304
+ const heightPt = pxToPt(rect.height);
305
+ this.stagingElement.removeChild(measureContainer);
306
+ return heightPt;
307
+ }
308
+ /**
309
+ * Splits a footnote element into parts that fit within the available height.
310
+ * Returns the elements that fit and the elements that need to continue.
311
+ */
312
+ splitFootnoteToFit(footnoteElement, availableHeightPt, contentWidth) {
313
+ // Get child elements (paragraphs) of the footnote content
314
+ const footnoteContent = footnoteElement.querySelector(".footnote-content");
315
+ if (!footnoteContent) {
316
+ // No content structure, can't split - return whole footnote
317
+ return { fits: [footnoteElement.cloneNode(true)], overflow: [] };
318
+ }
319
+ const children = Array.from(footnoteContent.children);
320
+ if (children.length <= 1) {
321
+ // Single paragraph, can't split at paragraph level
322
+ return { fits: [footnoteElement.cloneNode(true)], overflow: [] };
323
+ }
324
+ const fits = [];
325
+ const overflow = [];
326
+ let currentHeight = 0;
327
+ // Measure separator line height
328
+ const hrMeasure = document.createElement("div");
329
+ hrMeasure.style.position = "absolute";
330
+ hrMeasure.style.visibility = "hidden";
331
+ hrMeasure.style.width = `${contentWidth}pt`;
332
+ hrMeasure.style.left = "-9999px";
333
+ const hr = document.createElement("hr");
334
+ hrMeasure.appendChild(hr);
335
+ this.stagingElement.appendChild(hrMeasure);
336
+ const hrHeight = pxToPt(hrMeasure.getBoundingClientRect().height);
337
+ this.stagingElement.removeChild(hrMeasure);
338
+ currentHeight = hrHeight;
339
+ // Also account for footnote number
340
+ const footnoteNumber = footnoteElement.querySelector(".footnote-number");
341
+ for (let i = 0; i < children.length; i++) {
342
+ const child = children[i];
343
+ // Measure this element
344
+ const measureContainer = document.createElement("div");
345
+ measureContainer.style.position = "absolute";
346
+ measureContainer.style.visibility = "hidden";
347
+ measureContainer.style.width = `${contentWidth}pt`;
348
+ measureContainer.style.left = "-9999px";
349
+ measureContainer.appendChild(child.cloneNode(true));
350
+ this.stagingElement.appendChild(measureContainer);
351
+ const childHeight = pxToPt(measureContainer.getBoundingClientRect().height);
352
+ this.stagingElement.removeChild(measureContainer);
353
+ if (currentHeight + childHeight <= availableHeightPt) {
354
+ fits.push(child.cloneNode(true));
355
+ currentHeight += childHeight;
356
+ }
357
+ else {
358
+ // This and remaining elements overflow
359
+ for (let j = i; j < children.length; j++) {
360
+ overflow.push(children[j].cloneNode(true));
361
+ }
362
+ break;
363
+ }
364
+ }
365
+ return { fits, overflow };
366
+ }
367
+ /**
368
+ * Measures a single footnote's height.
369
+ */
370
+ measureSingleFootnoteHeight(footnoteId, contentWidth) {
371
+ const footnote = this.footnoteRegistry.get(footnoteId);
372
+ if (!footnote)
373
+ return 0;
374
+ const measureContainer = document.createElement("div");
375
+ measureContainer.style.position = "absolute";
376
+ measureContainer.style.visibility = "hidden";
377
+ measureContainer.style.width = `${contentWidth}pt`;
378
+ measureContainer.style.left = "-9999px";
379
+ measureContainer.appendChild(footnote.cloneNode(true));
380
+ this.stagingElement.appendChild(measureContainer);
381
+ const rect = measureContainer.getBoundingClientRect();
382
+ const heightPt = pxToPt(rect.height);
383
+ this.stagingElement.removeChild(measureContainer);
384
+ return heightPt;
385
+ }
386
+ /**
387
+ * Adds footnotes to a page container, including continuation content.
266
388
  */
267
- addPageFootnotes(pageBox, footnoteIds, dims) {
268
- if (footnoteIds.length === 0 || this.footnoteRegistry.size === 0) {
389
+ addPageFootnotes(pageBox, footnoteIds, dims, continuation, partialFootnotes) {
390
+ const hasContinuation = continuation && continuation.remainingElements.length > 0;
391
+ if (footnoteIds.length === 0 && !hasContinuation) {
392
+ return;
393
+ }
394
+ if (this.footnoteRegistry.size === 0 && !hasContinuation) {
269
395
  return;
270
396
  }
397
+ // Create a set of partial footnote IDs for quick lookup
398
+ const partialFootnoteIds = new Set(partialFootnotes?.map(p => p.footnoteId) || []);
271
399
  const footnotesDiv = document.createElement("div");
272
400
  footnotesDiv.className = `${this.cssPrefix}footnotes`;
273
401
  footnotesDiv.style.position = "absolute";
@@ -278,11 +406,47 @@ export class PaginationEngine {
278
406
  // Add separator line
279
407
  const hr = document.createElement("hr");
280
408
  footnotesDiv.appendChild(hr);
409
+ // Add continuation content first (if any)
410
+ if (hasContinuation) {
411
+ const contWrapper = document.createElement("div");
412
+ contWrapper.className = "footnote-continuation";
413
+ for (const el of continuation.remainingElements) {
414
+ contWrapper.appendChild(el.cloneNode(true));
415
+ }
416
+ footnotesDiv.appendChild(contWrapper);
417
+ }
281
418
  // Clone footnotes in order of appearance
282
419
  for (const id of footnoteIds) {
283
- const footnote = this.footnoteRegistry.get(id);
284
- if (footnote) {
285
- footnotesDiv.appendChild(footnote.cloneNode(true));
420
+ // Check if this is a partial footnote
421
+ const partial = partialFootnotes?.find(p => p.footnoteId === id);
422
+ if (partial) {
423
+ // Render partial footnote (only the fitting elements)
424
+ const footnote = this.footnoteRegistry.get(id);
425
+ if (footnote) {
426
+ const partialDiv = document.createElement("div");
427
+ partialDiv.className = "footnote-item";
428
+ partialDiv.dataset.footnoteId = id;
429
+ // Add footnote number
430
+ const numberSpan = footnote.querySelector(".footnote-number");
431
+ if (numberSpan) {
432
+ partialDiv.appendChild(numberSpan.cloneNode(true));
433
+ }
434
+ // Add only the fitting content
435
+ const contentSpan = document.createElement("span");
436
+ contentSpan.className = "footnote-content";
437
+ for (const el of partial.fittingElements) {
438
+ contentSpan.appendChild(el.cloneNode(true));
439
+ }
440
+ partialDiv.appendChild(contentSpan);
441
+ footnotesDiv.appendChild(partialDiv);
442
+ }
443
+ }
444
+ else {
445
+ // Render full footnote from registry
446
+ const footnote = this.footnoteRegistry.get(id);
447
+ if (footnote) {
448
+ footnotesDiv.appendChild(footnote.cloneNode(true));
449
+ }
286
450
  }
287
451
  }
288
452
  pageBox.appendChild(footnotesDiv);
@@ -326,6 +490,7 @@ export class PaginationEngine {
326
490
  /**
327
491
  * Flows measured blocks into page containers.
328
492
  * Implements a single-pass, forward-only algorithm that is compatible with future lazy loading.
493
+ * Supports footnote continuation - long footnotes can split across pages.
329
494
  */
330
495
  flowToPages(blocks, dims, startPageNumber, sectionIndex) {
331
496
  const pages = [];
@@ -340,10 +505,20 @@ export class PaginationEngine {
340
505
  let currentFootnoteIds = [];
341
506
  // Track height consumed by footnotes on current page
342
507
  let currentFootnoteHeight = 0;
508
+ // Track footnote continuation for current page (from previous page)
509
+ let currentContinuation = this.pendingFootnoteContinuation;
510
+ // Track any new continuation that will carry to next page
511
+ let nextPageContinuation = null;
512
+ // Track partial footnotes for current page (footnotes that were split)
513
+ let currentPartialFootnotes = [];
514
+ // Account for any continuation from previous section/page
515
+ if (currentContinuation && currentContinuation.remainingElements.length > 0) {
516
+ currentFootnoteHeight = this.measureContinuationHeight(currentContinuation, dims.contentWidth);
517
+ }
343
518
  const finishPage = () => {
344
- if (currentContent.length === 0)
519
+ if (currentContent.length === 0 && !currentContinuation)
345
520
  return;
346
- const page = this.createPage(dims, pageNumber, sectionIndex, currentContent, pageInSection, currentFootnoteIds);
521
+ const page = this.createPage(dims, pageNumber, sectionIndex, currentContent, pageInSection, currentFootnoteIds, currentContinuation, currentPartialFootnotes.length > 0 ? currentPartialFootnotes : undefined);
347
522
  pages.push(page);
348
523
  pageNumber++;
349
524
  pageInSection++;
@@ -351,7 +526,17 @@ export class PaginationEngine {
351
526
  remainingHeight = dims.contentHeight;
352
527
  prevMarginBottomPt = 0; // Reset margin tracking for new page
353
528
  currentFootnoteIds = []; // Reset footnotes for new page
354
- currentFootnoteHeight = 0;
529
+ currentPartialFootnotes = []; // Reset partial footnotes for new page
530
+ // Carry over continuation to next page
531
+ currentContinuation = nextPageContinuation;
532
+ nextPageContinuation = null;
533
+ // Account for continuation height on new page
534
+ if (currentContinuation && currentContinuation.remainingElements.length > 0) {
535
+ currentFootnoteHeight = this.measureContinuationHeight(currentContinuation, dims.contentWidth);
536
+ }
537
+ else {
538
+ currentFootnoteHeight = 0;
539
+ }
355
540
  };
356
541
  for (let i = 0; i < blocks.length; i++) {
357
542
  const block = blocks[i];
@@ -373,8 +558,9 @@ export class PaginationEngine {
373
558
  let additionalFootnoteHeight = 0;
374
559
  if (newFootnoteIds.length > 0 && this.footnoteRegistry.size > 0) {
375
560
  // Measure the combined height of all footnotes that would be on this page
561
+ // (including any continuation)
376
562
  const combinedFootnoteIds = [...currentFootnoteIds, ...newFootnoteIds];
377
- const totalFootnoteHeight = this.measureFootnotesHeight(combinedFootnoteIds, dims.contentWidth);
563
+ const totalFootnoteHeight = this.measureFootnotesHeight(combinedFootnoteIds, dims.contentWidth, currentContinuation);
378
564
  additionalFootnoteHeight = totalFootnoteHeight - currentFootnoteHeight;
379
565
  }
380
566
  // Calculate the effective height this block will consume
@@ -397,9 +583,13 @@ export class PaginationEngine {
397
583
  }
398
584
  // Effective remaining height (content area minus footnotes already on page)
399
585
  const effectiveRemainingHeight = remainingHeight - currentFootnoteHeight;
586
+ // Calculate maximum footnote area for this page (can expand into body content space)
587
+ const bodyContentUsed = dims.contentHeight - remainingHeight;
588
+ const maxFootnoteArea = dims.contentHeight * MAX_FOOTNOTE_AREA_RATIO;
589
+ const maxFootnoteExpansion = Math.max(0, maxFootnoteArea - currentFootnoteHeight);
400
590
  // Check if block fits on current page (including its footnotes)
401
591
  if (blockSpace <= effectiveRemainingHeight) {
402
- // Block fits
592
+ // Block fits with current footnote allocation
403
593
  currentContent.push(block.element.cloneNode(true));
404
594
  remainingHeight -= (effectiveMarginTop + block.heightPt + block.marginBottomPt);
405
595
  prevMarginBottomPt = block.marginBottomPt;
@@ -409,20 +599,121 @@ export class PaginationEngine {
409
599
  currentFootnoteHeight += additionalFootnoteHeight;
410
600
  }
411
601
  }
412
- else if (block.heightPt + block.marginTopPt + block.marginBottomPt + additionalFootnoteHeight <= dims.contentHeight) {
413
- // Block doesn't fit but will fit on a new page
414
- finishPage();
415
- // On new page, recalculate footnote height for just this block's footnotes
416
- const newPageFootnoteHeight = blockFootnoteIds.length > 0
417
- ? this.measureFootnotesHeight(blockFootnoteIds, dims.contentWidth)
418
- : 0;
419
- // Include full top margin
420
- const newPageSpace = block.marginTopPt + block.heightPt + block.marginBottomPt;
421
- currentContent.push(block.element.cloneNode(true));
422
- remainingHeight = dims.contentHeight - newPageSpace;
423
- prevMarginBottomPt = block.marginBottomPt;
424
- currentFootnoteIds = [...blockFootnoteIds];
425
- currentFootnoteHeight = newPageFootnoteHeight;
602
+ else if (block.heightPt + block.marginTopPt + block.marginBottomPt <= dims.contentHeight) {
603
+ // Block doesn't fit with current allocation - try expanding footnote area
604
+ const blockSpaceWithoutFootnotes = effectiveMarginTop + block.heightPt + block.marginBottomPt;
605
+ // Check if block fits if we expand footnote area
606
+ // We can expand footnotes up to maxFootnoteArea, leaving room for body content
607
+ const minBodySpaceNeeded = bodyContentUsed + blockSpaceWithoutFootnotes + MIN_BODY_CONTENT_HEIGHT;
608
+ const canExpandFootnotes = minBodySpaceNeeded <= dims.contentHeight;
609
+ if (newFootnoteIds.length > 0 && blockSpaceWithoutFootnotes <= effectiveRemainingHeight) {
610
+ // Block itself fits, but footnotes don't - expand footnote area
611
+ currentContent.push(block.element.cloneNode(true));
612
+ remainingHeight -= (effectiveMarginTop + block.heightPt + block.marginBottomPt);
613
+ prevMarginBottomPt = block.marginBottomPt;
614
+ // Calculate EXPANDED space available for footnotes
615
+ // Footnotes can take up to maxFootnoteArea or all remaining space, whichever is less
616
+ const availableForFootnotes = Math.min(maxFootnoteArea, dims.contentHeight - bodyContentUsed - blockSpaceWithoutFootnotes);
617
+ // Try to fit as much of each new footnote as possible in expanded area
618
+ for (const footnoteId of newFootnoteIds) {
619
+ const footnote = this.footnoteRegistry.get(footnoteId);
620
+ if (!footnote)
621
+ continue;
622
+ const footnoteHeight = this.measureSingleFootnoteHeight(footnoteId, dims.contentWidth);
623
+ const spaceLeftForFootnotes = availableForFootnotes - currentFootnoteHeight;
624
+ if (footnoteHeight <= spaceLeftForFootnotes) {
625
+ // Whole footnote fits in expanded area
626
+ currentFootnoteIds.push(footnoteId);
627
+ currentFootnoteHeight += footnoteHeight;
628
+ }
629
+ else {
630
+ // Footnote needs to be split - use all available expanded space
631
+ if (spaceLeftForFootnotes > 20) { // Minimum space to start a footnote
632
+ const { fits, overflow } = this.splitFootnoteToFit(footnote, spaceLeftForFootnotes, dims.contentWidth);
633
+ if (fits.length > 0) {
634
+ // Add partial footnote to current page
635
+ currentFootnoteIds.push(footnoteId);
636
+ currentPartialFootnotes.push({
637
+ footnoteId,
638
+ fittingElements: fits
639
+ });
640
+ nextPageContinuation = {
641
+ footnoteId,
642
+ remainingElements: overflow
643
+ };
644
+ currentFootnoteHeight = availableForFootnotes;
645
+ }
646
+ else {
647
+ // Nothing fits, entire footnote continues to next page
648
+ nextPageContinuation = {
649
+ footnoteId,
650
+ remainingElements: Array.from(footnote.querySelectorAll(".footnote-content > *"))
651
+ .map(el => el.cloneNode(true))
652
+ };
653
+ if (nextPageContinuation.remainingElements.length === 0) {
654
+ nextPageContinuation.remainingElements = [footnote.cloneNode(true)];
655
+ }
656
+ }
657
+ }
658
+ else {
659
+ // Not enough space to start footnote - continue whole thing
660
+ nextPageContinuation = {
661
+ footnoteId,
662
+ remainingElements: Array.from(footnote.querySelectorAll(".footnote-content > *"))
663
+ .map(el => el.cloneNode(true))
664
+ };
665
+ if (nextPageContinuation.remainingElements.length === 0) {
666
+ nextPageContinuation.remainingElements = [footnote.cloneNode(true)];
667
+ }
668
+ }
669
+ }
670
+ }
671
+ }
672
+ else if (canExpandFootnotes && newFootnoteIds.length > 0) {
673
+ // Block doesn't fit with current layout, but might fit if we expand footnote area first
674
+ // This handles the case where we need to give footnotes more space BEFORE adding the block
675
+ // First, try to fit more of current footnotes by expanding the area
676
+ // Then check if the block fits in reduced body space
677
+ const expandedFootnoteSpace = Math.min(maxFootnoteArea, additionalFootnoteHeight + currentFootnoteHeight);
678
+ const bodySpaceAfterExpansion = dims.contentHeight - expandedFootnoteSpace;
679
+ if (blockSpaceWithoutFootnotes <= bodySpaceAfterExpansion - bodyContentUsed) {
680
+ // Block fits after expanding footnote area
681
+ currentContent.push(block.element.cloneNode(true));
682
+ remainingHeight = bodySpaceAfterExpansion - bodyContentUsed - blockSpaceWithoutFootnotes;
683
+ prevMarginBottomPt = block.marginBottomPt;
684
+ currentFootnoteIds.push(...newFootnoteIds);
685
+ currentFootnoteHeight = expandedFootnoteSpace;
686
+ }
687
+ else {
688
+ // Still doesn't fit - start new page
689
+ finishPage();
690
+ const newPageFootnoteHeight = blockFootnoteIds.length > 0
691
+ ? this.measureFootnotesHeight(blockFootnoteIds, dims.contentWidth, currentContinuation)
692
+ : (currentContinuation ? this.measureContinuationHeight(currentContinuation, dims.contentWidth) : 0);
693
+ const newPageSpace = block.marginTopPt + block.heightPt + block.marginBottomPt;
694
+ currentContent.push(block.element.cloneNode(true));
695
+ remainingHeight = dims.contentHeight - newPageSpace;
696
+ prevMarginBottomPt = block.marginBottomPt;
697
+ currentFootnoteIds = [...blockFootnoteIds];
698
+ currentFootnoteHeight = newPageFootnoteHeight;
699
+ }
700
+ }
701
+ else {
702
+ // Block itself doesn't fit - start new page
703
+ finishPage();
704
+ // On new page, recalculate footnote height for just this block's footnotes
705
+ // (plus any continuation from previous page)
706
+ const newPageFootnoteHeight = blockFootnoteIds.length > 0
707
+ ? this.measureFootnotesHeight(blockFootnoteIds, dims.contentWidth, currentContinuation)
708
+ : (currentContinuation ? this.measureContinuationHeight(currentContinuation, dims.contentWidth) : 0);
709
+ // Include full top margin
710
+ const newPageSpace = block.marginTopPt + block.heightPt + block.marginBottomPt;
711
+ currentContent.push(block.element.cloneNode(true));
712
+ remainingHeight = dims.contentHeight - newPageSpace;
713
+ prevMarginBottomPt = block.marginBottomPt;
714
+ currentFootnoteIds = [...blockFootnoteIds];
715
+ currentFootnoteHeight = newPageFootnoteHeight;
716
+ }
426
717
  }
427
718
  else {
428
719
  // Block is taller than a page - add it and let it overflow
@@ -437,12 +728,14 @@ export class PaginationEngine {
437
728
  }
438
729
  // Finish last page
439
730
  finishPage();
731
+ // Store any remaining continuation for next section
732
+ this.pendingFootnoteContinuation = nextPageContinuation;
440
733
  return pages;
441
734
  }
442
735
  /**
443
736
  * Creates a page container element.
444
737
  */
445
- createPage(dims, pageNumber, sectionIndex, content, pageInSection, footnoteIds = []) {
738
+ createPage(dims, pageNumber, sectionIndex, content, pageInSection, footnoteIds = [], continuation, partialFootnotes) {
446
739
  // Create page box at full size, then scale the entire box
447
740
  // This ensures proper clipping and consistent scaling of all elements
448
741
  const pageBox = document.createElement("div");
@@ -511,9 +804,10 @@ export class PaginationEngine {
511
804
  contentArea.appendChild(el);
512
805
  }
513
806
  pageBox.appendChild(contentArea);
514
- // Add footnotes if any references appear on this page
515
- if (footnoteIds.length > 0) {
516
- this.addPageFootnotes(pageBox, footnoteIds, dims);
807
+ // Add footnotes if any references appear on this page (or continuation from previous)
808
+ const hasContinuation = continuation && continuation.remainingElements.length > 0;
809
+ if (footnoteIds.length > 0 || hasContinuation) {
810
+ this.addPageFootnotes(pageBox, footnoteIds, dims, continuation, partialFootnotes);
517
811
  }
518
812
  // Add footer if available for this section/page
519
813
  const footerSource = this.selectFooter(sectionIndex, pageInSection, pageNumber);
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.js","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA+GH,yDAAyD;AACzD,MAAM,kBAAkB,GAAG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AAC,CAAC;IACrE,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;AAC3B,CAAC"}
Binary file
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "mainAssemblyName": "DocxodusWasm.dll",
3
3
  "resources": {
4
- "hash": "sha256-P32xSIvA3tYByp2MpFMtks8DzXj+JZkm9OJj8VGEzOE=",
4
+ "hash": "sha256-l43J2mRF8GAdodHg0mzqawPwky8fbeBxt8Zns80wiss=",
5
5
  "jsModuleNative": {
6
6
  "dotnet.native.js": "sha256-YLwjs9CPwrZG7YKULjmqr5bYsmhxwcWJOhQNM4bG6Gc="
7
7
  },
@@ -17,8 +17,8 @@
17
17
  "assembly": {
18
18
  "DocumentFormat.OpenXml.wasm": "sha256-edAN2rIA7QQ8K5qp1o5QXplt8M80fEiVmuMgT/MBmLM=",
19
19
  "DocumentFormat.OpenXml.Framework.wasm": "sha256-CFdrD1dSpnkcOk0gxZcKb2T5p+q2ck9ivs+TOML6Jmw=",
20
- "Docxodus.wasm": "sha256-dz1pKwjvSqtjV6Ol4pB7LMny6xgHPUw3U/ruXt0ayAw=",
21
- "DocxodusWasm.wasm": "sha256-iwUdChc7ew6Xv4XER/NAlFUHkIqyIeuhWB0LKgAn3zM=",
20
+ "Docxodus.wasm": "sha256-q0XFWQK2FvlNWusXaLV+DEvTw+/yYWYU+6EZ3pHBIew=",
21
+ "DocxodusWasm.wasm": "sha256-chPel5a0i1lnb5SxManV1tQl+6YWOEy8MkaJl/TxxY4=",
22
22
  "SkiaSharp.wasm": "sha256-U6RbqUVBn8Vx8qpghJC5+r/DC1NSBY+EIRDxP8o6dsk=",
23
23
  "System.Collections.Concurrent.wasm": "sha256-xXJbJWNeQ2DSYvAGUoUHjF9y4Iajv2ed0eACOxWD19U=",
24
24
  "System.Collections.wasm": "sha256-mNLhFaXT8X16KYjUVNFYwcdw0h3BUjgD427TR5IWVKU=",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docxodus",
3
- "version": "3.8.0",
3
+ "version": "3.8.2",
4
4
  "description": "DOCX document comparison and HTML conversion in the browser using WebAssembly",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",