@pixldocs/canvas-renderer 0.5.370 → 0.5.372

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.
@@ -11579,6 +11579,7 @@ const PageCanvas = forwardRef(
11579
11579
  } = useEditorStore();
11580
11580
  const storeSelectedIds = canvas.selectedIds ?? [];
11581
11581
  const restoreGroupSelectionSnapshot = useCallback((snapshot) => {
11582
+ var _a2;
11582
11583
  const fc = fabricRef.current;
11583
11584
  const groupId = snapshot == null ? void 0 : snapshot.groupSelectionId;
11584
11585
  if (!fc || !groupId || snapshot.memberIds.length < 2 || editingTextIdRef.current) return;
@@ -11598,6 +11599,14 @@ const PageCanvas = forwardRef(
11598
11599
  const selection = active instanceof fabric.ActiveSelection && members.every((member) => active.getObjects().includes(member)) ? active : new fabric.ActiveSelection(members, { canvas: fc });
11599
11600
  applyLogicalGroupSelectionVisualState(selection, groupId);
11600
11601
  fc.setActiveObject(selection);
11602
+ try {
11603
+ members.forEach((m) => m.setCoords());
11604
+ } catch {
11605
+ }
11606
+ try {
11607
+ (_a2 = selection.triggerLayout) == null ? void 0 : _a2.call(selection);
11608
+ } catch {
11609
+ }
11601
11610
  selection.setCoords();
11602
11611
  fc.requestRenderAll();
11603
11612
  } finally {
@@ -14542,7 +14551,7 @@ const PageCanvas = forwardRef(
14542
14551
  });
14543
14552
  let cropGroupSaveTimer = null;
14544
14553
  fabricCanvas.on("object:modified", (e) => {
14545
- var _a2, _b2, _c, _d, _e, _f, _g, _h, _i;
14554
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j;
14546
14555
  try {
14547
14556
  if (suppressObjectModifiedDuringInternalReselectRef.current) return;
14548
14557
  dragStarted = false;
@@ -15552,7 +15561,19 @@ const PageCanvas = forwardRef(
15552
15561
  if (membersToReselect.length > 1) {
15553
15562
  const newSel = new fabric.ActiveSelection(membersToReselect, { canvas: fabricCanvas });
15554
15563
  if (wasGroupSel) restoreGroupSelectionVisualState(newSel, wasGroupSel);
15564
+ try {
15565
+ ensureCanvaControlRenders(newSel);
15566
+ } catch {
15567
+ }
15555
15568
  fabricCanvas.setActiveObject(newSel);
15569
+ try {
15570
+ (_j = newSel.triggerLayout) == null ? void 0 : _j.call(newSel);
15571
+ } catch {
15572
+ }
15573
+ try {
15574
+ for (const member of membersToReselect) member.setCoords();
15575
+ } catch {
15576
+ }
15556
15577
  newSel.setCoords();
15557
15578
  logRotDriftSelectionSnapshot("after-reselect", newSel, {
15558
15579
  time: Math.round(performance.now()),
@@ -15934,6 +15955,10 @@ const PageCanvas = forwardRef(
15934
15955
  if (activeSelectionSnapshot.groupSelectionId) {
15935
15956
  applyLogicalGroupSelectionVisualState(newSel, activeSelectionSnapshot.groupSelectionId);
15936
15957
  }
15958
+ try {
15959
+ ensureCanvaControlRenders(newSel);
15960
+ } catch {
15961
+ }
15937
15962
  fc.setActiveObject(newSel);
15938
15963
  newSel.setCoords();
15939
15964
  fc.requestRenderAll();
@@ -16668,6 +16693,10 @@ const PageCanvas = forwardRef(
16668
16693
  if (activeSelectionSnapshot.groupSelectionId) {
16669
16694
  applyLogicalGroupSelectionVisualState(newSel, activeSelectionSnapshot.groupSelectionId);
16670
16695
  }
16696
+ try {
16697
+ ensureCanvaControlRenders(newSel);
16698
+ } catch {
16699
+ }
16671
16700
  fc.setActiveObject(newSel);
16672
16701
  newSel.setCoords();
16673
16702
  fc.requestRenderAll();
@@ -24632,9 +24661,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
24632
24661
  }
24633
24662
  return svgString;
24634
24663
  }
24635
- const resolvedPackageVersion = "0.5.370";
24664
+ const resolvedPackageVersion = "0.5.372";
24636
24665
  const PACKAGE_VERSION = resolvedPackageVersion;
24637
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.370";
24666
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.372";
24638
24667
  const roundParityValue = (value) => {
24639
24668
  if (typeof value !== "number") return value;
24640
24669
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -25448,7 +25477,7 @@ class PixldocsRenderer {
25448
25477
  await this.waitForCanvasScene(container, cloned, i);
25449
25478
  }
25450
25479
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
25451
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-kmJCS96K.js");
25480
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CwD3b9HF.js");
25452
25481
  const prepared = preparePagesForExport(
25453
25482
  cloned.pages,
25454
25483
  canvasWidth,
@@ -27768,7 +27797,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
27768
27797
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
27769
27798
  sanitizeSvgTreeForPdf(svgToDraw);
27770
27799
  try {
27771
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-kmJCS96K.js");
27800
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CwD3b9HF.js");
27772
27801
  try {
27773
27802
  await logTextMeasurementDiagnostic(svgToDraw);
27774
27803
  } catch {
@@ -28168,4 +28197,4 @@ export {
28168
28197
  buildTeaserBlurFlatKeys as y,
28169
28198
  collectFontDescriptorsFromConfig as z
28170
28199
  };
28171
- //# sourceMappingURL=index--vPTmOfh.js.map
28200
+ //# sourceMappingURL=index-BAK60IJl.js.map