@pixldocs/canvas-renderer 0.5.411 → 0.5.413

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.
@@ -15206,7 +15206,6 @@ const PageCanvas = react.forwardRef(
15206
15206
  delete child.__asLiveOrigW;
15207
15207
  delete child.__asLiveOrigH;
15208
15208
  delete child.__asLiveRotSnap;
15209
- delete child.__asLiveOrigAngle;
15210
15209
  }
15211
15210
  }
15212
15211
  } catch {
@@ -15769,48 +15768,99 @@ const PageCanvas = react.forwardRef(
15769
15768
  if (obj instanceof fabric__namespace.Group && obj.__cropGroup) {
15770
15769
  const ct = obj.__cropData;
15771
15770
  if (ct) {
15772
- const sourceFrameW = Math.max(1, ct.frameW ?? obj.width ?? 1);
15773
- const sourceFrameH = Math.max(1, ct.frameH ?? obj.height ?? 1);
15774
- const appliedScaleX = isActiveSelection && activeObj ? Math.abs((activeObj.scaleX ?? 1) * (obj.scaleX ?? 1)) : Math.abs(obj.scaleX ?? 1);
15775
- const appliedScaleY = isActiveSelection && activeObj ? Math.abs((activeObj.scaleY ?? 1) * (obj.scaleY ?? 1)) : Math.abs(obj.scaleY ?? 1);
15776
- finalWidth = Math.max(1, sourceFrameW * appliedScaleX);
15777
- finalHeight = Math.max(1, sourceFrameH * appliedScaleY);
15778
- finalScaleX = 1;
15779
- finalScaleY = 1;
15780
- if (isActiveSelection && activeObj instanceof fabric__namespace.ActiveSelection) {
15781
- absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
15782
- absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
15783
- } else {
15784
- absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
15785
- absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
15786
- }
15787
- finalAbsoluteMatrix = fabric__namespace.util.composeMatrix({
15788
- translateX: absoluteLeft + finalWidth / 2,
15789
- translateY: absoluteTop + finalHeight / 2,
15790
- angle: decomposed.angle ?? (obj.angle ?? 0),
15791
- scaleX: 1,
15792
- scaleY: 1,
15793
- skewX: 0,
15794
- skewY: 0
15795
- });
15796
- if (isActiveSelection && activeObj instanceof fabric__namespace.ActiveSelection) {
15771
+ const cropChildLocalAngle = obj.__asLiveOrigAngle != null ? obj.__asLiveOrigAngle : obj.angle ?? 0;
15772
+ const cropChildNormAngle = (cropChildLocalAngle % 360 + 360) % 360;
15773
+ const cropChildIsRotated = Math.abs(cropChildNormAngle) > 0.5 && Math.abs(cropChildNormAngle - 360) > 0.5;
15774
+ const cropHandle = activeSelectionResizeHandle;
15775
+ const cropIsSideHandle = cropHandle === "ml" || cropHandle === "mr" || cropHandle === "mt" || cropHandle === "mb";
15776
+ const cropIsXSide = cropHandle === "ml" || cropHandle === "mr";
15777
+ if (isActiveSelection && activeObj instanceof fabric__namespace.ActiveSelection && cropChildIsRotated && cropIsSideHandle) {
15778
+ const sourceFrameW = Math.max(1, ct.frameW ?? obj.width ?? 1);
15779
+ const sourceFrameH = Math.max(1, ct.frameH ?? obj.height ?? 1);
15780
+ const asSx = Math.abs(activeObj.scaleX ?? 1);
15781
+ const asSy = Math.abs(activeObj.scaleY ?? 1);
15782
+ const axisScale = cropIsXSide ? asSx : asSy;
15783
+ const thetaC = fabric__namespace.util.degreesToRadians(cropChildLocalAngle);
15784
+ const cosC = Math.cos(thetaC);
15785
+ const sinC = Math.sin(thetaC);
15786
+ const sLocal = axisScale * cosC * cosC + sinC * sinC;
15787
+ const ownSx = Math.abs(obj.scaleX ?? 1);
15788
+ const ownSy = Math.abs(obj.scaleY ?? 1);
15789
+ const newFrameW = cropIsXSide ? sourceFrameW * ownSx * sLocal : sourceFrameW * ownSx;
15790
+ const newFrameH = cropIsXSide ? sourceFrameH * ownSy : sourceFrameH * ownSy * sLocal;
15791
+ finalWidth = Math.max(1, newFrameW);
15792
+ finalHeight = Math.max(1, newFrameH);
15793
+ finalScaleX = 1;
15794
+ finalScaleY = 1;
15795
+ const worldCx = decomposed.translateX ?? 0;
15796
+ const worldCy = decomposed.translateY ?? 0;
15797
+ const worldAngle = (activeObj.angle ?? 0) + cropChildLocalAngle;
15798
+ absoluteLeft = worldCx - finalWidth / 2;
15799
+ absoluteTop = worldCy - finalHeight / 2;
15800
+ finalAbsoluteMatrix = fabric__namespace.util.composeMatrix({
15801
+ translateX: worldCx,
15802
+ translateY: worldCy,
15803
+ angle: worldAngle,
15804
+ scaleX: 1,
15805
+ scaleY: 1,
15806
+ skewX: 0,
15807
+ skewY: 0
15808
+ });
15797
15809
  pendingCropGroupFrameBakes.push({
15798
15810
  obj,
15799
15811
  width: finalWidth,
15800
15812
  height: finalHeight,
15801
15813
  left: absoluteLeft,
15802
15814
  top: absoluteTop,
15803
- angle: decomposed.angle ?? (obj.angle ?? 0)
15815
+ angle: worldAngle
15804
15816
  });
15805
- } else {
15817
+ obj.__lastResizeHandle = null;
15806
15818
  ct.frameW = finalWidth;
15807
15819
  ct.frameH = finalHeight;
15808
- obj.set({ width: finalWidth, height: finalHeight, scaleX: 1, scaleY: 1 });
15809
- updateCoverLayout(obj);
15810
- }
15811
- obj.__lastResizeHandle = null;
15812
- if (!isActiveSelection) {
15813
- fabricCanvas.setActiveObject(obj);
15820
+ } else {
15821
+ const sourceFrameW = Math.max(1, ct.frameW ?? obj.width ?? 1);
15822
+ const sourceFrameH = Math.max(1, ct.frameH ?? obj.height ?? 1);
15823
+ const appliedScaleX = isActiveSelection && activeObj ? Math.abs((activeObj.scaleX ?? 1) * (obj.scaleX ?? 1)) : Math.abs(obj.scaleX ?? 1);
15824
+ const appliedScaleY = isActiveSelection && activeObj ? Math.abs((activeObj.scaleY ?? 1) * (obj.scaleY ?? 1)) : Math.abs(obj.scaleY ?? 1);
15825
+ finalWidth = Math.max(1, sourceFrameW * appliedScaleX);
15826
+ finalHeight = Math.max(1, sourceFrameH * appliedScaleY);
15827
+ finalScaleX = 1;
15828
+ finalScaleY = 1;
15829
+ if (isActiveSelection && activeObj instanceof fabric__namespace.ActiveSelection) {
15830
+ absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
15831
+ absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
15832
+ } else {
15833
+ absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
15834
+ absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
15835
+ }
15836
+ finalAbsoluteMatrix = fabric__namespace.util.composeMatrix({
15837
+ translateX: absoluteLeft + finalWidth / 2,
15838
+ translateY: absoluteTop + finalHeight / 2,
15839
+ angle: decomposed.angle ?? (obj.angle ?? 0),
15840
+ scaleX: 1,
15841
+ scaleY: 1,
15842
+ skewX: 0,
15843
+ skewY: 0
15844
+ });
15845
+ if (isActiveSelection && activeObj instanceof fabric__namespace.ActiveSelection) {
15846
+ pendingCropGroupFrameBakes.push({
15847
+ obj,
15848
+ width: finalWidth,
15849
+ height: finalHeight,
15850
+ left: absoluteLeft,
15851
+ top: absoluteTop,
15852
+ angle: decomposed.angle ?? (obj.angle ?? 0)
15853
+ });
15854
+ } else {
15855
+ ct.frameW = finalWidth;
15856
+ ct.frameH = finalHeight;
15857
+ obj.set({ width: finalWidth, height: finalHeight, scaleX: 1, scaleY: 1 });
15858
+ updateCoverLayout(obj);
15859
+ }
15860
+ obj.__lastResizeHandle = null;
15861
+ if (!isActiveSelection) {
15862
+ fabricCanvas.setActiveObject(obj);
15863
+ }
15814
15864
  }
15815
15865
  }
15816
15866
  } else if (obj instanceof fabric__namespace.FabricImage) {
@@ -15836,79 +15886,130 @@ const PageCanvas = react.forwardRef(
15836
15886
  useEditorStore.getState().updateElement(objId, { src: newSrc }, { recordHistory: false, skipLayoutRecalc: true });
15837
15887
  }
15838
15888
  } else if (isActiveSelection && (Math.abs((decomposed.scaleX ?? 1) - 1) > 1e-3 || Math.abs((decomposed.scaleY ?? 1) - 1) > 1e-3)) {
15839
- const sx = Math.abs(decomposed.scaleX || 1);
15840
- const sy = Math.abs(decomposed.scaleY || 1);
15841
- const handle = activeSelectionResizeHandle;
15842
- const isCornerHandle = handle === "tl" || handle === "tr" || handle === "bl" || handle === "br" || // Fallback: if handle ref is missing and sx≈sy with non-1 magnitude,
15843
- // treat as a uniform corner drag.
15844
- !handle && Math.abs(sx - sy) < 0.01 && Math.abs(sx - 1) > 1e-3;
15845
- let fx;
15846
- let fy;
15847
- if (isCornerHandle) {
15848
- const u = Math.max(1e-3, Math.sqrt(sx * sy));
15849
- fx = u;
15850
- fy = u;
15851
- } else {
15852
- fx = sx;
15853
- fy = sy;
15854
- }
15855
- const bakedW = Math.max(1, intrinsicWidth * fx);
15856
- const bakedH = Math.max(1, intrinsicHeight * fy);
15857
- try {
15858
- const preBakeCenter = obj.getCenterPoint();
15859
- const prevObjCaching = obj.objectCaching;
15860
- obj.set({
15861
- width: bakedW,
15862
- height: bakedH,
15889
+ const imgChildLocalAngle = obj.__asLiveOrigAngle != null ? obj.__asLiveOrigAngle : obj.angle ?? 0;
15890
+ const imgChildNormAngle = (imgChildLocalAngle % 360 + 360) % 360;
15891
+ const imgChildIsRotated = Math.abs(imgChildNormAngle) > 0.5 && Math.abs(imgChildNormAngle - 360) > 0.5;
15892
+ const imgHandle = activeSelectionResizeHandle;
15893
+ const imgIsSideHandle = imgHandle === "ml" || imgHandle === "mr" || imgHandle === "mt" || imgHandle === "mb";
15894
+ const imgIsXSide = imgHandle === "ml" || imgHandle === "mr";
15895
+ if (imgChildIsRotated && imgIsSideHandle && activeObj instanceof fabric__namespace.ActiveSelection) {
15896
+ const asSx = Math.abs(activeObj.scaleX ?? 1);
15897
+ const asSy = Math.abs(activeObj.scaleY ?? 1);
15898
+ const axisScale = imgIsXSide ? asSx : asSy;
15899
+ const thetaI = fabric__namespace.util.degreesToRadians(imgChildLocalAngle);
15900
+ const cI = Math.cos(thetaI);
15901
+ const sI = Math.sin(thetaI);
15902
+ const sLocalI = axisScale * cI * cI + sI * sI;
15903
+ const ownSx = Math.abs(obj.scaleX ?? 1);
15904
+ const ownSy = Math.abs(obj.scaleY ?? 1);
15905
+ const bakedW = Math.max(1, intrinsicWidth * ownSx * (imgIsXSide ? sLocalI : 1));
15906
+ const bakedH = Math.max(1, intrinsicHeight * ownSy * (imgIsXSide ? 1 : sLocalI));
15907
+ try {
15908
+ obj.set({
15909
+ width: bakedW,
15910
+ height: bakedH,
15911
+ scaleX: 1,
15912
+ scaleY: 1,
15913
+ skewX: 0,
15914
+ skewY: 0
15915
+ });
15916
+ obj.dirty = true;
15917
+ obj.setCoords();
15918
+ } catch {
15919
+ }
15920
+ finalWidth = bakedW;
15921
+ finalHeight = bakedH;
15922
+ finalScaleX = 1;
15923
+ finalScaleY = 1;
15924
+ const worldCx = decomposed.translateX ?? 0;
15925
+ const worldCy = decomposed.translateY ?? 0;
15926
+ const worldAngleI = (activeObj.angle ?? 0) + imgChildLocalAngle;
15927
+ absoluteLeft = worldCx - finalWidth / 2;
15928
+ absoluteTop = worldCy - finalHeight / 2;
15929
+ finalAbsoluteMatrix = fabric__namespace.util.composeMatrix({
15930
+ translateX: worldCx,
15931
+ translateY: worldCy,
15932
+ angle: worldAngleI,
15863
15933
  scaleX: 1,
15864
15934
  scaleY: 1,
15865
- objectCaching: false
15935
+ skewX: 0,
15936
+ skewY: 0
15866
15937
  });
15867
- obj.objectCaching = prevObjCaching;
15868
- if (sx > 0 && sy > 0) {
15869
- const localScaleX = 1 / sx;
15870
- const localScaleY = 1 / sy;
15871
- obj.set({ scaleX: localScaleX, scaleY: localScaleY });
15872
- const selectionMatrix = (_h = activeObj == null ? void 0 : activeObj.calcTransformMatrix) == null ? void 0 : _h.call(activeObj);
15873
- const localCenter = selectionMatrix ? fabric__namespace.util.transformPoint(preBakeCenter, fabric__namespace.util.invertTransform(selectionMatrix)) : preBakeCenter;
15874
- const localWidth = bakedW * localScaleX;
15875
- const localHeight = bakedH * localScaleY;
15876
- const isCenterOrigin = obj.originX === "center" || obj.originY === "center";
15877
- if (isCenterOrigin) {
15878
- obj.set({
15879
- left: localCenter.x,
15880
- top: localCenter.y
15881
- });
15882
- } else {
15883
- obj.set({
15884
- left: localCenter.x - localWidth / 2,
15885
- top: localCenter.y - localHeight / 2
15886
- });
15938
+ } else {
15939
+ const sx = Math.abs(decomposed.scaleX || 1);
15940
+ const sy = Math.abs(decomposed.scaleY || 1);
15941
+ const handle = activeSelectionResizeHandle;
15942
+ const isCornerHandle = handle === "tl" || handle === "tr" || handle === "bl" || handle === "br" || // Fallback: if handle ref is missing and sx≈sy with non-1 magnitude,
15943
+ // treat as a uniform corner drag.
15944
+ !handle && Math.abs(sx - sy) < 0.01 && Math.abs(sx - 1) > 1e-3;
15945
+ let fx;
15946
+ let fy;
15947
+ if (isCornerHandle) {
15948
+ const u = Math.max(1e-3, Math.sqrt(sx * sy));
15949
+ fx = u;
15950
+ fy = u;
15951
+ } else {
15952
+ fx = sx;
15953
+ fy = sy;
15954
+ }
15955
+ const bakedW = Math.max(1, intrinsicWidth * fx);
15956
+ const bakedH = Math.max(1, intrinsicHeight * fy);
15957
+ try {
15958
+ const preBakeCenter = obj.getCenterPoint();
15959
+ const prevObjCaching = obj.objectCaching;
15960
+ obj.set({
15961
+ width: bakedW,
15962
+ height: bakedH,
15963
+ scaleX: 1,
15964
+ scaleY: 1,
15965
+ objectCaching: false
15966
+ });
15967
+ obj.objectCaching = prevObjCaching;
15968
+ if (sx > 0 && sy > 0) {
15969
+ const localScaleX = 1 / sx;
15970
+ const localScaleY = 1 / sy;
15971
+ obj.set({ scaleX: localScaleX, scaleY: localScaleY });
15972
+ const selectionMatrix = (_h = activeObj == null ? void 0 : activeObj.calcTransformMatrix) == null ? void 0 : _h.call(activeObj);
15973
+ const localCenter = selectionMatrix ? fabric__namespace.util.transformPoint(preBakeCenter, fabric__namespace.util.invertTransform(selectionMatrix)) : preBakeCenter;
15974
+ const localWidth = bakedW * localScaleX;
15975
+ const localHeight = bakedH * localScaleY;
15976
+ const isCenterOrigin = obj.originX === "center" || obj.originY === "center";
15977
+ if (isCenterOrigin) {
15978
+ obj.set({
15979
+ left: localCenter.x,
15980
+ top: localCenter.y
15981
+ });
15982
+ } else {
15983
+ obj.set({
15984
+ left: localCenter.x - localWidth / 2,
15985
+ top: localCenter.y - localHeight / 2
15986
+ });
15987
+ }
15887
15988
  }
15989
+ obj.dirty = true;
15990
+ if (activeObj) activeObj.dirty = true;
15991
+ obj.setCoords();
15992
+ } catch {
15888
15993
  }
15889
- obj.dirty = true;
15890
- if (activeObj) activeObj.dirty = true;
15891
- obj.setCoords();
15892
- } catch {
15893
- }
15894
- finalWidth = bakedW;
15895
- finalHeight = bakedH;
15896
- finalScaleX = 1;
15897
- finalScaleY = 1;
15898
- try {
15899
- absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
15900
- absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
15901
- } catch {
15994
+ finalWidth = bakedW;
15995
+ finalHeight = bakedH;
15996
+ finalScaleX = 1;
15997
+ finalScaleY = 1;
15998
+ try {
15999
+ absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
16000
+ absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
16001
+ } catch {
16002
+ }
16003
+ finalAbsoluteMatrix = fabric__namespace.util.composeMatrix({
16004
+ translateX: decomposed.translateX,
16005
+ translateY: decomposed.translateY,
16006
+ angle: decomposed.angle ?? 0,
16007
+ scaleX: 1,
16008
+ scaleY: 1,
16009
+ skewX: 0,
16010
+ skewY: 0
16011
+ });
15902
16012
  }
15903
- finalAbsoluteMatrix = fabric__namespace.util.composeMatrix({
15904
- translateX: decomposed.translateX,
15905
- translateY: decomposed.translateY,
15906
- angle: decomposed.angle ?? 0,
15907
- scaleX: 1,
15908
- scaleY: 1,
15909
- skewX: 0,
15910
- skewY: 0
15911
- });
15912
16013
  } else {
15913
16014
  finalWidth = intrinsicWidth;
15914
16015
  finalHeight = intrinsicHeight;
@@ -16164,6 +16265,45 @@ const PageCanvas = react.forwardRef(
16164
16265
  }
16165
16266
  }
16166
16267
  }
16268
+ const isCropGroupObj = obj instanceof fabric__namespace.Group && obj.__cropGroup;
16269
+ const isPlainImageObj = obj instanceof fabric__namespace.FabricImage && !obj.__cropGroup && !obj.smartElementType;
16270
+ if (isActiveSelection && isActiveSelectionSideHandle && (isCropGroupObj || isPlainImageObj)) {
16271
+ const childLocalAngleSrc = obj.__asLiveOrigAngle != null ? obj.__asLiveOrigAngle : Number.isFinite(sourceElement == null ? void 0 : sourceElement.angle) ? sourceElement.angle ?? 0 : obj.angle ?? 0;
16272
+ const normAng = (childLocalAngleSrc % 360 + 360) % 360;
16273
+ const isRotatedImg = Math.min(normAng, 360 - normAng) > 0.5;
16274
+ if (isRotatedImg && activeObj instanceof fabric__namespace.ActiveSelection) {
16275
+ try {
16276
+ const cleanAngleI = childLocalAngleSrc;
16277
+ const worldAngleI = (activeObj.angle ?? 0) + childLocalAngleSrc;
16278
+ const cleanW = Math.max(1, Number(elementUpdate.width ?? finalWidth));
16279
+ const cleanH = Math.max(1, Number(elementUpdate.height ?? finalHeight));
16280
+ const cx = decomposed.translateX ?? absoluteLeft + cleanW / 2;
16281
+ const cy = decomposed.translateY ?? absoluteTop + cleanH / 2;
16282
+ const cleanAbsLeft = cx - cleanW / 2;
16283
+ const cleanAbsTop = cy - cleanH / 2;
16284
+ const cleanStorePos = absoluteToStorePosition(cleanAbsLeft, cleanAbsTop, objId, pageChildrenForSave);
16285
+ elementUpdate.left = cleanStorePos.left;
16286
+ elementUpdate.top = cleanStorePos.top;
16287
+ elementUpdate.width = cleanW;
16288
+ elementUpdate.height = cleanH;
16289
+ elementUpdate.angle = cleanAngleI;
16290
+ elementUpdate.scaleX = 1;
16291
+ elementUpdate.scaleY = 1;
16292
+ elementUpdate.skewX = 0;
16293
+ elementUpdate.skewY = 0;
16294
+ elementUpdate.transformMatrix = fabric__namespace.util.composeMatrix({
16295
+ translateX: cx,
16296
+ translateY: cy,
16297
+ angle: worldAngleI,
16298
+ scaleX: 1,
16299
+ scaleY: 1,
16300
+ skewX: 0,
16301
+ skewY: 0
16302
+ });
16303
+ } catch {
16304
+ }
16305
+ }
16306
+ }
16167
16307
  if (debugGroupTextCornerResize && obj instanceof fabric__namespace.Textbox) {
16168
16308
  logGroupTextResizeDebug("store-update-text", {
16169
16309
  time: Math.round(performance.now()),
@@ -16324,6 +16464,15 @@ const PageCanvas = react.forwardRef(
16324
16464
  groupSelectionTransformStartRef.current = null;
16325
16465
  activeSelectionMoveStartRef.current = null;
16326
16466
  activeSelectionResizeHandleRef.current = null;
16467
+ try {
16468
+ const t = e.target;
16469
+ if (t instanceof fabric__namespace.ActiveSelection) {
16470
+ for (const child of t.getObjects()) {
16471
+ delete child.__asLiveOrigAngle;
16472
+ }
16473
+ }
16474
+ } catch {
16475
+ }
16327
16476
  setTimeout(() => modifiedIdsThisRound.forEach((id) => justModifiedIdsRef.current.delete(id)), 150);
16328
16477
  commitHistory();
16329
16478
  unlockEditsSoon();
@@ -25391,9 +25540,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
25391
25540
  }
25392
25541
  return svgString;
25393
25542
  }
25394
- const resolvedPackageVersion = "0.5.411";
25543
+ const resolvedPackageVersion = "0.5.413";
25395
25544
  const PACKAGE_VERSION = resolvedPackageVersion;
25396
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.411";
25545
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.413";
25397
25546
  const roundParityValue = (value) => {
25398
25547
  if (typeof value !== "number") return value;
25399
25548
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -26207,7 +26356,7 @@ class PixldocsRenderer {
26207
26356
  await this.waitForCanvasScene(container, cloned, i);
26208
26357
  }
26209
26358
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
26210
- const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-DUaCeIGH.cjs"));
26359
+ const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-2r6G4ALY.cjs"));
26211
26360
  const prepared = preparePagesForExport(
26212
26361
  cloned.pages,
26213
26362
  canvasWidth,
@@ -28527,7 +28676,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
28527
28676
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
28528
28677
  sanitizeSvgTreeForPdf(svgToDraw);
28529
28678
  try {
28530
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-DUaCeIGH.cjs"));
28679
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-2r6G4ALY.cjs"));
28531
28680
  try {
28532
28681
  await logTextMeasurementDiagnostic(svgToDraw);
28533
28682
  } catch {
@@ -28924,4 +29073,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
28924
29073
  exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
28925
29074
  exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
28926
29075
  exports.warmTemplateFromForm = warmTemplateFromForm;
28927
- //# sourceMappingURL=index-BzO7hSG5.cjs.map
29076
+ //# sourceMappingURL=index-xSOFCztI.cjs.map