@pixldocs/canvas-renderer 0.5.486 → 0.5.487
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.
- package/dist/{index-CahlaWb5.js → index-CqRau2aM.js} +13 -8
- package/dist/{index-CahlaWb5.js.map → index-CqRau2aM.js.map} +1 -1
- package/dist/{index-smRSw8bm.cjs → index-eyHORcg9.cjs} +13 -8
- package/dist/{index-smRSw8bm.cjs.map → index-eyHORcg9.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-DnsSdLBw.js → vectorPdfExport-CjRFYSDp.js} +4 -4
- package/dist/{vectorPdfExport-DnsSdLBw.js.map → vectorPdfExport-CjRFYSDp.js.map} +1 -1
- package/dist/{vectorPdfExport-BepYq3oJ.cjs → vectorPdfExport-SQN2BQR0.cjs} +4 -4
- package/dist/{vectorPdfExport-BepYq3oJ.cjs.map → vectorPdfExport-SQN2BQR0.cjs.map} +1 -1
- package/package.json +1 -1
|
@@ -16013,7 +16013,9 @@ const PageCanvas = forwardRef(
|
|
|
16013
16013
|
return !!(node && isGroup(node));
|
|
16014
16014
|
});
|
|
16015
16015
|
const activeSelectionHadTransform = activeObj instanceof fabric.ActiveSelection && (Math.abs((activeObj.scaleX ?? 1) - 1) > 0.01 || Math.abs((activeObj.scaleY ?? 1) - 1) > 0.01 || Math.abs((activeObj.angle ?? 0) % 360) > 0.01);
|
|
16016
|
-
|
|
16016
|
+
const activeLogicalGroupSelectionId = activeObj instanceof fabric.ActiveSelection ? activeObj.__pixldocsGroupSelection : void 0;
|
|
16017
|
+
const isPureLogicalGroupMoveWithCrop = !!(anyCropGroup && activeLogicalGroupSelectionId && activeSelectionDelta && !activeSelectionHadTransform);
|
|
16018
|
+
if ((!anyCropGroup || isPureLogicalGroupMoveWithCrop) && activeSelectionDelta && !activeSelectionHadTransform && selectedLogicalGroupIds.length > 0) {
|
|
16017
16019
|
const selectedStoreIds = useEditorStore.getState().canvas.selectedIds ?? [];
|
|
16018
16020
|
const groupMemberIds = /* @__PURE__ */ new Set();
|
|
16019
16021
|
selectedLogicalGroupIds.forEach((gid) => {
|
|
@@ -16053,7 +16055,7 @@ const PageCanvas = forwardRef(
|
|
|
16053
16055
|
return;
|
|
16054
16056
|
}
|
|
16055
16057
|
}
|
|
16056
|
-
if (selectedElementIds.length > 0 && !anyCropGroup) {
|
|
16058
|
+
if (selectedElementIds.length > 0 && (!anyCropGroup || isPureLogicalGroupMoveWithCrop)) {
|
|
16057
16059
|
const firstObj = activeObjects[0];
|
|
16058
16060
|
const firstId = getObjectId(firstObj);
|
|
16059
16061
|
const parentGroups = selectedElementIds.map((id) => findParentGroup(pageChildren2, id)).filter((g) => g !== null);
|
|
@@ -16075,7 +16077,10 @@ const PageCanvas = forwardRef(
|
|
|
16075
16077
|
const groupAbs = getAbsoluteBounds(groupToMove, pageChildren2);
|
|
16076
16078
|
let movedGroupLeft = groupAbs.left;
|
|
16077
16079
|
let movedGroupTop = groupAbs.top;
|
|
16078
|
-
if (activeObj instanceof fabric.ActiveSelection &&
|
|
16080
|
+
if (activeObj instanceof fabric.ActiveSelection && activeLogicalGroupSelectionId === groupToMove.id && activeSelectionDelta && !activeSelectionHadTransform) {
|
|
16081
|
+
movedGroupLeft = groupAbs.left + activeSelectionDelta.x;
|
|
16082
|
+
movedGroupTop = groupAbs.top + activeSelectionDelta.y;
|
|
16083
|
+
} else if (activeObj instanceof fabric.ActiveSelection && (transformStart == null ? void 0 : transformStart.groupId) === groupToMove.id) {
|
|
16079
16084
|
const live = lastLiveSelectionRectRef.current;
|
|
16080
16085
|
const selectionRect = live && live.selection === activeObj ? { left: live.left, top: live.top } : activeObj.getBoundingRect();
|
|
16081
16086
|
movedGroupLeft = transformStart.groupLeft + (selectionRect.left - transformStart.selectionLeft);
|
|
@@ -26417,9 +26422,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
26417
26422
|
}
|
|
26418
26423
|
return svgString;
|
|
26419
26424
|
}
|
|
26420
|
-
const resolvedPackageVersion = "0.5.
|
|
26425
|
+
const resolvedPackageVersion = "0.5.487";
|
|
26421
26426
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
26422
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
26427
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.487";
|
|
26423
26428
|
const roundParityValue = (value) => {
|
|
26424
26429
|
if (typeof value !== "number") return value;
|
|
26425
26430
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -27233,7 +27238,7 @@ class PixldocsRenderer {
|
|
|
27233
27238
|
await this.waitForCanvasScene(container, cloned, i);
|
|
27234
27239
|
}
|
|
27235
27240
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
27236
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
27241
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CjRFYSDp.js");
|
|
27237
27242
|
const prepared = preparePagesForExport(
|
|
27238
27243
|
cloned.pages,
|
|
27239
27244
|
canvasWidth,
|
|
@@ -29553,7 +29558,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
29553
29558
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
29554
29559
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
29555
29560
|
try {
|
|
29556
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
29561
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CjRFYSDp.js");
|
|
29557
29562
|
try {
|
|
29558
29563
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
29559
29564
|
} catch {
|
|
@@ -29870,4 +29875,4 @@ export {
|
|
|
29870
29875
|
buildTeaserBlurFlatKeys as y,
|
|
29871
29876
|
collectFontDescriptorsFromConfig as z
|
|
29872
29877
|
};
|
|
29873
|
-
//# sourceMappingURL=index-
|
|
29878
|
+
//# sourceMappingURL=index-CqRau2aM.js.map
|