@pixldocs/canvas-renderer 0.5.252 → 0.5.253

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.
@@ -12033,7 +12033,7 @@ const PageCanvas = forwardRef(
12033
12033
  }
12034
12034
  });
12035
12035
  fabricCanvas.on("object:scaling", () => {
12036
- var _a2;
12036
+ var _a2, _b2;
12037
12037
  fabricCanvas.__isUserTransforming = true;
12038
12038
  if (drilledGroupIdRef.current) {
12039
12039
  try {
@@ -12041,6 +12041,38 @@ const PageCanvas = forwardRef(
12041
12041
  } catch {
12042
12042
  }
12043
12043
  }
12044
+ const active = fabricCanvas.getActiveObject();
12045
+ if (!active) return;
12046
+ const state = useEditorStore.getState();
12047
+ const canvasPage = (_b2 = state.canvas.pages) == null ? void 0 : _b2.find((p) => p.id === pageId);
12048
+ const children = (canvasPage == null ? void 0 : canvasPage.children) ?? [];
12049
+ if (!canvasPage) return;
12050
+ const ids = state.canvas.selectedIds ?? [];
12051
+ let selectedGroup2 = null;
12052
+ for (const id of ids) {
12053
+ const node = findNodeById(children, id);
12054
+ if (node && isGroup(node)) {
12055
+ selectedGroup2 = node;
12056
+ break;
12057
+ }
12058
+ }
12059
+ if (!selectedGroup2) {
12060
+ const firstId = ids[0];
12061
+ const parent = firstId ? findParentGroup(children, firstId) : null;
12062
+ if (parent) {
12063
+ const memberIds = new Set(getAllElementIds(parent.children ?? []));
12064
+ const allSelectedInGroup = ids.every((id) => memberIds.has(id) || id === parent.id);
12065
+ if (allSelectedInGroup) selectedGroup2 = parent;
12066
+ }
12067
+ }
12068
+ if (!selectedGroup2) return;
12069
+ const rect = active.getBoundingRect();
12070
+ if (rect.width > 0 && rect.height > 0) {
12071
+ const bounds = { left: rect.left, top: rect.top, width: rect.width, height: rect.height };
12072
+ flushSync(() => {
12073
+ setGroupOverlayLiveBoundsRef.current(bounds);
12074
+ });
12075
+ }
12044
12076
  });
12045
12077
  fabricCanvas.on("object:moving", () => {
12046
12078
  var _a2, _b2;
@@ -23459,9 +23491,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
23459
23491
  }
23460
23492
  return svgString;
23461
23493
  }
23462
- const resolvedPackageVersion = "0.5.252";
23494
+ const resolvedPackageVersion = "0.5.253";
23463
23495
  const PACKAGE_VERSION = resolvedPackageVersion;
23464
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.252";
23496
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.253";
23465
23497
  const roundParityValue = (value) => {
23466
23498
  if (typeof value !== "number") return value;
23467
23499
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -24275,7 +24307,7 @@ class PixldocsRenderer {
24275
24307
  await this.waitForCanvasScene(container, cloned, i);
24276
24308
  }
24277
24309
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
24278
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-Cat5oceo.js");
24310
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DyfBSeYs.js");
24279
24311
  const prepared = preparePagesForExport(
24280
24312
  cloned.pages,
24281
24313
  canvasWidth,
@@ -26595,7 +26627,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
26595
26627
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
26596
26628
  sanitizeSvgTreeForPdf(svgToDraw);
26597
26629
  try {
26598
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-Cat5oceo.js");
26630
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DyfBSeYs.js");
26599
26631
  try {
26600
26632
  await logTextMeasurementDiagnostic(svgToDraw);
26601
26633
  } catch {
@@ -26995,4 +27027,4 @@ export {
26995
27027
  buildTeaserBlurFlatKeys as y,
26996
27028
  collectFontDescriptorsFromConfig as z
26997
27029
  };
26998
- //# sourceMappingURL=index-k8vzqr4-.js.map
27030
+ //# sourceMappingURL=index-BsuNRFPC.js.map