@extend-ai/react-docx 0.7.3 → 0.7.4
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/dist/index.cjs +20 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41628,16 +41628,28 @@ ${currentText.slice(end)}`;
|
|
|
41628
41628
|
boxSizing: "border-box",
|
|
41629
41629
|
zIndex: 0
|
|
41630
41630
|
} : void 0;
|
|
41631
|
+
const pageTrackedChanges = positionedTrackedChangesByPage[pageIndex] ?? [];
|
|
41632
|
+
const pageGutterContentHeightPx = showTrackedChangeGutter && pageTrackedChanges.length > 0 ? pageTrackedChanges.reduce((maxBottomPx, entry) => {
|
|
41633
|
+
return Math.max(
|
|
41634
|
+
maxBottomPx,
|
|
41635
|
+
Math.ceil(
|
|
41636
|
+
entry.top + entry.heightPx + TRACKED_CHANGE_GUTTER_CARD_GAP_PX + 8
|
|
41637
|
+
)
|
|
41638
|
+
);
|
|
41639
|
+
}, pageLayout.pageHeightPx) : pageLayout.pageHeightPx;
|
|
41640
|
+
const pageVisualHeightPx = Math.max(
|
|
41641
|
+
pageLayout.pageHeightPx,
|
|
41642
|
+
pageGutterContentHeightPx
|
|
41643
|
+
);
|
|
41631
41644
|
const pageSurfaceStyle = {
|
|
41632
41645
|
...pageSurfaceBaseStyle,
|
|
41633
41646
|
width: pageLayout.pageWidthPx,
|
|
41634
|
-
height:
|
|
41635
|
-
minHeight:
|
|
41647
|
+
height: pageVisualHeightPx,
|
|
41648
|
+
minHeight: pageVisualHeightPx,
|
|
41636
41649
|
backgroundColor: resolvedPageSurfaceBackgroundColor,
|
|
41637
41650
|
position: "relative",
|
|
41638
41651
|
...pageMarginPaddingStyle(pageLayout.marginsPx)
|
|
41639
41652
|
};
|
|
41640
|
-
const pageTrackedChanges = positionedTrackedChangesByPage[pageIndex] ?? [];
|
|
41641
41653
|
const pageCoverBackgroundImages = (() => {
|
|
41642
41654
|
const collected = /* @__PURE__ */ new Map();
|
|
41643
41655
|
const pageContentHeightPx = Math.max(
|
|
@@ -41685,7 +41697,7 @@ ${currentText.slice(end)}`;
|
|
|
41685
41697
|
style: {
|
|
41686
41698
|
position: "relative",
|
|
41687
41699
|
width: pageWrapperWidthPx,
|
|
41688
|
-
minHeight:
|
|
41700
|
+
minHeight: pageVisualHeightPx,
|
|
41689
41701
|
margin: "0 auto",
|
|
41690
41702
|
// Isolate per-page layout/style recalculation so scrolling and
|
|
41691
41703
|
// edits on one page don't force whole-document layout passes.
|
|
@@ -42734,7 +42746,7 @@ ${currentText.slice(end)}`;
|
|
|
42734
42746
|
left: pageLayout.pageWidthPx,
|
|
42735
42747
|
top: 0,
|
|
42736
42748
|
width: TRACKED_CHANGE_GUTTER_WIDTH_PX,
|
|
42737
|
-
height:
|
|
42749
|
+
height: pageVisualHeightPx,
|
|
42738
42750
|
backgroundColor: resolvedPageSurfaceBackgroundColor,
|
|
42739
42751
|
pointerEvents: "none",
|
|
42740
42752
|
overflow: "visible"
|
|
@@ -42757,8 +42769,8 @@ ${currentText.slice(end)}`;
|
|
|
42757
42769
|
"svg",
|
|
42758
42770
|
{
|
|
42759
42771
|
width: pageLayout.pageWidthPx + TRACKED_CHANGE_GUTTER_WIDTH_PX,
|
|
42760
|
-
height:
|
|
42761
|
-
viewBox: `0 0 ${pageLayout.pageWidthPx + TRACKED_CHANGE_GUTTER_WIDTH_PX} ${
|
|
42772
|
+
height: pageVisualHeightPx,
|
|
42773
|
+
viewBox: `0 0 ${pageLayout.pageWidthPx + TRACKED_CHANGE_GUTTER_WIDTH_PX} ${pageVisualHeightPx}`,
|
|
42762
42774
|
style: {
|
|
42763
42775
|
position: "absolute",
|
|
42764
42776
|
top: 0,
|
|
@@ -42798,7 +42810,7 @@ ${currentText.slice(end)}`;
|
|
|
42798
42810
|
const cardCenterY = clampNumber(
|
|
42799
42811
|
Math.round(entry.top + entry.heightPx / 2),
|
|
42800
42812
|
8,
|
|
42801
|
-
Math.max(8,
|
|
42813
|
+
Math.max(8, pageVisualHeightPx - 8)
|
|
42802
42814
|
);
|
|
42803
42815
|
const connectorPath = Math.abs(cardCenterY - anchorY) <= 2 ? `M ${anchorX} ${anchorY} H ${cardAttachX}` : `M ${anchorX} ${anchorY} H ${gutterBendX} V ${cardCenterY} H ${cardAttachX}`;
|
|
42804
42816
|
const revisionBarX = clampNumber(
|