@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.cjs
CHANGED
|
@@ -42881,16 +42881,28 @@ ${currentText.slice(end)}`;
|
|
|
42881
42881
|
boxSizing: "border-box",
|
|
42882
42882
|
zIndex: 0
|
|
42883
42883
|
} : void 0;
|
|
42884
|
+
const pageTrackedChanges = positionedTrackedChangesByPage[pageIndex] ?? [];
|
|
42885
|
+
const pageGutterContentHeightPx = showTrackedChangeGutter && pageTrackedChanges.length > 0 ? pageTrackedChanges.reduce((maxBottomPx, entry) => {
|
|
42886
|
+
return Math.max(
|
|
42887
|
+
maxBottomPx,
|
|
42888
|
+
Math.ceil(
|
|
42889
|
+
entry.top + entry.heightPx + TRACKED_CHANGE_GUTTER_CARD_GAP_PX + 8
|
|
42890
|
+
)
|
|
42891
|
+
);
|
|
42892
|
+
}, pageLayout.pageHeightPx) : pageLayout.pageHeightPx;
|
|
42893
|
+
const pageVisualHeightPx = Math.max(
|
|
42894
|
+
pageLayout.pageHeightPx,
|
|
42895
|
+
pageGutterContentHeightPx
|
|
42896
|
+
);
|
|
42884
42897
|
const pageSurfaceStyle = {
|
|
42885
42898
|
...pageSurfaceBaseStyle,
|
|
42886
42899
|
width: pageLayout.pageWidthPx,
|
|
42887
|
-
height:
|
|
42888
|
-
minHeight:
|
|
42900
|
+
height: pageVisualHeightPx,
|
|
42901
|
+
minHeight: pageVisualHeightPx,
|
|
42889
42902
|
backgroundColor: resolvedPageSurfaceBackgroundColor,
|
|
42890
42903
|
position: "relative",
|
|
42891
42904
|
...pageMarginPaddingStyle(pageLayout.marginsPx)
|
|
42892
42905
|
};
|
|
42893
|
-
const pageTrackedChanges = positionedTrackedChangesByPage[pageIndex] ?? [];
|
|
42894
42906
|
const pageCoverBackgroundImages = (() => {
|
|
42895
42907
|
const collected = /* @__PURE__ */ new Map();
|
|
42896
42908
|
const pageContentHeightPx = Math.max(
|
|
@@ -42938,7 +42950,7 @@ ${currentText.slice(end)}`;
|
|
|
42938
42950
|
style: {
|
|
42939
42951
|
position: "relative",
|
|
42940
42952
|
width: pageWrapperWidthPx,
|
|
42941
|
-
minHeight:
|
|
42953
|
+
minHeight: pageVisualHeightPx,
|
|
42942
42954
|
margin: "0 auto",
|
|
42943
42955
|
// Isolate per-page layout/style recalculation so scrolling and
|
|
42944
42956
|
// edits on one page don't force whole-document layout passes.
|
|
@@ -43987,7 +43999,7 @@ ${currentText.slice(end)}`;
|
|
|
43987
43999
|
left: pageLayout.pageWidthPx,
|
|
43988
44000
|
top: 0,
|
|
43989
44001
|
width: TRACKED_CHANGE_GUTTER_WIDTH_PX,
|
|
43990
|
-
height:
|
|
44002
|
+
height: pageVisualHeightPx,
|
|
43991
44003
|
backgroundColor: resolvedPageSurfaceBackgroundColor,
|
|
43992
44004
|
pointerEvents: "none",
|
|
43993
44005
|
overflow: "visible"
|
|
@@ -44010,8 +44022,8 @@ ${currentText.slice(end)}`;
|
|
|
44010
44022
|
"svg",
|
|
44011
44023
|
{
|
|
44012
44024
|
width: pageLayout.pageWidthPx + TRACKED_CHANGE_GUTTER_WIDTH_PX,
|
|
44013
|
-
height:
|
|
44014
|
-
viewBox: `0 0 ${pageLayout.pageWidthPx + TRACKED_CHANGE_GUTTER_WIDTH_PX} ${
|
|
44025
|
+
height: pageVisualHeightPx,
|
|
44026
|
+
viewBox: `0 0 ${pageLayout.pageWidthPx + TRACKED_CHANGE_GUTTER_WIDTH_PX} ${pageVisualHeightPx}`,
|
|
44015
44027
|
style: {
|
|
44016
44028
|
position: "absolute",
|
|
44017
44029
|
top: 0,
|
|
@@ -44051,7 +44063,7 @@ ${currentText.slice(end)}`;
|
|
|
44051
44063
|
const cardCenterY = clampNumber(
|
|
44052
44064
|
Math.round(entry.top + entry.heightPx / 2),
|
|
44053
44065
|
8,
|
|
44054
|
-
Math.max(8,
|
|
44066
|
+
Math.max(8, pageVisualHeightPx - 8)
|
|
44055
44067
|
);
|
|
44056
44068
|
const connectorPath = Math.abs(cardCenterY - anchorY) <= 2 ? `M ${anchorX} ${anchorY} H ${cardAttachX}` : `M ${anchorX} ${anchorY} H ${gutterBendX} V ${cardCenterY} H ${cardAttachX}`;
|
|
44057
44069
|
const revisionBarX = clampNumber(
|