@pixldocs/canvas-renderer 0.5.310 → 0.5.311

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.
@@ -11161,12 +11161,35 @@ const bakeTextboxScaleIntoTypography = (obj, sourceElement) => {
11161
11161
  return updates;
11162
11162
  };
11163
11163
  function applyWarpAwareSelectionBorders(selection) {
11164
+ var _a2;
11164
11165
  if (selection.__pixldocsOrigASHasBorders !== void 0) {
11165
11166
  selection.hasBorders = selection.__pixldocsOrigASHasBorders;
11166
11167
  delete selection.__pixldocsOrigASHasBorders;
11167
11168
  }
11168
11169
  selection.hasBorders = true;
11169
11170
  selection.hasControls = true;
11171
+ try {
11172
+ const kids = selection.getObjects();
11173
+ let allSameNonZero = kids.length > 0;
11174
+ const first = ((((_a2 = kids[0]) == null ? void 0 : _a2.angle) ?? 0) % 360 + 360) % 360;
11175
+ if (Math.abs(first) < 0.5 || Math.abs(first - 360) < 0.5) allSameNonZero = false;
11176
+ if (allSameNonZero) {
11177
+ for (const k of kids) {
11178
+ const a = ((k.angle ?? 0) % 360 + 360) % 360;
11179
+ if (Math.abs(a - first) > 0.5) {
11180
+ allSameNonZero = false;
11181
+ break;
11182
+ }
11183
+ }
11184
+ }
11185
+ selection.setControlsVisibility({
11186
+ ml: !allSameNonZero,
11187
+ mr: !allSameNonZero,
11188
+ mt: !allSameNonZero,
11189
+ mb: !allSameNonZero
11190
+ });
11191
+ } catch {
11192
+ }
11170
11193
  }
11171
11194
  const PageCanvas = forwardRef(
11172
11195
  ({
@@ -24210,9 +24233,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
24210
24233
  }
24211
24234
  return svgString;
24212
24235
  }
24213
- const resolvedPackageVersion = "0.5.310";
24236
+ const resolvedPackageVersion = "0.5.311";
24214
24237
  const PACKAGE_VERSION = resolvedPackageVersion;
24215
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.310";
24238
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.311";
24216
24239
  const roundParityValue = (value) => {
24217
24240
  if (typeof value !== "number") return value;
24218
24241
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -25026,7 +25049,7 @@ class PixldocsRenderer {
25026
25049
  await this.waitForCanvasScene(container, cloned, i);
25027
25050
  }
25028
25051
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
25029
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-iBVh67qr.js");
25052
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DouKBaoG.js");
25030
25053
  const prepared = preparePagesForExport(
25031
25054
  cloned.pages,
25032
25055
  canvasWidth,
@@ -27346,7 +27369,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
27346
27369
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
27347
27370
  sanitizeSvgTreeForPdf(svgToDraw);
27348
27371
  try {
27349
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-iBVh67qr.js");
27372
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DouKBaoG.js");
27350
27373
  try {
27351
27374
  await logTextMeasurementDiagnostic(svgToDraw);
27352
27375
  } catch {
@@ -27746,4 +27769,4 @@ export {
27746
27769
  buildTeaserBlurFlatKeys as y,
27747
27770
  collectFontDescriptorsFromConfig as z
27748
27771
  };
27749
- //# sourceMappingURL=index-DiALQM5h.js.map
27772
+ //# sourceMappingURL=index-BGRSqiXc.js.map