@pixldocs/canvas-renderer 0.5.331 → 0.5.333

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.
@@ -11043,6 +11043,8 @@ const scaleUpdateNumber = (updates, source, key, factor) => {
11043
11043
  };
11044
11044
  const GROUP_TEXT_RESIZE_DEBUG_PREFIX = "[Pixldocs][group-text-corner-resize]";
11045
11045
  const GROUP_TEXT_RESIZE_DEBUG_MAX_ENTRIES = 200;
11046
+ const GROUP_IMAGE_RESIZE_DEBUG_PREFIX = "[Pixldocs][group-image-side-resize]";
11047
+ const GROUP_IMAGE_RESIZE_DEBUG_MAX_ENTRIES = 300;
11046
11048
  const isCornerResizeHandle = (handle) => handle === "tl" || handle === "tr" || handle === "bl" || handle === "br";
11047
11049
  const summarizeFabricObjectForResizeDebug = (obj) => {
11048
11050
  var _a2;
@@ -11105,6 +11107,43 @@ const logGroupTextResizeDebug = (phase, payload) => {
11105
11107
  console.log(GROUP_TEXT_RESIZE_DEBUG_PREFIX, phase, payload);
11106
11108
  }
11107
11109
  };
11110
+ const isGroupResizeImageLikeObject = (obj) => {
11111
+ var _a2;
11112
+ return !!obj && (obj instanceof fabric__namespace.FabricImage || obj instanceof fabric__namespace.Group && (obj.__cropGroup || ((_a2 = obj._ct) == null ? void 0 : _a2.isCropGroup)));
11113
+ };
11114
+ const logGroupImageResizeDebug = (phase, payload) => {
11115
+ if (typeof console === "undefined") return;
11116
+ try {
11117
+ const seen = /* @__PURE__ */ new WeakSet();
11118
+ const normalize = (value) => {
11119
+ if (value == null) return value;
11120
+ const valueType = typeof value;
11121
+ if (valueType === "number") return Number.isFinite(value) ? Math.round(value * 1e3) / 1e3 : String(value);
11122
+ if (valueType === "string" || valueType === "boolean") return value;
11123
+ if (valueType === "function") return `[Function ${value.name || "anonymous"}]`;
11124
+ if (Array.isArray(value)) return value.map((entry) => normalize(entry));
11125
+ if (valueType === "object") {
11126
+ if (seen.has(value)) return "[Circular]";
11127
+ seen.add(value);
11128
+ if (value instanceof fabric__namespace.FabricObject) return normalize(summarizeFabricObjectForResizeDebug(value));
11129
+ const output = {};
11130
+ Object.entries(value).forEach(([key, entry]) => {
11131
+ output[key] = normalize(entry);
11132
+ });
11133
+ return output;
11134
+ }
11135
+ return String(value);
11136
+ };
11137
+ const normalizedPayload = normalize(payload);
11138
+ const line = `${GROUP_IMAGE_RESIZE_DEBUG_PREFIX} ${phase} ${JSON.stringify(normalizedPayload)}`;
11139
+ const debugWindow = window;
11140
+ debugWindow.__pixldocsGroupImageResizeLogs = Array.isArray(debugWindow.__pixldocsGroupImageResizeLogs) ? debugWindow.__pixldocsGroupImageResizeLogs.slice(-GROUP_IMAGE_RESIZE_DEBUG_MAX_ENTRIES + 1) : [];
11141
+ debugWindow.__pixldocsGroupImageResizeLogs.push(line);
11142
+ console.log(line);
11143
+ } catch {
11144
+ console.log(GROUP_IMAGE_RESIZE_DEBUG_PREFIX, phase, payload);
11145
+ }
11146
+ };
11108
11147
  const bakeTextboxScaleIntoTypography = (obj, sourceElement) => {
11109
11148
  const sx = Math.abs(obj.scaleX ?? 1) || 1;
11110
11149
  const sy = Math.abs(obj.scaleY ?? 1) || 1;
@@ -13761,7 +13800,25 @@ const PageCanvas = react.forwardRef(
13761
13800
  const a = ((c.angle ?? 0) % 180 + 180) % 180;
13762
13801
  return !(a < 0.5 || a > 179.5);
13763
13802
  });
13764
- if ((isXSide || hasRotatedChild) && ((_b2 = groupShiftReflowSnapshotRef.current) == null ? void 0 : _b2.selection) !== obj) {
13803
+ const selectionAngle = ((obj.angle ?? 0) % 180 + 180) % 180;
13804
+ const isSelectionRotated = !(selectionAngle < 0.5 || selectionAngle > 179.5);
13805
+ const shouldPinNonTextChildren = hasRotatedChild || isSelectionRotated;
13806
+ const shouldDebugGroupImageResize = obj.getObjects().some((child) => isGroupResizeImageLikeObject(child));
13807
+ if (shouldDebugGroupImageResize) {
13808
+ logGroupImageResizeDebug("live-start", {
13809
+ time: Math.round(performance.now()),
13810
+ corner,
13811
+ isXSide,
13812
+ sAxis,
13813
+ hasRotatedChild,
13814
+ isSelectionRotated,
13815
+ shouldPinNonTextChildren,
13816
+ groupSelectionId: obj.__pixldocsGroupSelection,
13817
+ selection: summarizeFabricObjectForResizeDebug(obj),
13818
+ children: obj.getObjects().map((child) => summarizeFabricObjectForResizeDebug(child))
13819
+ });
13820
+ }
13821
+ if ((isXSide || shouldPinNonTextChildren) && ((_b2 = groupShiftReflowSnapshotRef.current) == null ? void 0 : _b2.selection) !== obj) {
13765
13822
  groupShiftReflowSnapshotRef.current = null;
13766
13823
  const logicalGroupId = obj.__pixldocsGroupSelection;
13767
13824
  if (logicalGroupId) {
@@ -13808,22 +13865,50 @@ const PageCanvas = react.forwardRef(
13808
13865
  }
13809
13866
  }
13810
13867
  const childCounterScale = hasRotatedChild ? 1 : 1 / sAxis;
13868
+ let restoredNonTextAfterLayout = false;
13811
13869
  const restoreNonTextChildren = (pins) => {
13812
13870
  var _a3, _b3;
13813
- if (!hasRotatedChild || ((_a3 = groupShiftReflowSnapshotRef.current) == null ? void 0 : _a3.selection) !== obj) return;
13871
+ if (!shouldPinNonTextChildren || ((_a3 = groupShiftReflowSnapshotRef.current) == null ? void 0 : _a3.selection) !== obj) return;
13814
13872
  for (const entry of groupShiftReflowSnapshotRef.current.children) {
13815
13873
  const child = entry.obj;
13816
13874
  if (child instanceof fabric__namespace.Textbox) continue;
13817
13875
  if (child instanceof fabric__namespace.FabricImage || child instanceof fabric__namespace.Group && (child.__cropGroup || ((_b3 = child._ct) == null ? void 0 : _b3.isCropGroup))) {
13818
13876
  const pin = pins == null ? void 0 : pins.get(child);
13819
- const targetLeft = (pin == null ? void 0 : pin.left) ?? (isXSide ? entry.left0 * sAxis : entry.left0);
13820
- const targetTop = (pin == null ? void 0 : pin.top) ?? (isXSide ? entry.top0 : entry.top0 * sAxis);
13877
+ let targetLeft = hasRotatedChild && isXSide ? entry.left0 * sAxis : entry.left0;
13878
+ let targetTop = hasRotatedChild && !isXSide ? entry.top0 * sAxis : entry.top0;
13879
+ if (pin == null ? void 0 : pin.worldCenter) {
13880
+ try {
13881
+ const invSelectionMatrix = fabric__namespace.util.invertTransform(obj.calcTransformMatrix());
13882
+ const localCenter = fabric__namespace.util.transformPoint(pin.worldCenter, invSelectionMatrix);
13883
+ targetLeft = localCenter.x;
13884
+ targetTop = localCenter.y;
13885
+ } catch {
13886
+ targetLeft = pin.left ?? targetLeft;
13887
+ targetTop = pin.top ?? targetTop;
13888
+ }
13889
+ } else {
13890
+ targetLeft = (pin == null ? void 0 : pin.left) ?? targetLeft;
13891
+ targetTop = (pin == null ? void 0 : pin.top) ?? targetTop;
13892
+ }
13893
+ const beforeRestore = shouldDebugGroupImageResize ? summarizeFabricObjectForResizeDebug(child) : null;
13821
13894
  if (Math.abs((child.left ?? 0) - targetLeft) > 0.01) child._set("left", targetLeft);
13822
13895
  if (Math.abs((child.top ?? 0) - targetTop) > 0.01) child._set("top", targetTop);
13823
13896
  if (isXSide) child._set("scaleX", childCounterScale);
13824
13897
  else child._set("scaleY", childCounterScale);
13825
13898
  child.setCoords();
13826
13899
  child.dirty = true;
13900
+ if (shouldDebugGroupImageResize) {
13901
+ logGroupImageResizeDebug("restore-non-text", {
13902
+ time: Math.round(performance.now()),
13903
+ corner,
13904
+ childId: getObjectId(child),
13905
+ targetLeft,
13906
+ targetTop,
13907
+ pin,
13908
+ before: beforeRestore,
13909
+ after: summarizeFabricObjectForResizeDebug(child)
13910
+ });
13911
+ }
13827
13912
  }
13828
13913
  }
13829
13914
  };
@@ -13837,6 +13922,7 @@ const PageCanvas = react.forwardRef(
13837
13922
  };
13838
13923
  for (const child of obj.getObjects()) {
13839
13924
  if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_d = child._ct) == null ? void 0 : _d.isCropGroup))) {
13925
+ const beforeImageChildResize = shouldDebugGroupImageResize ? summarizeFabricObjectForResizeDebug(child) : null;
13840
13926
  const ct = child.__cropData;
13841
13927
  if (ct) {
13842
13928
  if (child.__asLiveOrigW == null) {
@@ -13863,10 +13949,22 @@ const PageCanvas = react.forwardRef(
13863
13949
  else child._set("scaleY", childCounterScale);
13864
13950
  child.setCoords();
13865
13951
  child.dirty = true;
13952
+ if (shouldDebugGroupImageResize) {
13953
+ logGroupImageResizeDebug("live-crop-child-resized", {
13954
+ time: Math.round(performance.now()),
13955
+ corner,
13956
+ sAxis,
13957
+ childCounterScale,
13958
+ before: beforeImageChildResize,
13959
+ after: summarizeFabricObjectForResizeDebug(child),
13960
+ cropData: ct ? { frameW: ct.frameW, frameH: ct.frameH } : null
13961
+ });
13962
+ }
13866
13963
  didReflowTextChild = true;
13867
13964
  continue;
13868
13965
  }
13869
13966
  if (child instanceof fabric__namespace.FabricImage && !child.__cropGroup && !child.smartElementType) {
13967
+ const beforeImageChildResize = shouldDebugGroupImageResize ? summarizeFabricObjectForResizeDebug(child) : null;
13870
13968
  if (isXSide) {
13871
13969
  if (child.__asLiveOrigW == null) {
13872
13970
  child.__asLiveOrigW = (child.width ?? 0) * Math.abs(child.scaleX ?? 1);
@@ -13884,6 +13982,18 @@ const PageCanvas = react.forwardRef(
13884
13982
  else child._set("scaleY", childCounterScale);
13885
13983
  child.setCoords();
13886
13984
  child.dirty = true;
13985
+ if (shouldDebugGroupImageResize) {
13986
+ logGroupImageResizeDebug("live-image-child-resized", {
13987
+ time: Math.round(performance.now()),
13988
+ corner,
13989
+ sAxis,
13990
+ childCounterScale,
13991
+ liveOrigW: child.__asLiveOrigW,
13992
+ liveOrigH: child.__asLiveOrigH,
13993
+ before: beforeImageChildResize,
13994
+ after: summarizeFabricObjectForResizeDebug(child)
13995
+ });
13996
+ }
13887
13997
  didReflowTextChild = true;
13888
13998
  continue;
13889
13999
  }
@@ -13923,7 +14033,7 @@ const PageCanvas = react.forwardRef(
13923
14033
  didReflowTextChild = true;
13924
14034
  }
13925
14035
  }
13926
- if (isXSide && ((_e = groupShiftReflowSnapshotRef.current) == null ? void 0 : _e.selection) === obj) {
14036
+ if (isXSide && !shouldPinNonTextChildren && ((_e = groupShiftReflowSnapshotRef.current) == null ? void 0 : _e.selection) === obj) {
13927
14037
  const snap = groupShiftReflowSnapshotRef.current;
13928
14038
  const anchorEntry = snap.children[0];
13929
14039
  const anchorTopLive = anchorEntry.obj.top ?? 0;
@@ -13956,12 +14066,26 @@ const PageCanvas = react.forwardRef(
13956
14066
  if (cornersBefore) {
13957
14067
  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 };
13958
14068
  }
13959
- const nonTextPinsBeforeLayout = hasRotatedChild ? new Map(obj.getObjects().map((child) => [child, { left: child.left ?? 0, top: child.top ?? 0 }])) : void 0;
14069
+ const nonTextPinsBeforeLayout = shouldPinNonTextChildren ? new Map(obj.getObjects().map((child) => [child, {
14070
+ left: child.left ?? 0,
14071
+ top: child.top ?? 0,
14072
+ worldCenter: child instanceof fabric__namespace.Textbox ? void 0 : child.getCenterPoint()
14073
+ }])) : void 0;
13960
14074
  try {
13961
14075
  obj.triggerLayout();
13962
14076
  } catch {
13963
14077
  }
13964
14078
  restoreNonTextChildren(nonTextPinsBeforeLayout);
14079
+ restoredNonTextAfterLayout = !!nonTextPinsBeforeLayout;
14080
+ if (shouldDebugGroupImageResize) {
14081
+ logGroupImageResizeDebug("after-trigger-layout", {
14082
+ time: Math.round(performance.now()),
14083
+ corner,
14084
+ selection: summarizeFabricObjectForResizeDebug(obj),
14085
+ nonTextPinsBeforeLayout,
14086
+ children: obj.getObjects().map((child) => summarizeFabricObjectForResizeDebug(child))
14087
+ });
14088
+ }
13965
14089
  obj._set("width", asW0);
13966
14090
  obj._set("scaleX", asSx0);
13967
14091
  obj._set("scaleY", asSy0);
@@ -13987,7 +14111,7 @@ const PageCanvas = react.forwardRef(
13987
14111
  obj._set("left", asLeft0);
13988
14112
  obj._set("top", asTop0);
13989
14113
  }
13990
- restoreNonTextChildren();
14114
+ if (!restoredNonTextAfterLayout) restoreNonTextChildren();
13991
14115
  obj._set("width", asW0);
13992
14116
  obj._set("scaleX", asSx0);
13993
14117
  obj._set("scaleY", asSy0);
@@ -14556,6 +14680,18 @@ const PageCanvas = react.forwardRef(
14556
14680
  const isActiveSelection = activeObj instanceof fabric__namespace.ActiveSelection || activeObjects.length > 1;
14557
14681
  const activeSelectionResizeHandle = isActiveSelection ? activeSelectionResizeHandleRef.current : null;
14558
14682
  const debugGroupTextCornerResize = activeObj instanceof fabric__namespace.ActiveSelection && isCornerResizeHandle(activeSelectionResizeHandle) && activeObjects.some((candidate) => candidate instanceof fabric__namespace.Textbox);
14683
+ const debugGroupImageSideResize = activeObj instanceof fabric__namespace.ActiveSelection && (activeSelectionResizeHandle === "ml" || activeSelectionResizeHandle === "mr" || activeSelectionResizeHandle === "mt" || activeSelectionResizeHandle === "mb") && activeObjects.some((candidate) => isGroupResizeImageLikeObject(candidate));
14684
+ if (debugGroupImageSideResize) {
14685
+ logGroupImageResizeDebug("modified-start", {
14686
+ time: Math.round(performance.now()),
14687
+ handle: activeSelectionResizeHandle,
14688
+ target: summarizeFabricObjectForResizeDebug(modifiedTarget),
14689
+ selection: summarizeFabricObjectForResizeDebug(activeObj),
14690
+ activeObjectIds: activeObjects.map((candidate) => getObjectId(candidate)),
14691
+ selectedStoreIds: useEditorStore.getState().canvas.selectedIds,
14692
+ members: activeObjects.map((candidate) => summarizeFabricObjectForResizeDebug(candidate))
14693
+ });
14694
+ }
14559
14695
  if (debugGroupTextCornerResize) {
14560
14696
  logGroupTextResizeDebug("modified-start", {
14561
14697
  time: Math.round(performance.now()),
@@ -14811,11 +14947,17 @@ const PageCanvas = react.forwardRef(
14811
14947
  absoluteTop = (decomposed.translateY ?? absoluteTop ?? 0) - w / 2 * Math.sin(angleRad) - h / 2 * Math.cos(angleRad);
14812
14948
  }
14813
14949
  } else if (obj instanceof fabric__namespace.FabricImage && (obj.originX === "center" || obj.originY === "center")) {
14814
- const w = (obj.width ?? 0) * (obj.scaleX ?? 1);
14815
- const h = (obj.height ?? 0) * (obj.scaleY ?? 1);
14816
- const angleRad = (decomposed.angle ?? obj.angle ?? 0) * Math.PI / 180;
14817
- absoluteLeft = (decomposed.translateX ?? absoluteLeft ?? 0) - w / 2 * Math.cos(angleRad) + h / 2 * Math.sin(angleRad);
14818
- absoluteTop = (decomposed.translateY ?? absoluteTop ?? 0) - w / 2 * Math.sin(angleRad) - h / 2 * Math.cos(angleRad);
14950
+ if (isActiveSelection && activeObj instanceof fabric__namespace.ActiveSelection) {
14951
+ const frameBounds = getObjectFrameBoundsInSelection(activeObj, obj, obj.width ?? 0, obj.height ?? 0);
14952
+ absoluteLeft = frameBounds.left;
14953
+ absoluteTop = frameBounds.top;
14954
+ } else {
14955
+ const w = (obj.width ?? 0) * (obj.scaleX ?? 1);
14956
+ const h = (obj.height ?? 0) * (obj.scaleY ?? 1);
14957
+ const angleRad = (decomposed.angle ?? obj.angle ?? 0) * Math.PI / 180;
14958
+ absoluteLeft = (decomposed.translateX ?? absoluteLeft ?? 0) - w / 2 * Math.cos(angleRad) + h / 2 * Math.sin(angleRad);
14959
+ absoluteTop = (decomposed.translateY ?? absoluteTop ?? 0) - w / 2 * Math.sin(angleRad) - h / 2 * Math.cos(angleRad);
14960
+ }
14819
14961
  }
14820
14962
  const preserveCornerGeometry = (sourceElement == null ? void 0 : sourceElement.type) === "shape" && (sourceElement.shapeType === "circle" || sourceElement.shapeType === "rounded-rect" || sourceElement.shapeType === "triangle");
14821
14963
  let finalWidth = intrinsicWidth;
@@ -14904,6 +15046,7 @@ const PageCanvas = react.forwardRef(
14904
15046
  useEditorStore.getState().updateElement(objId, { src: newSrc }, { recordHistory: false, skipLayoutRecalc: true });
14905
15047
  }
14906
15048
  } else if (isActiveSelection && (Math.abs((decomposed.scaleX ?? 1) - 1) > 1e-3 || Math.abs((decomposed.scaleY ?? 1) - 1) > 1e-3)) {
15049
+ const debugImageBeforeBake = debugGroupImageSideResize ? summarizeFabricObjectForResizeDebug(obj) : null;
14907
15050
  const sx = Math.abs(decomposed.scaleX || 1);
14908
15051
  const sy = Math.abs(decomposed.scaleY || 1);
14909
15052
  const handle = activeSelectionResizeHandle;
@@ -14974,6 +15117,38 @@ const PageCanvas = react.forwardRef(
14974
15117
  skewX: finalSkewX ?? 0,
14975
15118
  skewY: finalSkewY ?? 0
14976
15119
  });
15120
+ if (debugGroupImageSideResize) {
15121
+ logGroupImageResizeDebug("image-bake", {
15122
+ time: Math.round(performance.now()),
15123
+ handle: activeSelectionResizeHandle,
15124
+ imageId: objId,
15125
+ source: sourceElement ? {
15126
+ left: sourceElement.left,
15127
+ top: sourceElement.top,
15128
+ width: sourceElement.width,
15129
+ height: sourceElement.height,
15130
+ angle: sourceElement.angle,
15131
+ scaleX: sourceElement.scaleX,
15132
+ scaleY: sourceElement.scaleY
15133
+ } : null,
15134
+ factors: { sx, sy, fx, fy, isCornerHandle },
15135
+ beforeBake: debugImageBeforeBake,
15136
+ afterBake: summarizeFabricObjectForResizeDebug(obj),
15137
+ persistedGeometry: {
15138
+ absoluteLeft,
15139
+ absoluteTop,
15140
+ finalWidth,
15141
+ finalHeight,
15142
+ finalScaleX,
15143
+ finalScaleY,
15144
+ finalAngle,
15145
+ finalSkewX,
15146
+ finalSkewY,
15147
+ decomposed,
15148
+ finalAbsoluteMatrix
15149
+ }
15150
+ });
15151
+ }
14977
15152
  } else {
14978
15153
  finalWidth = intrinsicWidth;
14979
15154
  finalHeight = intrinsicHeight;
@@ -15191,6 +15366,16 @@ const PageCanvas = react.forwardRef(
15191
15366
  objectBeforeStoreWrite: summarizeFabricObjectForResizeDebug(obj)
15192
15367
  });
15193
15368
  }
15369
+ if (debugGroupImageSideResize && isGroupResizeImageLikeObject(obj)) {
15370
+ logGroupImageResizeDebug("store-update-image", {
15371
+ time: Math.round(performance.now()),
15372
+ handle: activeSelectionResizeHandle,
15373
+ imageId: objId,
15374
+ storePos,
15375
+ elementUpdate,
15376
+ objectBeforeStoreWrite: summarizeFabricObjectForResizeDebug(obj)
15377
+ });
15378
+ }
15194
15379
  updateElement(objId, elementUpdate, { recordHistory: false, skipLayoutRecalc: true });
15195
15380
  obj.setCoords();
15196
15381
  }
@@ -15221,6 +15406,16 @@ const PageCanvas = react.forwardRef(
15221
15406
  renderOnAddRemove: fabricCanvas.renderOnAddRemove
15222
15407
  });
15223
15408
  }
15409
+ if (debugGroupImageSideResize) {
15410
+ logGroupImageResizeDebug("before-reselect", {
15411
+ time: Math.round(performance.now()),
15412
+ handle: activeSelectionResizeHandle,
15413
+ wasGroupSel,
15414
+ selection: summarizeFabricObjectForResizeDebug(activeObj),
15415
+ members: membersToReselect.map((member) => summarizeFabricObjectForResizeDebug(member)),
15416
+ renderOnAddRemove: fabricCanvas.renderOnAddRemove
15417
+ });
15418
+ }
15224
15419
  const prevRenderOnAddRemove = fabricCanvas.renderOnAddRemove;
15225
15420
  fabricCanvas.renderOnAddRemove = false;
15226
15421
  skipSelectionClearOnDiscardRef.current = true;
@@ -15265,6 +15460,16 @@ const PageCanvas = react.forwardRef(
15265
15460
  renderOnAddRemove: fabricCanvas.renderOnAddRemove
15266
15461
  });
15267
15462
  }
15463
+ if (debugGroupImageSideResize) {
15464
+ logGroupImageResizeDebug("after-reselect", {
15465
+ time: Math.round(performance.now()),
15466
+ handle: activeSelectionResizeHandle,
15467
+ wasGroupSel,
15468
+ selection: summarizeFabricObjectForResizeDebug(newSel),
15469
+ members: membersToReselect.map((member) => summarizeFabricObjectForResizeDebug(member)),
15470
+ renderOnAddRemove: fabricCanvas.renderOnAddRemove
15471
+ });
15472
+ }
15268
15473
  } else if (membersToReselect.length === 1) {
15269
15474
  fabricCanvas.setActiveObject(membersToReselect[0]);
15270
15475
  }
@@ -24314,9 +24519,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
24314
24519
  }
24315
24520
  return svgString;
24316
24521
  }
24317
- const resolvedPackageVersion = "0.5.331";
24522
+ const resolvedPackageVersion = "0.5.333";
24318
24523
  const PACKAGE_VERSION = resolvedPackageVersion;
24319
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.331";
24524
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.333";
24320
24525
  const roundParityValue = (value) => {
24321
24526
  if (typeof value !== "number") return value;
24322
24527
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -25130,7 +25335,7 @@ class PixldocsRenderer {
25130
25335
  await this.waitForCanvasScene(container, cloned, i);
25131
25336
  }
25132
25337
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
25133
- const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-07IeD7w3.cjs"));
25338
+ const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-Cc-1U0NL.cjs"));
25134
25339
  const prepared = preparePagesForExport(
25135
25340
  cloned.pages,
25136
25341
  canvasWidth,
@@ -27450,7 +27655,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
27450
27655
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
27451
27656
  sanitizeSvgTreeForPdf(svgToDraw);
27452
27657
  try {
27453
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-07IeD7w3.cjs"));
27658
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-Cc-1U0NL.cjs"));
27454
27659
  try {
27455
27660
  await logTextMeasurementDiagnostic(svgToDraw);
27456
27661
  } catch {
@@ -27847,4 +28052,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
27847
28052
  exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
27848
28053
  exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
27849
28054
  exports.warmTemplateFromForm = warmTemplateFromForm;
27850
- //# sourceMappingURL=index-COZR9zOa.cjs.map
28055
+ //# sourceMappingURL=index-k8mzlqgs.cjs.map