@pixldocs/canvas-renderer 0.5.330 → 0.5.332
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-DyarJoo_.cjs → index-B9Lpo1N6.cjs} +125 -47
- package/dist/index-B9Lpo1N6.cjs.map +1 -0
- package/dist/{index-B6Ucv-_d.js → index-xMYBX3BX.js} +125 -47
- package/dist/index-xMYBX3BX.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BIkOnJF2.js → vectorPdfExport-BE-V6kqQ.js} +4 -4
- package/dist/{vectorPdfExport-BIkOnJF2.js.map → vectorPdfExport-BE-V6kqQ.js.map} +1 -1
- package/dist/{vectorPdfExport-CJBVK7bd.cjs → vectorPdfExport-BnF6Lk4i.cjs} +4 -4
- package/dist/{vectorPdfExport-CJBVK7bd.cjs.map → vectorPdfExport-BnF6Lk4i.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-B6Ucv-_d.js.map +0 -1
- package/dist/index-DyarJoo_.cjs.map +0 -1
|
@@ -11178,6 +11178,15 @@ const bakeTextboxScaleIntoTypography = (obj, sourceElement) => {
|
|
|
11178
11178
|
};
|
|
11179
11179
|
return updates;
|
|
11180
11180
|
};
|
|
11181
|
+
const rotatedTopLeftToCenter = (left, top, width, height, angleDeg = 0) => {
|
|
11182
|
+
const angle = angleDeg * Math.PI / 180;
|
|
11183
|
+
const cos = Math.cos(angle);
|
|
11184
|
+
const sin = Math.sin(angle);
|
|
11185
|
+
return {
|
|
11186
|
+
x: left + width / 2 * cos - height / 2 * sin,
|
|
11187
|
+
y: top + width / 2 * sin + height / 2 * cos
|
|
11188
|
+
};
|
|
11189
|
+
};
|
|
11181
11190
|
function applyWarpAwareSelectionBorders(selection) {
|
|
11182
11191
|
var _a2;
|
|
11183
11192
|
if (selection.__pixldocsOrigASHasBorders !== void 0) {
|
|
@@ -13540,29 +13549,23 @@ const PageCanvas = react.forwardRef(
|
|
|
13540
13549
|
const getObjectFrameBoundsInSelection = (selection, obj, frameWidth, frameHeight) => {
|
|
13541
13550
|
const w = Math.max(1, frameWidth ?? obj.width ?? 1);
|
|
13542
13551
|
const h = Math.max(1, frameHeight ?? obj.height ?? 1);
|
|
13543
|
-
const originX = obj.originX ?? "left";
|
|
13544
|
-
const originY = obj.originY ?? "top";
|
|
13545
|
-
const localLeft = originX === "center" ? -w / 2 : originX === "right" ? -w : 0;
|
|
13546
|
-
const localTop = originY === "center" ? -h / 2 : originY === "bottom" ? -h : 0;
|
|
13547
13552
|
const matrix = fabric__namespace.util.multiplyTransformMatrices(
|
|
13548
13553
|
selection.calcTransformMatrix(),
|
|
13549
13554
|
obj.calcOwnMatrix()
|
|
13550
13555
|
);
|
|
13551
|
-
const
|
|
13552
|
-
|
|
13553
|
-
|
|
13554
|
-
|
|
13555
|
-
|
|
13556
|
-
|
|
13557
|
-
const
|
|
13558
|
-
const
|
|
13559
|
-
const left = Math.min(...xs);
|
|
13560
|
-
const top = Math.min(...ys);
|
|
13556
|
+
const decomposed = fabric__namespace.util.qrDecompose(matrix);
|
|
13557
|
+
const scaledW = Math.max(1, w * Math.abs(decomposed.scaleX || 1));
|
|
13558
|
+
const scaledH = Math.max(1, h * Math.abs(decomposed.scaleY || 1));
|
|
13559
|
+
const angleRad = (decomposed.angle ?? 0) * Math.PI / 180;
|
|
13560
|
+
const cos = Math.cos(angleRad);
|
|
13561
|
+
const sin = Math.sin(angleRad);
|
|
13562
|
+
const left = decomposed.translateX - scaledW / 2 * cos + scaledH / 2 * sin;
|
|
13563
|
+
const top = decomposed.translateY - scaledW / 2 * sin - scaledH / 2 * cos;
|
|
13561
13564
|
return {
|
|
13562
13565
|
left,
|
|
13563
13566
|
top,
|
|
13564
|
-
width:
|
|
13565
|
-
height:
|
|
13567
|
+
width: scaledW,
|
|
13568
|
+
height: scaledH
|
|
13566
13569
|
};
|
|
13567
13570
|
};
|
|
13568
13571
|
fabricCanvas.on("object:added", (e) => {
|
|
@@ -13758,7 +13761,10 @@ const PageCanvas = react.forwardRef(
|
|
|
13758
13761
|
const a = ((c.angle ?? 0) % 180 + 180) % 180;
|
|
13759
13762
|
return !(a < 0.5 || a > 179.5);
|
|
13760
13763
|
});
|
|
13761
|
-
|
|
13764
|
+
const selectionAngle = ((obj.angle ?? 0) % 180 + 180) % 180;
|
|
13765
|
+
const isSelectionRotated = !(selectionAngle < 0.5 || selectionAngle > 179.5);
|
|
13766
|
+
const shouldPinNonTextChildren = hasRotatedChild || isSelectionRotated;
|
|
13767
|
+
if ((isXSide || shouldPinNonTextChildren) && ((_b2 = groupShiftReflowSnapshotRef.current) == null ? void 0 : _b2.selection) !== obj) {
|
|
13762
13768
|
groupShiftReflowSnapshotRef.current = null;
|
|
13763
13769
|
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
13764
13770
|
if (logicalGroupId) {
|
|
@@ -13805,16 +13811,31 @@ const PageCanvas = react.forwardRef(
|
|
|
13805
13811
|
}
|
|
13806
13812
|
}
|
|
13807
13813
|
const childCounterScale = hasRotatedChild ? 1 : 1 / sAxis;
|
|
13814
|
+
let restoredNonTextAfterLayout = false;
|
|
13808
13815
|
const restoreNonTextChildren = (pins) => {
|
|
13809
13816
|
var _a3, _b3;
|
|
13810
|
-
if (!
|
|
13817
|
+
if (!shouldPinNonTextChildren || ((_a3 = groupShiftReflowSnapshotRef.current) == null ? void 0 : _a3.selection) !== obj) return;
|
|
13811
13818
|
for (const entry of groupShiftReflowSnapshotRef.current.children) {
|
|
13812
13819
|
const child = entry.obj;
|
|
13813
13820
|
if (child instanceof fabric__namespace.Textbox) continue;
|
|
13814
13821
|
if (child instanceof fabric__namespace.FabricImage || child instanceof fabric__namespace.Group && (child.__cropGroup || ((_b3 = child._ct) == null ? void 0 : _b3.isCropGroup))) {
|
|
13815
13822
|
const pin = pins == null ? void 0 : pins.get(child);
|
|
13816
|
-
|
|
13817
|
-
|
|
13823
|
+
let targetLeft = hasRotatedChild && isXSide ? entry.left0 * sAxis : entry.left0;
|
|
13824
|
+
let targetTop = hasRotatedChild && !isXSide ? entry.top0 * sAxis : entry.top0;
|
|
13825
|
+
if (pin == null ? void 0 : pin.worldCenter) {
|
|
13826
|
+
try {
|
|
13827
|
+
const invSelectionMatrix = fabric__namespace.util.invertTransform(obj.calcTransformMatrix());
|
|
13828
|
+
const localCenter = fabric__namespace.util.transformPoint(pin.worldCenter, invSelectionMatrix);
|
|
13829
|
+
targetLeft = localCenter.x;
|
|
13830
|
+
targetTop = localCenter.y;
|
|
13831
|
+
} catch {
|
|
13832
|
+
targetLeft = pin.left ?? targetLeft;
|
|
13833
|
+
targetTop = pin.top ?? targetTop;
|
|
13834
|
+
}
|
|
13835
|
+
} else {
|
|
13836
|
+
targetLeft = (pin == null ? void 0 : pin.left) ?? targetLeft;
|
|
13837
|
+
targetTop = (pin == null ? void 0 : pin.top) ?? targetTop;
|
|
13838
|
+
}
|
|
13818
13839
|
if (Math.abs((child.left ?? 0) - targetLeft) > 0.01) child._set("left", targetLeft);
|
|
13819
13840
|
if (Math.abs((child.top ?? 0) - targetTop) > 0.01) child._set("top", targetTop);
|
|
13820
13841
|
if (isXSide) child._set("scaleX", childCounterScale);
|
|
@@ -13834,17 +13855,54 @@ const PageCanvas = react.forwardRef(
|
|
|
13834
13855
|
};
|
|
13835
13856
|
for (const child of obj.getObjects()) {
|
|
13836
13857
|
if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_d = child._ct) == null ? void 0 : _d.isCropGroup))) {
|
|
13858
|
+
const ct = child.__cropData;
|
|
13859
|
+
if (ct) {
|
|
13860
|
+
if (child.__asLiveOrigW == null) {
|
|
13861
|
+
child.__asLiveOrigW = ct.frameW ?? child.width ?? 1;
|
|
13862
|
+
}
|
|
13863
|
+
if (child.__asLiveOrigH == null) {
|
|
13864
|
+
child.__asLiveOrigH = ct.frameH ?? child.height ?? 1;
|
|
13865
|
+
}
|
|
13866
|
+
if (isXSide) {
|
|
13867
|
+
const newW = Math.max(1, Number(child.__asLiveOrigW) * sAxis);
|
|
13868
|
+
ct.frameW = newW;
|
|
13869
|
+
child._set("width", newW);
|
|
13870
|
+
} else {
|
|
13871
|
+
const newH = Math.max(1, Number(child.__asLiveOrigH) * sAxis);
|
|
13872
|
+
ct.frameH = newH;
|
|
13873
|
+
child._set("height", newH);
|
|
13874
|
+
}
|
|
13875
|
+
try {
|
|
13876
|
+
updateCoverLayout(child);
|
|
13877
|
+
} catch {
|
|
13878
|
+
}
|
|
13879
|
+
}
|
|
13837
13880
|
if (isXSide) child._set("scaleX", childCounterScale);
|
|
13838
13881
|
else child._set("scaleY", childCounterScale);
|
|
13839
13882
|
child.setCoords();
|
|
13840
13883
|
child.dirty = true;
|
|
13884
|
+
didReflowTextChild = true;
|
|
13841
13885
|
continue;
|
|
13842
13886
|
}
|
|
13843
13887
|
if (child instanceof fabric__namespace.FabricImage && !child.__cropGroup && !child.smartElementType) {
|
|
13888
|
+
if (isXSide) {
|
|
13889
|
+
if (child.__asLiveOrigW == null) {
|
|
13890
|
+
child.__asLiveOrigW = (child.width ?? 0) * Math.abs(child.scaleX ?? 1);
|
|
13891
|
+
}
|
|
13892
|
+
const newW = Math.max(1, Number(child.__asLiveOrigW) * sAxis);
|
|
13893
|
+
child._set("width", newW);
|
|
13894
|
+
} else {
|
|
13895
|
+
if (child.__asLiveOrigH == null) {
|
|
13896
|
+
child.__asLiveOrigH = (child.height ?? 0) * Math.abs(child.scaleY ?? 1);
|
|
13897
|
+
}
|
|
13898
|
+
const newH = Math.max(1, Number(child.__asLiveOrigH) * sAxis);
|
|
13899
|
+
child._set("height", newH);
|
|
13900
|
+
}
|
|
13844
13901
|
if (isXSide) child._set("scaleX", childCounterScale);
|
|
13845
13902
|
else child._set("scaleY", childCounterScale);
|
|
13846
13903
|
child.setCoords();
|
|
13847
13904
|
child.dirty = true;
|
|
13905
|
+
didReflowTextChild = true;
|
|
13848
13906
|
continue;
|
|
13849
13907
|
}
|
|
13850
13908
|
if (!(child instanceof fabric__namespace.Textbox)) continue;
|
|
@@ -13883,7 +13941,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13883
13941
|
didReflowTextChild = true;
|
|
13884
13942
|
}
|
|
13885
13943
|
}
|
|
13886
|
-
if (isXSide && ((_e = groupShiftReflowSnapshotRef.current) == null ? void 0 : _e.selection) === obj) {
|
|
13944
|
+
if (isXSide && !shouldPinNonTextChildren && ((_e = groupShiftReflowSnapshotRef.current) == null ? void 0 : _e.selection) === obj) {
|
|
13887
13945
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
13888
13946
|
const anchorEntry = snap.children[0];
|
|
13889
13947
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
@@ -13916,12 +13974,17 @@ const PageCanvas = react.forwardRef(
|
|
|
13916
13974
|
if (cornersBefore) {
|
|
13917
13975
|
fixedMidBefore = corner === "ml" ? { x: (cornersBefore.tr.x + cornersBefore.br.x) / 2, y: (cornersBefore.tr.y + cornersBefore.br.y) / 2 } : { x: (cornersBefore.tl.x + cornersBefore.bl.x) / 2, y: (cornersBefore.tl.y + cornersBefore.bl.y) / 2 };
|
|
13918
13976
|
}
|
|
13919
|
-
const nonTextPinsBeforeLayout =
|
|
13977
|
+
const nonTextPinsBeforeLayout = shouldPinNonTextChildren ? new Map(obj.getObjects().map((child) => [child, {
|
|
13978
|
+
left: child.left ?? 0,
|
|
13979
|
+
top: child.top ?? 0,
|
|
13980
|
+
worldCenter: child instanceof fabric__namespace.Textbox ? void 0 : child.getCenterPoint()
|
|
13981
|
+
}])) : void 0;
|
|
13920
13982
|
try {
|
|
13921
13983
|
obj.triggerLayout();
|
|
13922
13984
|
} catch {
|
|
13923
13985
|
}
|
|
13924
13986
|
restoreNonTextChildren(nonTextPinsBeforeLayout);
|
|
13987
|
+
restoredNonTextAfterLayout = !!nonTextPinsBeforeLayout;
|
|
13925
13988
|
obj._set("width", asW0);
|
|
13926
13989
|
obj._set("scaleX", asSx0);
|
|
13927
13990
|
obj._set("scaleY", asSy0);
|
|
@@ -13947,7 +14010,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13947
14010
|
obj._set("left", asLeft0);
|
|
13948
14011
|
obj._set("top", asTop0);
|
|
13949
14012
|
}
|
|
13950
|
-
restoreNonTextChildren();
|
|
14013
|
+
if (!restoredNonTextAfterLayout) restoreNonTextChildren();
|
|
13951
14014
|
obj._set("width", asW0);
|
|
13952
14015
|
obj._set("scaleX", asSx0);
|
|
13953
14016
|
obj._set("scaleY", asSy0);
|
|
@@ -14403,8 +14466,9 @@ const PageCanvas = react.forwardRef(
|
|
|
14403
14466
|
const stateCrop = useEditorStore.getState();
|
|
14404
14467
|
const pageCrop = stateCrop.canvas.pages.find((p) => p.id === pageId);
|
|
14405
14468
|
const pageChildrenCrop = (pageCrop == null ? void 0 : pageCrop.children) ?? [];
|
|
14406
|
-
const
|
|
14407
|
-
const
|
|
14469
|
+
const angleRad = (active.angle ?? 0) * Math.PI / 180;
|
|
14470
|
+
const absLeft = (active.left ?? 0) - ct.frameW / 2 * Math.cos(angleRad) + ct.frameH / 2 * Math.sin(angleRad);
|
|
14471
|
+
const absTop = (active.top ?? 0) - ct.frameW / 2 * Math.sin(angleRad) - ct.frameH / 2 * Math.cos(angleRad);
|
|
14408
14472
|
const storePosCrop = absoluteToStorePosition(absLeft, absTop, objId, pageChildrenCrop);
|
|
14409
14473
|
updateElement2(objId, {
|
|
14410
14474
|
width: ct.frameW,
|
|
@@ -14765,14 +14829,22 @@ const PageCanvas = react.forwardRef(
|
|
|
14765
14829
|
} else {
|
|
14766
14830
|
const w = ((ct == null ? void 0 : ct.frameW) ?? obj.width ?? 0) * Math.abs(obj.scaleX ?? 1);
|
|
14767
14831
|
const h = ((ct == null ? void 0 : ct.frameH) ?? obj.height ?? 0) * Math.abs(obj.scaleY ?? 1);
|
|
14768
|
-
|
|
14769
|
-
|
|
14832
|
+
const angleRad = (decomposed.angle ?? obj.angle ?? 0) * Math.PI / 180;
|
|
14833
|
+
absoluteLeft = (decomposed.translateX ?? absoluteLeft ?? 0) - w / 2 * Math.cos(angleRad) + h / 2 * Math.sin(angleRad);
|
|
14834
|
+
absoluteTop = (decomposed.translateY ?? absoluteTop ?? 0) - w / 2 * Math.sin(angleRad) - h / 2 * Math.cos(angleRad);
|
|
14770
14835
|
}
|
|
14771
14836
|
} else if (obj instanceof fabric__namespace.FabricImage && (obj.originX === "center" || obj.originY === "center")) {
|
|
14772
|
-
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
|
|
14837
|
+
if (isActiveSelection && activeObj instanceof fabric__namespace.ActiveSelection) {
|
|
14838
|
+
const frameBounds = getObjectFrameBoundsInSelection(activeObj, obj, obj.width ?? 0, obj.height ?? 0);
|
|
14839
|
+
absoluteLeft = frameBounds.left;
|
|
14840
|
+
absoluteTop = frameBounds.top;
|
|
14841
|
+
} else {
|
|
14842
|
+
const w = (obj.width ?? 0) * (obj.scaleX ?? 1);
|
|
14843
|
+
const h = (obj.height ?? 0) * (obj.scaleY ?? 1);
|
|
14844
|
+
const angleRad = (decomposed.angle ?? obj.angle ?? 0) * Math.PI / 180;
|
|
14845
|
+
absoluteLeft = (decomposed.translateX ?? absoluteLeft ?? 0) - w / 2 * Math.cos(angleRad) + h / 2 * Math.sin(angleRad);
|
|
14846
|
+
absoluteTop = (decomposed.translateY ?? absoluteTop ?? 0) - w / 2 * Math.sin(angleRad) - h / 2 * Math.cos(angleRad);
|
|
14847
|
+
}
|
|
14776
14848
|
}
|
|
14777
14849
|
const preserveCornerGeometry = (sourceElement == null ? void 0 : sourceElement.type) === "shape" && (sourceElement.shapeType === "circle" || sourceElement.shapeType === "rounded-rect" || sourceElement.shapeType === "triangle");
|
|
14778
14850
|
let finalWidth = intrinsicWidth;
|
|
@@ -14799,12 +14871,14 @@ const PageCanvas = react.forwardRef(
|
|
|
14799
14871
|
absoluteLeft = frameBounds.left;
|
|
14800
14872
|
absoluteTop = frameBounds.top;
|
|
14801
14873
|
} else {
|
|
14802
|
-
|
|
14803
|
-
|
|
14874
|
+
const angleRad = (decomposed.angle ?? obj.angle ?? 0) * Math.PI / 180;
|
|
14875
|
+
absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2 * Math.cos(angleRad) + finalHeight / 2 * Math.sin(angleRad);
|
|
14876
|
+
absoluteTop = (decomposed.translateY ?? absoluteTop) - finalWidth / 2 * Math.sin(angleRad) - finalHeight / 2 * Math.cos(angleRad);
|
|
14804
14877
|
}
|
|
14878
|
+
const finalCenter = rotatedTopLeftToCenter(absoluteLeft, absoluteTop, finalWidth, finalHeight, decomposed.angle ?? (obj.angle ?? 0));
|
|
14805
14879
|
finalAbsoluteMatrix = fabric__namespace.util.composeMatrix({
|
|
14806
|
-
translateX:
|
|
14807
|
-
translateY:
|
|
14880
|
+
translateX: finalCenter.x,
|
|
14881
|
+
translateY: finalCenter.y,
|
|
14808
14882
|
angle: decomposed.angle ?? (obj.angle ?? 0),
|
|
14809
14883
|
scaleX: 1,
|
|
14810
14884
|
scaleY: 1,
|
|
@@ -15190,9 +15264,10 @@ const PageCanvas = react.forwardRef(
|
|
|
15190
15264
|
if (!ct) continue;
|
|
15191
15265
|
ct.frameW = bake.width;
|
|
15192
15266
|
ct.frameH = bake.height;
|
|
15267
|
+
const bakeCenter = rotatedTopLeftToCenter(bake.left, bake.top, bake.width, bake.height, bake.angle);
|
|
15193
15268
|
bake.obj.set({
|
|
15194
|
-
left:
|
|
15195
|
-
top:
|
|
15269
|
+
left: bakeCenter.x,
|
|
15270
|
+
top: bakeCenter.y,
|
|
15196
15271
|
width: bake.width,
|
|
15197
15272
|
height: bake.height,
|
|
15198
15273
|
scaleX: 1,
|
|
@@ -15789,8 +15864,9 @@ const PageCanvas = react.forwardRef(
|
|
|
15789
15864
|
const node = findNodeById(pageChildren, element.id);
|
|
15790
15865
|
return node ? getAbsoluteBounds(node, pageChildren) : { left: element.left ?? 0, top: element.top ?? 0 };
|
|
15791
15866
|
})() : { left: element.left ?? 0, top: element.top ?? 0 };
|
|
15792
|
-
const
|
|
15793
|
-
const
|
|
15867
|
+
const cropCenter = rotatedTopLeftToCenter(cropPos.left, cropPos.top, ct.frameW ?? 0, ct.frameH ?? 0, element.angle ?? 0);
|
|
15868
|
+
const cropCenterX = cropCenter.x;
|
|
15869
|
+
const cropCenterY = cropCenter.y;
|
|
15794
15870
|
if (element.left !== void 0) existingObj.set({ left: cropCenterX });
|
|
15795
15871
|
if (element.top !== void 0) existingObj.set({ top: cropCenterY });
|
|
15796
15872
|
if (element.angle !== void 0) existingObj.set({ angle: element.angle });
|
|
@@ -16726,8 +16802,9 @@ const PageCanvas = react.forwardRef(
|
|
|
16726
16802
|
ct.shape = clipShape === "circle" ? "circle" : clipShape === "rounded" ? "roundRect" : "rect";
|
|
16727
16803
|
ct.rx = rxRatio;
|
|
16728
16804
|
obj.__maintainResolution = element.maintainResolution !== false;
|
|
16729
|
-
const
|
|
16730
|
-
const
|
|
16805
|
+
const center = rotatedTopLeftToCenter(fabricPos.left, fabricPos.top, elementWidth, elementHeight, element.angle ?? 0);
|
|
16806
|
+
const centerX = center.x;
|
|
16807
|
+
const centerY = center.y;
|
|
16731
16808
|
const cropSetProps = {
|
|
16732
16809
|
width: elementWidth,
|
|
16733
16810
|
height: elementHeight,
|
|
@@ -16967,7 +17044,8 @@ const PageCanvas = react.forwardRef(
|
|
|
16967
17044
|
if (!skipPositionUpdate && (obj instanceof fabric__namespace.FabricImage && obj.originX === "center" || obj instanceof fabric__namespace.Group && obj.__cropGroup)) {
|
|
16968
17045
|
const vW = rW * effectiveScaleX;
|
|
16969
17046
|
const vH = rH * effectiveScaleY;
|
|
16970
|
-
|
|
17047
|
+
const center = rotatedTopLeftToCenter(fabricPos.left, fabricPos.top, vW, vH, element.angle ?? 0);
|
|
17048
|
+
posIfNotSkipped = { left: center.x, top: center.y };
|
|
16971
17049
|
}
|
|
16972
17050
|
if (element.transformMatrix && element.transformMatrix.length === 6) {
|
|
16973
17051
|
if (isTextbox) {
|
|
@@ -24265,9 +24343,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24265
24343
|
}
|
|
24266
24344
|
return svgString;
|
|
24267
24345
|
}
|
|
24268
|
-
const resolvedPackageVersion = "0.5.
|
|
24346
|
+
const resolvedPackageVersion = "0.5.332";
|
|
24269
24347
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24270
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24348
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.332";
|
|
24271
24349
|
const roundParityValue = (value) => {
|
|
24272
24350
|
if (typeof value !== "number") return value;
|
|
24273
24351
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25081,7 +25159,7 @@ class PixldocsRenderer {
|
|
|
25081
25159
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25082
25160
|
}
|
|
25083
25161
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25084
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25162
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BnF6Lk4i.cjs"));
|
|
25085
25163
|
const prepared = preparePagesForExport(
|
|
25086
25164
|
cloned.pages,
|
|
25087
25165
|
canvasWidth,
|
|
@@ -27401,7 +27479,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27401
27479
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27402
27480
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27403
27481
|
try {
|
|
27404
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27482
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BnF6Lk4i.cjs"));
|
|
27405
27483
|
try {
|
|
27406
27484
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27407
27485
|
} catch {
|
|
@@ -27798,4 +27876,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27798
27876
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27799
27877
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27800
27878
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27801
|
-
//# sourceMappingURL=index-
|
|
27879
|
+
//# sourceMappingURL=index-B9Lpo1N6.cjs.map
|