@pixldocs/canvas-renderer 0.5.358 → 0.5.359

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.
@@ -11244,37 +11244,6 @@ function applyWarpAwareSelectionBorders(selection) {
11244
11244
  selection.setCoords();
11245
11245
  selection.dirty = true;
11246
11246
  selection.__pixldocsAlignedAngle = targetAngle;
11247
- try {
11248
- const payload = {
11249
- targetAngle,
11250
- selection: {
11251
- left: selection.left,
11252
- top: selection.top,
11253
- angle: selection.angle,
11254
- scaleX: selection.scaleX,
11255
- scaleY: selection.scaleY,
11256
- width: selection.width,
11257
- height: selection.height,
11258
- originX: selection.originX,
11259
- originY: selection.originY
11260
- },
11261
- kids: kids.map((c) => ({
11262
- id: c.id ?? c.__pixldocsId,
11263
- type: c.type,
11264
- left: c.left,
11265
- top: c.top,
11266
- angle: c.angle,
11267
- scaleX: c.scaleX,
11268
- scaleY: c.scaleY,
11269
- originX: c.originX,
11270
- originY: c.originY,
11271
- width: c.width,
11272
- height: c.height
11273
- }))
11274
- };
11275
- console.info("[Pixldocs][rot-group-image-drift] aligned-on-select " + JSON.stringify(payload));
11276
- } catch {
11277
- }
11278
11247
  }
11279
11248
  }
11280
11249
  }
@@ -14288,40 +14257,6 @@ const PageCanvas = react.forwardRef(
14288
14257
  markSimpleTransform(e);
14289
14258
  didTransformRef.current = true;
14290
14259
  const tr = e.target;
14291
- try {
14292
- const t = tr;
14293
- if (t) {
14294
- const payload = {
14295
- targetType: t.type,
14296
- isAS: t instanceof fabric__namespace.ActiveSelection,
14297
- left: t.left,
14298
- top: t.top,
14299
- angle: t.angle,
14300
- scaleX: t.scaleX,
14301
- scaleY: t.scaleY,
14302
- width: t.width,
14303
- height: t.height,
14304
- originX: t.originX,
14305
- originY: t.originY,
14306
- childCount: (t._objects ?? []).length,
14307
- children: (t._objects ?? []).map((c) => ({
14308
- id: getObjectId(c),
14309
- type: c.type,
14310
- left: c.left,
14311
- top: c.top,
14312
- angle: c.angle,
14313
- scaleX: c.scaleX,
14314
- scaleY: c.scaleY,
14315
- originX: c.originX,
14316
- originY: c.originY,
14317
- width: c.width,
14318
- height: c.height
14319
- }))
14320
- };
14321
- console.info("[Pixldocs][rot-group-image-drift] rotating " + JSON.stringify(payload));
14322
- }
14323
- } catch {
14324
- }
14325
14260
  try {
14326
14261
  const getCursor = fabricCanvas.__pixldocsGetRotateCursor;
14327
14262
  const upper = fabricCanvas.upperCanvasEl;
@@ -14354,40 +14289,6 @@ const PageCanvas = react.forwardRef(
14354
14289
  prepareGroupSelectionTransformStart(e.target);
14355
14290
  markTransforming(e.target);
14356
14291
  didTransformRef.current = true;
14357
- try {
14358
- const t = e.target;
14359
- if (t && (t.angle ?? 0) !== 0) {
14360
- const payload = {
14361
- targetType: t.type,
14362
- isAS: t instanceof fabric__namespace.ActiveSelection,
14363
- left: t.left,
14364
- top: t.top,
14365
- angle: t.angle,
14366
- scaleX: t.scaleX,
14367
- scaleY: t.scaleY,
14368
- width: t.width,
14369
- height: t.height,
14370
- originX: t.originX,
14371
- originY: t.originY,
14372
- childCount: (t._objects ?? []).length,
14373
- children: (t._objects ?? []).map((c) => ({
14374
- id: getObjectId(c),
14375
- type: c.type,
14376
- left: c.left,
14377
- top: c.top,
14378
- angle: c.angle,
14379
- scaleX: c.scaleX,
14380
- scaleY: c.scaleY,
14381
- originX: c.originX,
14382
- originY: c.originY,
14383
- width: c.width,
14384
- height: c.height
14385
- }))
14386
- };
14387
- console.info("[Pixldocs][rot-group-image-drift] moving " + JSON.stringify(payload));
14388
- }
14389
- } catch {
14390
- }
14391
14292
  const activeDuringMove = fabricCanvas.getActiveObject();
14392
14293
  const movingLogicalGroupId = activeDuringMove instanceof fabric__namespace.ActiveSelection ? activeDuringMove.__pixldocsGroupSelection : void 0;
14393
14294
  const pendingMoveDrill = pendingGroupDrillInRef.current;
@@ -16813,7 +16714,7 @@ const PageCanvas = react.forwardRef(
16813
16714
  const isFlatGroupSelection = toSelect.length > 1 && toSelect.every((o) => !(o instanceof fabric__namespace.Group));
16814
16715
  const active = fc.getActiveObject();
16815
16716
  const sameSelection = active instanceof fabric__namespace.ActiveSelection && active.getObjects().length === toSelect.length && toSelect.every((obj) => active.getObjects().includes(obj));
16816
- if (sameSelection && isFlatGroupSelection) {
16717
+ if (sameSelection && (isFlatGroupSelection || isPureSingleGroupSelection)) {
16817
16718
  if (selectedGroupSelectionId && active instanceof fabric__namespace.ActiveSelection) {
16818
16719
  if (isPureSingleGroupSelection) {
16819
16720
  active.__pixldocsGroupSelection = selectedGroupSelectionId;
@@ -16845,8 +16746,10 @@ const PageCanvas = react.forwardRef(
16845
16746
  });
16846
16747
  if (isPureSingleGroupSelection) {
16847
16748
  active.hasBorders = true;
16848
- active.setCoords();
16849
- applyWarpAwareSelectionBorders(active);
16749
+ if (active.__pixldocsAlignedAngle == null) {
16750
+ active.setCoords();
16751
+ applyWarpAwareSelectionBorders(active);
16752
+ }
16850
16753
  }
16851
16754
  }
16852
16755
  fc.requestRenderAll();
@@ -24492,9 +24395,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
24492
24395
  }
24493
24396
  return svgString;
24494
24397
  }
24495
- const resolvedPackageVersion = "0.5.358";
24398
+ const resolvedPackageVersion = "0.5.359";
24496
24399
  const PACKAGE_VERSION = resolvedPackageVersion;
24497
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.358";
24400
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.359";
24498
24401
  const roundParityValue = (value) => {
24499
24402
  if (typeof value !== "number") return value;
24500
24403
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -25308,7 +25211,7 @@ class PixldocsRenderer {
25308
25211
  await this.waitForCanvasScene(container, cloned, i);
25309
25212
  }
25310
25213
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
25311
- const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BjU5UnhU.cjs"));
25214
+ const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-Cnxqr8BW.cjs"));
25312
25215
  const prepared = preparePagesForExport(
25313
25216
  cloned.pages,
25314
25217
  canvasWidth,
@@ -27628,7 +27531,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
27628
27531
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
27629
27532
  sanitizeSvgTreeForPdf(svgToDraw);
27630
27533
  try {
27631
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BjU5UnhU.cjs"));
27534
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-Cnxqr8BW.cjs"));
27632
27535
  try {
27633
27536
  await logTextMeasurementDiagnostic(svgToDraw);
27634
27537
  } catch {
@@ -28025,4 +27928,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
28025
27928
  exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
28026
27929
  exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
28027
27930
  exports.warmTemplateFromForm = warmTemplateFromForm;
28028
- //# sourceMappingURL=index-BMPgVllP.cjs.map
27931
+ //# sourceMappingURL=index-B8DKV_MC.cjs.map